arXiv:2605.26647cs.LGcs.AI2026-05被引 3

让每个输入词的激活函数自适应变化,提升大模型表达能力。

More Expressive Feedforward Layers: Part I. Token-Adaptive Mixing of Activations

  • 用轻量门控混合多种激活函数,实现逐词自适应非线性变换。
  • 在0.12B到2B参数模型上,训练终了损失更低,且扩展性更好。
  • 适合追求高表达力的Transformer模型改进,尤其适合密集和MoE结构。

Transformer架构的大语言模型中,前馈网络(FFN)占据大量参数与非线性表达能力。尽管从ReLU、GELU演进到SwiGLU等门控变体,多数设计仍使用单一固定激活函数,对所有输入词应用相同非线性变换。本文提出激活函数混合(MoA),通过轻量级输入依赖门控,在共享线性投影的前提下,动态混合激活函数字典。作为无输入依赖的对应方案,还引入可学习激活(LA),对ReLU型和SwiGLU型FFN均构造激活函数的线性组合。理论上,建立有限宽度下固定激活FFN、LA与MoA之间的严格表达分离:LA严格包含固定激活FFN,MoA又严格包含LA,额外表达力源于输入依赖的非线性混合作用。实验上,我们在0.12B至2B参数的密集与MoE语言模型上,涵盖不同词元预算、优化器与学习率调度,进行广泛预训练验证。结果表明,MoA始终取得更低终端损失,并展现出更优的缩放行为,且参数与计算开销极低。结果说明,令牌自适应激活混合是提升大模型前馈层表达力的一种简单而有效机制。

原文摘要 · Abstract (English)

Feedforward network (FFN) layers account for a large fraction of parameters and nonlinear expressivity in Transformer-based large language models (LLMs). Despite the evolution from ReLU and GELU to gated variants such as SwiGLU, most FFN designs still use a single fixed activation function, applying the same nonlinear transformation to all tokens. In this work, we propose Mixture of Activations (MoA), a token-adaptive FFN design that mixes a dictionary of activation functions using lightweight input-dependent gates while sharing the same linear projections. As an input-independent counterpart, we also introduce learnable activations (LA), which form linear combinations of activation functions for both ReLU-type and SwiGLU-type FFNs. Theoretically, we establish strict finite-width expressive separations among fixed-activation FFNs, LA, and MoA: LA strictly contains fixed-activation FFNs, while MoA strictly contains LA, with the additional expressivity arising from input-dependent nonlinear hybridization. Empirically, we evaluate MoA through extensive pre-training experiments on dense and MoE language models ranging from 0.12B to 2B parameters under different token budgets, optimizers, and learning rate schedules. MoA consistently achieves lower terminal loss and exhibits more favorable scaling behavior than well-tuned baselines, with minimal parameter and computational overhead. These results suggest that token-adaptive activation mixing is a simple and effective mechanism for improving FFN expressivity in LLMs.

前馈网络激活函数自适应混合LLM优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。