arXiv:2504.18929cs.LGcs.AI2025-04被引 1

发现Transformer在压缩数据时会主动选择低熵分布,且越大的模型越明显。

Revisiting Transformers through the Lens of Low Entropy and Dynamic Sparsity

  • 通过熵与动态稀疏性视角,揭示Transformer的内在压缩偏好
  • 大模型更倾向低熵分布,注意力计算被残差连接绕过,活跃神经元比例下降
  • 训练不稳与死神经元激增相关,适用于理解大模型压缩机制

压缩是理解Transformer成功的关键视角。以往通常以目标分布为标准评估压缩效果,但因目标分布未知且熵计算成本呈指数增长,难以精确衡量模型压缩程度及学习分布与目标分布的信息差异。本文在受控实验中发现,Transformer表现出独特的归纳偏置:在逼近目标分布的同时,更倾向于学习更低熵的分布,且该倾向随模型规模增大而增强,导致其进一步压缩信息内容,无法完全对齐目标分布。此外,我们发现前馈网络(FFN)模块在驱动这一偏置中起关键作用。尽管模型能消除数据中的冗余信息,其参数内部也存在冗余,可由动态稀疏性刻画。更大规模的Transformer表现出更强的绕过注意力计算倾向,活跃神经元比例更低。有趣的是,大模型训练不稳定性与死神经元突然增加显著相关。本工作从熵与动态稀疏性角度深化了对Transformer的理解。

原文摘要 · Abstract (English)

Compression has been a critical lens to understand the success of Transformers. In the past, we have typically taken the target distribution as a criterion to evaluate a model's compression performance. Nevertheless,it often remains challenging to precisely assess how well the model achieves compression and to compare the information content of the learned distribution with that of the target distribution during compression,as the target distribution is typically unknown and entropy computation often incurs exponential cost. In this work, we explore these issues under a controlled experimental setup. We find that Transformers exhibit a unique inductive bias in data compression: beyond approaching the target distribution, they tend to favor learning lower-entropy distributions, with this tendency becoming more pronounced as the model size increases. This preference prevents Transformers from perfectly aligning with the target distribution, instead further compressing its information content. Furthermore, we show that the FFN module plays a critical role in driving this bias. In addition, while models remove informational redundancy from data during compression, they also exhibit redundancy within their parameters, which enables compression and can be characterized through dynamic sparsity. However, the dynamic sparsity patterns in Transformers, particularly in attention and FFN modules, demand further exploration. As for this, we show that larger Transformers show stronger preferences for bypassing attention computations via residual connections and have lower proportion of active neurons. Interestingly, we also find that training instability in larger models strongly correlates with sudden increases in dead neurons. Our work contributes to a deeper understanding of Transformers from the lens of entropy and dynamic sparsity.

Transformer熵分析动态稀疏性模型压缩

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