arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.05927stat.MLcs.LG
收藏

Transformer 诞生时的偏见:随机初始化下的结构归纳偏见及其实际影响

Transformers Are Born Biased: Structural Inductive Biases at Random Initialization and Their Practical Consequences

The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳));National University of Singapore(新加坡国立大学)

Siquan Li, Yao Tong, Haonan Wang, Tianyang Hu

AI总结:

研究揭示了随机初始化的 Transformer 存在结构偏见,通过 SeedPrint 方法区分初始化差异的模型,并解释了注意力机制导致的汇现象。

摘要:

Transformer 构成了现代大型语言模型(LLMs)的基础,并且通常被认为在随机初始化时行为无结构,所有有意义的偏好只有在大规模训练后才会出现。我们通过展示随机初始化的 Transformer 已经表现出强烈且系统的结构偏见来挑战这一假设。特别是,未经训练的模型显示出极端的 token 偏好:在随机输入序列中,某些 token 被预测的概率比其他 token 高几个数量级。我们通过分解 Transformer 架构在初始化时的机制来解释这一现象。我们展示出极端 token 偏好源于 token 表示在随机种子依赖方向上的收缩。这种收缩由两个相互作用的力驱动:(i)MLP 子层中的非对称非线性激活导致全局(跨序列)表示集中,(ii)自注意力进一步通过局部(内序列)聚合放大这一效应。这些机制共同作用,使隐藏表示沿着仅由随机初始化决定的方向对齐,产生高度非均匀的下一个 token 预测。除了机制性的洞察,我们还证明这些初始化引起的偏见在整个训练过程中持续存在,形成稳定且内在的模型身份。利用这一特性,我们引入了 SeedPrint,一种指纹方法,能够可靠地区分仅在随机初始化上略有不同的模型,即使在经过大量训练和显著分布变化的情况下。最后,我们识别出注意力机制的内序列收缩固有的基本位置差异,这种差异与注意力汇现象有因果联系。这一发现为汇现象的出现提供了系统性的解释,并为控制汇现象提供了途径。

英文摘要:

Transformers underpin modern large language models (LLMs) and are commonly assumed to be behaviorally unstructured at random initialization, with all meaningful preferences emerging only through large-scale training. We challenge this assumption by showing that randomly initialized transformers already exhibit strong and systematic structural biases. In particular, untrained models display extreme token preferences: across random input sequences, certain tokens are predicted with probabilities orders of magnitude larger. We provide a mechanistic explanation for this phenomenon by dissecting the transformer architecture at initialization. We show that extreme token preference arises from a contraction of token representations along a random seed-dependent direction. This contraction is driven by two interacting forces: (i) asymmetric nonlinear activations in MLP sublayers induce global (inter-sequence) representation concentration, and (ii) self-attention further amplifies this effect through local (intra-sequence) aggregation. Together, these mechanisms align hidden representations along a direction determined solely by the random initialization, producing highly non-uniform next-token predictions. Beyond mechanistic insight, we demonstrate that these initialization-induced biases persist throughout training, forming a stable and intrinsic model identity. Leveraging this property, we introduce SeedPrint, a fingerprinting method that can reliably distinguish models that differ only in their random initialization, even after extensive training and under substantial distribution shift. Finally, we identify a fundamental positional discrepancy inherent to the attention mechanism's intra-sequence contraction that is causally linked to the attention-sink phenomenon. This discovery provides a principled explanation for the emergence of sinks and offers a pathway for their control.

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

↑