用稀疏线性专家提升模型效率与可解释性
Sparsely gated tiny linear experts

- 将专家压缩为单个神经元,通过稀疏门控实现高效计算
- 在同等算力下,语言模型困惑度更低,性能更优
- 模型结构简单透明,便于直接分析语义与事实记忆机制
稀疏性使模型参数增长而不成比例增加计算成本。尽管混合专家(MoE)模型日益稀疏,但单个专家通常仍较大且密集。本文展示,通过将每个专家缩小为单一神经元,并仅选择大量可用神经元中的极小部分,可进一步提升计算效率与可解释性。出人意料的是,关键在于移除专家上通常使用的非线性激活,从而构建由稀疏门控线性神经元组成的网络(sgatlin)。在等算力对比中,用sgatlin替换所有Transformer前馈层,在不同计算预算下均能降低语言模型的困惑度。同时,其稀疏性与线性特性为模型可解释性带来新可能。在小规模案例研究中,我们发现sgatlin的前馈电路无需额外训练即可被解读,形成语义结构化的聚类,并在事实回忆中具有因果作用。这些结果揭示了通往高效且可解释的Transformer前馈层的新路径。
原文摘要 · Abstract (English)
Sparsity allows scaling model parameters without proportionally increasing computational cost. While mixture of experts (MoE) models are made increasingly sparse, individual experts typically remain large and dense. Here, we demonstrate that further increasing sparsity by shrinking each expert to consist of a single neuron and selecting a tiny fraction of many available neurons can improve compute efficiency and interpretability. Counterintuitively, the key to achieving both is removing the nonlinearity typically applied to the experts, resulting in a network of sparsely gated linear neurons (sgatlin). In an isoflop comparison, we find that replacing all transformer feedforward layers with sgatlin improves perplexity in language models across different compute budgets. At the same time, the sparsity and linearity of the resulting feedforward circuits present new opportunities for model interpretability. In a small-scale case study, we demonstrate that feedforward circuits in sgatlin can be interpreted without having to train additional replacement models. We find that they form semantically structured clusters and are causally implicated in factual recall. Our findings paint a possible path towards compute-efficient and interpretable transformer feedforward layers.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。