arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.14760cs.CLcs.AI
收藏

残差连接与因果偏移:揭示变换器中的结构性不一致

Residual Connections and the Causal Shift: Uncovering a Structural Misalignment in Transformers

IMT Atlantique, Lab-STICC, UMR CNRS 6285, Brest, France(IMT Atlantique,Lab-STICC,CNRS 6285研究所,布列塔尼,法国);Sony Europe Ltd. Stuttgart Technology Center, EUREC, Germany(索尼欧洲有限公司,斯图加特技术中心,EUREC,德国)

Jonathan Lys, Vincent Gripon, Bastien Pasdeloup, Axel Marmoret, Lukas Mauch, Fabien Cardinaux, Ghouthi Boukli Hacene

AI总结:

本研究揭示了自回归变换器中残差连接与因果偏移的结构性不一致,并提出基于残差衰减的轻量级缓解方法,通过实验验证其有效性。

摘要:

大型语言模型(LLMs)通过自回归变换器中的因果掩码实现next-token预测,这会产生一种微妙的不一致:残差连接将激活连接到当前token,而监督目标则是下一个token,如果当前token不是最能预测的token,可能会传播不匹配的信息。在本工作中,我们通过解码轨迹和基于相似度的度量在预训练LLMs中经验性地定位这种输入-输出对齐偏移。我们的实验发现,隐藏token表示从输入对齐切换到输出对齐,深入网络内部。受这一观察启发,我们提出了一种轻量级的残差路径缓解方法,基于残差衰减,以固定层干预或可学习的门控机制实现。在多个基准上的实验表明,这些策略缓解了表示不一致并带来了改进,为自回归变换器提供了高效且通用的架构增强。

英文摘要:

Large Language Models (LLMs) are trained with next-token prediction, implemented in autoregressive Transformers via causal masking for parallelism. This creates a subtle misalignment: residual connections tie activations to the current token, while supervision targets the next token, potentially propagating mismatched information if the current token is not the most informative for prediction. In this work, we empirically localize this input-output alignment shift in pretrained LLMs, using decoding trajectories over tied embedding spaces and similarity-based metrics. Our experiments reveal that the hidden token representations switch from input alignment to output alignment deep within the network. Motivated by this observation, we propose a lightweight residual-path mitigation based on residual attenuation, implemented either as a fixed-layer intervention or as a learnable gating mechanism. Experiments on multiple benchmarks show that these strategies alleviate the representation misalignment and yield improvements, providing an efficient and general architectural enhancement for autoregressive Transformers.

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

↑