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

查询、键、值权重可能已经足够:关于自注意力变换器中查询、键、值权重三元组必要性的探讨

Key and Value Weights Are Probably All You Need: On the Necessity of the Query, Key, Value weight Triplet in Self-Attention Transformers

Institut de Recherche Mathématique Avancée (IRMA), Université de Strasbourg(先进数学研究院(IRMA),斯特拉斯堡大学)

Marko Karbevski, Antonij Mijoski

AI总结:

本文探讨了在仅编码器和仅解码器变换器中是否可以减少查询、键、值权重三元组。理论证明在弱假设下,其中一个权重可被身份矩阵替代,减少25%的注意力参数。实验表明,移除查询权重可提升性能,同时揭示了结构表达性边界。

摘要:

我们理论地探讨了在仅编码器和仅解码器变换器中是否可以减少查询、键、值权重三元组。在弱假设下,我们证明其中一个查询、键或值权重是冗余的,可以被身份矩阵替代,减少25%的注意力参数。如果应用于查询或键权重,这也将简化优化:注意力logits依赖于一个学习的权重矩阵,而不是两个矩阵的乘积。在解码器-only GPT式的小模型上验证移除查询权重,我们发现减少的模型在较少参数的情况下匹配基线性能,并且在重新分配参数时优于基线。我们的分析还导致了结构表达性边界:在数学上可处理的ReLU设置中,跳跃连接推动MLPs进入一个在固定宽度下普遍不相交的功能类别。这些发现促使在不同模态和大规模情况下进行调查,其中观察到的稳定性和效率提升可能最为重要。

英文摘要:

We theoretically investigate whether the Query, Key, Value weight triplet can be reduced in encoder-only and decoder-only transformers. Under mild assumptions, we prove that one of the Query, Key or Value weights are redundant and can be replaced with the identity matrix, reducing attention parameters by 25\%. If applied to the Query or Key weights, this also simplifies optimization: attention logits depend on a single learned weight matrix rather than on a product of two. Validating the Query weight removal on decoder-only GPT-style small models trained from scratch, we find that reduced models match baseline performance despite fewer parameters, and outperform baselines when saved parameters are reallocated. Our analysis has also led us to a structural expressivity boundary: in the mathematically tractable ReLU setting, skip connections push MLPs into a generically disjoint function class at fixed width. These findings motivate investigation across modalities and at scale, where the observed stability and efficiency gains may prove most consequential.

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

↑