arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2605.09403cs.LGcs.AIcs.NE
收藏

稀疏性推动计算:FFN架构如何重塑小规模Transformer中的注意力

Sparsity Moves Computation: How FFN Architecture Reshapes Attention in Small Transformers

University of Michigan(密歇根大学)

Gabriel Smithline, Chris Mascioli

AI总结:

研究通过单层Transformer在数字加法、模运算和直方图计数中发现,稀疏MoE路由将计算从FFN转移到注意力,且GLU门控旋转任务相关傅里叶结构至分布式子空间。

摘要:

Transformer前馈网络(FFN)块内的架构选择不仅影响自身,还重塑模型其余部分学习的计算。我们研究了单层Transformer在数字加法、模运算和直方图计数中的效果。比较密集FFN、门控线性单元(GLUs)、专家混合(MoE)和MoE-GLUs发现,稀疏MoE路由可将计算从FFN转移到注意力,且在基于进位的加法中效果最显著。我们分解了这种重新分布为减少每token的FFN容量和专家间的稀疏分区。关键发现,冻结随机路由几乎匹配学习路由,表明重新分布主要由架构稀疏性而非路由学习专精驱动。次要发现,GLU风格乘法门控将任务相关傅里叶结构从神经元基底旋转至分布式子空间,使神经元层面可解释性信息减少但保留结构化计算。我们通过随机路由、窄FFN、Top-2 MoE控制及参数匹配、激活函数和宽度缩放分析验证结论。这些结果表明,局部FFN设计选择对Transformer计算有非局部影响。

英文摘要:

Architectural choices inside the Transformer feedforward network (FFN) block do not merely affect the block itself; they reshape the computations learned by the rest of the model. We study this effect in one-layer Transformers trained on digit addition with carry, modular arithmetic, and histogram counting. Comparing dense FFNs, gated linear units (GLUs), mixture-of-experts (MoE), and MoE-GLUs, we find that sparse MoE routing can shift computation from FFN to attention, with the strongest ablation-visible effect on carry-based addition. We decompose this redistribution into reduced per-token FFN capacity and sparse partitioning across experts. Critically, frozen random routing nearly matches learned routing, suggesting that redistribution is driven largely by architectural sparsity rather than router-learned specialization. As a secondary finding, GLU-style multiplicative gating rotates task-relevant Fourier structure out of the per-neuron basis and into distributed subspaces, making neuron-level interpretability less informative while preserving structured computation. We validate these conclusions with random-routing, narrow-FFN, and top-2 MoE controls, plus parameter-matching, activation-function, and width-scaling analyses. Together, these results show that local FFN design choices can have nonlocal consequences for Transformer computation.

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

↑