SAE解读MoE:稀疏自编码器揭示MoE专家具有人类可解释的细粒度专业化

·

研究论文 · 2026/11/06

现有分析专家混合(MoE)模型的方法通常基于领域标签语料统计专家被选中的频率,这种方法预设了分类体系、粒度粗且只记录选择而非贡献。本文提出在特征空间中研究专家专业化:在MoE层输出上训练稀疏自编码器(SAE)。由于MoE输出是专家输出的路由加权和,且SAE编码器是仿射的,每个潜在变量的预激活可精确分解到各专家上。在语料上聚合后,每个专家获得一组主要由其驱动的主导潜在变量。在Qwen3-30B-A3B的第4、30和46层上,贡献比门控更集中,大多数潜在变量只有一两个主导专家,主导集之间的重叠集中在少数专家对上。自动解释这些集合揭示了粗粒度领域下的分工,例如Java和前端Web代码、几何和算术与多项式分别由不同专家处理,而粗粒度领域本身占用的专家数量极不均衡。

该研究提供了一种新的MoE可解释性方法,能够揭示专家在细粒度特征层面的分工,有助于理解MoE模型内部机制,并可能指导模型设计与优化。

Mixture-of-Experts (MoE) models route each token to a few of many experts, yet what an individual expert is responsible for remains unsettled. Existing analyses count how often an expert is selected on domain-labeled corpora, an instrument that fixes the taxonomy in advance, stays coarse, and records selection rather than contribution. We instead study specialization in feature space by training a sparse autoencoder (SAE) on the output of an MoE layer. Since this output is a router-weighted sum of expert outputs and the SAE encoder is affine, the pre-activation of every latent decomposes exactly over the experts. Aggregated over a corpus, this gives each expert a dominant set of latents whose activation it principally drives. On layers 4, 30 and 46 of Qwen3-30B-A3B, contribution is far more concentrated than gating, most latents have only one or two dominators, and the overlap between dominant sets concentrates on a few expert pairs. Auto-interpreting these sets reveals a division of labor below coarse domains, with distinct experts for Java and front-end web code, or for geometry and for arithmetic and polynomials, while the coarse domains themselves take very unequal numbers of experts. Our SAEs and code are available at https://github.com/Bytedance-Seed/SAE-Interprets-MoE.

阅读原文

参与讨论