arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2605.26647cs.LGcs.AIstat.ML
收藏

更具表达力的前馈层:第一部分。激活的令牌自适应混合

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

Peking University(北京大学)

Mingze Wang, Jinbo Wang, Yikuan Xia, Kai Shen, Shu Zhong

AI总结:

提出令牌自适应激活混合(MoA)和可学习激活(LA)方法,通过轻量级输入相关门混合多个激活函数,在理论和实验上证明其比固定激活FFN具有更强的表达能力和更优的缩放行为。

摘要:

前馈网络(FFN)层在基于Transformer的大语言模型(LLMs)中占据了大部分参数和非线性表达能力。尽管从ReLU和GELU发展到门控变体如SwiGLU,大多数FFN设计仍使用单一固定激活函数,对所有令牌应用相同的非线性变换。在这项工作中,我们提出了激活混合(MoA),一种令牌自适应的FFN设计,它使用轻量级输入相关门混合一个激活函数字典,同时共享相同的线性投影。作为输入无关的对应,我们还引入了可学习激活(LA),它为ReLU型和SwiGLU型FFN形成激活函数的线性组合。理论上,我们在固定激活FFN、LA和MoA之间建立了严格的有限宽度表达分离:LA严格包含固定激活FFN,而MoA严格包含LA,额外的表达能力来自于输入相关的非线性混合。实验上,我们通过在不同令牌预算、优化器和学习率调度下,对0.12B到2B参数的密集和MoE语言模型进行广泛的预训练实验来评估MoA。与调整良好的基线相比,MoA始终获得更低的最终损失,并表现出更有利的缩放行为,且参数和计算开销极小。这些结果表明,令牌自适应激活混合是提高LLMs中FFN表达能力的一种简单而有效的机制。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑