哪些被激活:揭示MoE语言模型中的领域和驱动专家
What Gets Activated: Uncovering Domain and Driver Experts in MoE Language Models
AI总结:
研究揭示MoE语言模型中领域和驱动专家的激活机制,通过分析专家激活模式提升模型可解释性。
摘要:
大多数可解释性工作集中在Transformer中的层或神经元级机制上,留出了MoE LLMs中的专家级行为未被深入研究。受人类大脑功能专业化启发,我们通过区分领域专家和驱动专家来分析专家激活。在本工作中,我们研究了MoE模型在三个公开领域中的专家激活,并回答了两个关键问题:(1)哪些专家被激活,以及某些专家类型是否表现出一致的激活模式;(2)如何将token与特定专家的激活关联起来并触发。为回答这些问题,我们引入了基于熵和因果效应的指标,以评估专家是否对特定领域被强烈偏好,以及专家激活如何因果影响模型输出,从而分别识别领域专家和驱动专家。此外,我们探索了单个token如何与特定专家的激活相关联。我们的分析发现:(1)在激活的专家中,有些表现出明显的领域偏好,而其他专家对模型性能有强烈的因果影响,凸显了它们的决定性作用。(2)句子中出现较早的token更可能触发驱动专家。(3)调整领域和驱动专家的权重在所有三个模型和领域中都带来了显著的性能提升。这些发现揭示了MoE模型的内部机制并增强了其可解释性。
英文摘要:
Most interpretability work focuses on layer- or neuron-level mechanisms in Transformers, leaving expert-level behavior in MoE LLMs underexplored. Motivated by functional specialization in the human brain, we analyze expert activation by distinguishing domain and driver experts. In this work, we study expert activation in MoE models across three public domains and address two key questions: (1) which experts are activated, and whether certain expert types exhibit consistent activation patterns; and (2) how tokens are associated with and trigger the activation of specific experts. To answer these questions, we introduce entropy-based and causal-effect metrics to assess whether an expert is strongly favored for a particular domain, and how strongly expert activation contributes causally to the model's output, thus identify domain and driver experts, respectively. Furthermore, we explore how individual tokens are associated with the activation of specific experts. Our analysis reveals that (1) Among the activated experts, some show clear domain preferences, while others exert strong causal influence on model performance, underscoring their decisive roles. (2) tokens occurring earlier in a sentence are more likely to trigger the driver experts, and (3) adjusting the weights of domain and driver experts leads to significant performance gains across all three models and domains. These findings shed light on the internal mechanisms of MoE models and enhance their interpretability.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。