arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.21377cs.LG
收藏

控制注意力logits的变化

Controlling changes to attention logits

University of Bristol(布里斯托大学);Mistral AI

Ben Anson, Laurence Aitchison

AI总结:

本文提出通过控制logits的变化来提高transformer模型的稳定性,采用参数依赖的学习率策略,在MLA设置中优于其他方法并达到与QK norm相当的性能。

摘要:

神经网络权重的稳定性在训练transformer模型时至关重要。查询和键权重尤其成问题,因为它们倾向于在没有干预的情况下变得很大。对查询和键应用归一化,称为`QK norm`,在实践中解决了稳定性问题,但并不总是适用。例如,QK norm与多潜在注意力(MLA)不兼容,因为QK norm要求在推理过程中完全材料化查询和键,而MLA并不这样做。在本文中,我们建议控制logits的变化对稳定性很重要。我们显示这些变化可以通过为查询和键权重分配参数依赖的学习率来控制。我们发现,这种廉价的干预使我们能够提高网络的基础学习率,在MLA设置中优于其他方法,并在使用多头注意力时达到与QK norm相竞争的性能。

英文摘要:

Stability of neural network weights is critical when training transformer models. The query and key weights are particularly problematic, as they tend to grow large without any intervention. Applying normalization to queries and keys, known as `QK norm', fixes stability issues in practice, but is not always applicable. For example, QK norm is not compatible with Multi Latent Attention (MLA) because QK norm requires full materialization of queries and keys during inference, which is not done in MLA. In this paper we suggest that controlling the changes to logits is important for stability. We show that these changes are controllable by assigning parameter-dependent learning rates to the query and key weights. We find that our cheap intervention allows us to increase the base learning rate of the network, outperform other methods in the MLA setting, and achieve performance competitive with QK norm when using Multi-head Attention.

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

↑