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

注意力的耦合查询-键动态

Invertible Query-Key Coupling Composes with Attention Mechanisms

Technion – Israel Institute of Technology(以色列理工学院);ISTA – Institute of Science and Technology Austria(奥地利科学技术研究所)

Barak Gahtan, Alex M. Bronstein

AI总结:

本文提出耦合QK动态机制,通过共享学习动态改进语言模型 perplexity 和训练稳定性,在WikiText-103上取得显著提升,且在不同数据集上表现出差异性效果。

摘要:

标准缩放点积注意力通过静态独立投影计算得分。本文展示通过共享学习动态联合演化查询和键,在得分前进行耦合QK动态,能提升语言模型perplexity和训练稳定性。在WikiText-103上,耦合动态在60M参数下达到22.55-22.62 perplexity,比标准注意力的24.22低6.6-6.9%。结构消融实验表明耦合是关键因素,对称辛和非辛积分器在耦合Q和K时表现相同,而未耦合的MLP基线效果较差。积分步数无关,单步耦合即可。计算匹配比较显示耦合是样本效率机制,标准注意力需更长时间训练但消耗更多token。优势在150M参数下扩大但350M参数下减弱,Differential Attention超越耦合动态。耦合效果依赖于语料,对领域一致文本有效但对异构网络文本效果下降。本文提供了耦合有效和无效的条件,给出实用指导。

英文摘要:

Scaled dot-product attention forms its queries and keys as independent linear projections, so the two never interact before the dot product that scores them. We study coupled query-key dynamics, a pre-scoring transformation that evolves each token's query and key jointly through a shared invertible coupling before standard scoring. We realize it as an alternating affine map in the style of real non-volume-preserving flows: the coupling is the identity at initialization, adds a small fraction of parameters per head, and leaves the softmax and surrounding architecture unchanged. We place coupling on top of existing attention methods rather than replacing them, and ask whether that composition helps. On WikiText-103, adding coupling to Differential Attention improves on it at both 150M and 455M parameters. At 455M the gain is significant at sequence length 512 (p=0.003, six seeds), survives a Bonferroni correction and replicates on a held-out test split; it also holds across rotary-embedding training lengths 512, 1024, and 2048. The same additive direction appears when coupling is added to query-key normalization (significant at 150M) and Multi-Token Attention (directional). Matched controls attribute the gain to the joint pre-scoring coupling rather than to added capacity, and show that removing the invertibility guarantee preserves the 455M gain yet is far worse than the base method at 150M, so invertibility is what makes the coupling reliable across scales. On its own, coupling lowers perplexity at 60M and 150M (one-sided Welch tests, p<0.05) but the gain narrows with scale and is not significant at 455M. We relate the construction to the expressivity of coupling flows, use an associative-recall study to map where coupling helps and where it degrades sharp retrieval, and conclude that coupling is most useful in composition with a scoring-stage method rather than as a standalone change.

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

↑