发现大模型MLP层暗藏稀疏专家混合结构,解释其高效原理
Secret mixtures of experts inside your LLM
- 提出MLP层可被稀疏专家混合(MoE)近似,基于激活空间的理论关联
- 实验证明仅在真实神经网络激活分布下成立,非高斯数据无效
- 揭示大模型高效性根源,为低秩路由器设计提供新方向
尽管多层感知机(MLP)是最早的神经网络层之一,但因其密集计算和难以可视化,仍是Transformer架构中最不为人所知的部分。本文假设密集大模型中的MLP层实际上以稀疏方式运行——即能被稀疏激活的专家混合(MoE)层良好近似。该假设基于MoE模型与激活空间中稀疏自编码器(SAE)结构之间的新型理论联系。我们在预训练的大语言模型上实证验证了这一假设,发现激活分布至关重要:这些结果仅在真实神经网络激活分布下成立,而不在高斯数据上成立。研究揭示了大模型中MLP层背后的普遍规律,解释了现代基于MoE的Transformer的有效性。此外,实验探索还提出了基于低秩路由器的更高效MoE架构设计新方向。
原文摘要 · Abstract (English)
Despite being one of the earliest neural network layers, the Multilayer Perceptron (MLP) is arguably one of the least understood parts of the transformer architecture due to its dense computation and lack of easy visualization. This paper seeks to understand the MLP layers in dense LLM models by hypothesizing that these layers secretly approximately perform a sparse computation -- namely, that they can be well approximated by sparsely-activating Mixture of Experts (MoE) layers. Our hypothesis is based on a novel theoretical connection between MoE models and Sparse Autoencoder (SAE) structure in activation space. We empirically validate the hypothesis on pretrained LLMs, and demonstrate that the activation distribution matters -- these results do not hold for Gaussian data, but rather rely crucially on structure in the distribution of neural network activations. Our results shine light on a general principle at play in MLP layers inside LLMs, and give an explanation for the effectiveness of modern MoE-based transformers. Additionally, our experimental explorations suggest new directions for more efficient MoE architecture design based on low-rank routers.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。