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

Tucker Attention: 多头自注意机制近似机制的推广

Tucker Attention: A generalization of approximate attention mechanisms

Otto von Guericke University Magdeburg(奥托·冯·格里克大学马格德堡);Max Planck Institute for Dynamics of Complex Technical Systems(马克斯·普朗克复杂技术系统动力学研究所);Norwegian University of Life Sciences(挪威生命科学大学);Oak Ridge National Laboratory(橡树岭国家实验室)

Timon Klein, Jonas Kusch, Sebastian Sager, Stefan Schnake, Steffen Schotthöfer

AI总结:

本文提出Tucker Attention,通过改进自注意层的权重对象和分解策略,实现更高效的参数方案,相比GQA和MLA在参数量上更优,并兼容Flash Attention和RoPE。

摘要:

为减少多头自注意(MHA)中自注意机制的内存占用,衍生出多种方法,如分组查询注意力(GQA)和多头潜在注意力(MLA)。这些方法利用嵌入维度或注意力头之间的低秩分解。从经典低秩近似角度看,这些方法非传统,引发关于其实际近似对象及低秩行为解释的问题。本文提出自注意层权重对象的通用视角和分解策略,构建参数高效方案Tucker Attention。Tucker Attention在LLM和ViT测试用例中,相比GQA和MLA在可比验证指标上参数更少。此外,Tucker Attention包含GQA、MLA、MHA为特例,并兼容Flash Attention和RoPE。该策略为MHA、GQA和MLA实际秩提供洞察,并进一步简化MLA。

英文摘要:

The pursuit of reducing the memory footprint of the self-attention mechanism in multi-headed self attention (MHA) spawned a rich portfolio of methods, e.g., group-query attention (GQA) and multi-head latent attention (MLA). The methods leverage specialized low-rank factorizations across embedding dimensions or attention heads. From the point of view of classical low-rank approximation, these methods are unconventional and raise questions of which objects they really approximate and how to interpret the low-rank behavior of the resulting representations. To answer these questions, this work proposes a generalized view on the weight objects in the self-attention layer and a factorization strategy, which allows us to construct a parameter efficient scheme, called Tucker Attention. Tucker Attention requires an order of magnitude fewer parameters for comparable validation metrics, compared to GQA and MLA, as evaluated in LLM and ViT test cases. Additionally, Tucker Attention~encompasses GQA, MLA, MHA as special cases and is fully compatible with flash-attention and rotary position embeddings (RoPE). This generalization strategy yields insights of the actual ranks achieved by MHA, GQA, and MLA, and further enables simplifications for MLA.

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

↑