你的Transformer能同时持有两种想法:LLM中线性叠加的证据

·

研究论文 · 2026/09/25

尽管大型语言模型(LLM)依赖高度非线性的组件,但本研究表明它们表现出基本的线性:当来自不同文本流的输入被线性组合时,模型输出是各个下一词元分布的叠加。我们称之为叠加线性假设。我们提供证据表明叠加是Transformer架构的固有属性,而非训练涌现的结果;事实上,我们观察到随着预训练进展,它趋于减弱。然而,我们证明通过轻量级微调可以大幅恢复线性,显著减小预测的下一词元分布与各个下一词元分布平均值之间的差异。最后,我们引入一种引导解码过程,解耦叠加输出,从而能够从单次前向传播中同时生成两个连贯的续写。

该研究揭示了Transformer架构中一个反直觉的线性特性,挑战了对其非线性本质的传统认知,并为高效多任务生成提供了新思路。

While Large Language Models (LLMs) rely on highly non-linear components, in this work we demonstrate that they exhibit fundamental linearity: when inputs from distinct text streams are linearly combined, the model outputs a superposition of the individual next-token distributions. We term this the Superposition Linearity Hypothesis. We provide evidence that superposition is an intrinsic property of the Transformer architecture rather than an emergent consequence of training; in fact, we observe that it tends to diminish as pretraining progresses. However, we demonstrate that linearity can be substantially restored through lightweight fine-tuning, significantly reducing the divergence between the predicted next-token distribution and the average of the individual next-token distributions. Finally, we introduce a guided decoding procedure that disentangles superposed outputs, enabling the simultaneous generation of two coherent continuations from a single forward pass.

阅读原文

参与讨论