arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.09245cs.LGcs.CL
收藏

你并未充分利用Transformer的表示能力

You Do Not Fully Utilize Transformer's Representation Capacity

T-Tech;Moscow Institute of Physics and Technology(莫斯科物理技术学院);HSE University(俄罗斯高等经济大学)

Gleb Gerasimov, Yaroslav Aksenov, Nikita Balagansky, Viacheslav Sinii, Daniil Gavrilov

AI总结:

该研究针对标准Transformer仅依赖前层隐藏状态导致表示崩溃的问题,提出层集成记忆(LIMe)方法,通过整合前层表示提升了多任务性能,且未增加隐藏状态大小。

摘要:

与将历史信息压缩为单个隐藏状态的循环神经网络(RNN)不同,Transformer能够直接关注所有过去的token。然而,标准Transformer仅依赖前一层的隐藏状态来表示整个上下文。我们表明,这种设计会导致表示崩溃的压力,并可能降低性能。为解决该问题,我们引入层集成记忆(LIMe),这是一种轻量级扩展方法,利用现有的键值缓冲区并学习每头、每一层的路由权重,以整合来自前层的表示。在语言建模、合成推理和深度架构任务中,LIMe在研究范围内提升了每浮点运算的困惑度,并在合成任务上取得显著增益,同时保持更高的价值向量熵和token可分性。最后,学习到的路由权重揭示了局部和长距离特征的系统性复用,表明LIMe如何在不增加隐藏状态大小的情况下丰富注意力时记忆。代码可在此URL获取。

英文摘要:

In contrast to RNNs, which compress their history into a single hidden state, Transformers can attend to all past tokens directly. However, standard Transformers rely solely on the hidden state from the previous layer to represent the entire context. We show that this design creates pressure toward representation collapse and can degrade performance. To address this issue, we introduce Layer-Integrated Memory (LIMe), a lightweight extension that leverages existing key-value buffers and learns per-head, per-layer routing weights to integrate representations from previous layers. Across language modeling, synthetic reasoning, and deep architectures, LIMe improves perplexity per FLOP in the studied regimes and yields strong gains on synthetic tasks while preserving higher value-vector entropy and token separability. Finally, learned routing weights reveal systematic reuse of local and long-distance features, showing how LIMe enriches attention-time memory without increasing hidden-state size. Code is available at https://github.com/corl-team/lime.

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

↑