arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.01468cs.LGstat.ML
收藏

通过专家混合的层次视角探讨门控注意力的统计理论

A Statistical Theory of Gated Attention through the Lens of Hierarchical Mixture of Experts

The University of Texas at Austin(得克萨斯大学奥斯汀分校);Hanoi University of Science and Technology(河内理工大学);Purdue University(普渡大学);Trivita AI

Viet Nguyen, Tuan Minh Pham, Thinh Cao, Tan Dinh, Huy Nguyen, Nhat Ho, Alessandro Rinaldo

AI总结:

本文通过层次混合专家视角,理论分析了门控注意力机制的样本效率优势及其在不同位置的性能差异。

摘要:

自注意力机制极大地促进了Transformer架构的成功,因为它能够从具有长距离依赖的数据中学习。为了提高性能,一种利用多头自注意力中的门控机制的门控注意力模型最近被提出作为有前途的替代方案。门控注意力已被实证证明可以增加标准注意力中低秩映射的表达能力,甚至可以消除注意力sink现象。尽管其有效性,文献中关于门控注意力益处的清晰理论理解仍然缺乏。为填补这一空白,我们严格证明了门控注意力矩阵或多头自注意力矩阵中的每个条目都可以写成层次混合专家。通过将学习重新表述为专家估计问题,我们证明了门控注意力比多头自注意力更具样本效率。特别是,前者只需要多项式数量的数据点来估计一个专家,而后者则需要指数级的数据点才能达到相同估计误差。此外,我们的分析还提供了理论依据,说明当门位于缩放点积注意力或价值图的输出时,门控注意力为何在多头自注意力架构中其他位置时表现更优。

英文摘要:

Self-attention has greatly contributed to the success of the widely used Transformer architecture by enabling learning from data with long-range dependencies. In an effort to improve performance, a gated attention model that leverages a gating mechanism within the multi-head self-attention has recently been proposed as a promising alternative. Gated attention has been empirically demonstrated to increase the expressiveness of low-rank mapping in standard attention and even to eliminate the attention sink phenomenon. Despite its efficacy, a clear theoretical understanding of gated attention's benefits remains lacking in the literature. To close this gap, we rigorously show that each entry in a gated attention matrix or a multi-head self-attention matrix can be written as a hierarchical mixture of experts. By recasting learning as an expert estimation problem, we demonstrate that gated attention is more sample-efficient than multi-head self-attention. In particular, while the former needs only a polynomial number of data points to estimate an expert, the latter requires exponentially many data points to achieve the same estimation error. Furthermore, our analysis also provides a theoretical justification for why gated attention yields higher performance when a gate is placed at the output of the scaled dot product attention or the value map rather than at other positions in the multi-head self-attention architecture.

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

↑