arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2604.22583cs.LG
收藏

自适应头预算用于高效多头注意力

Adaptive Head Budgeting for Efficient Multi-Head Attention

LIPN, Université Paris 13(巴黎第十三大学LIPN实验室);Université Paris 13(巴黎第十三大学);Université de Versailles Saint-Quentin-en-Yvelines(巴黎- Versailles 巴黎-圣昆丁-埃夫里大学)

Bilal Faye, Abdoulaye Mbaye, Hanane Azzag, Mustapha Lebbah

AI总结:

提出BudgetFormer,通过动态分配注意力头预算和相关性分布,在文本分类任务中减少计算和内存开销,同时保持或提升性能。

摘要:

多头注意力使Transformer能够捕获多样化的表示,但无论任务复杂度如何,通常每个输入都会激活所有注意力头。对于粗粒度任务(如文本分类),相关信息通常是全局性的,这种固定分配会引入不必要的计算。我们提出BudgetFormer,一种基于每个输入动态分配注意力头的Transformer架构。该模型学习头预算和相关性分布,以选择信息量最大的头。为了支持有效的头选择,我们引入了一种平衡探索与利用的训练策略。在文本分类任务上的实验表明,BudgetFormer减少了FLOPs和内存使用,同时匹配或超越了标准多头注意力的性能。这些结果突显了自适应头分配作为提高Transformer效率和性能的有效方法。

英文摘要:

Multi-head attention enables Transformers to capture diverse representations, but all attention heads are typically activated for every input, regardless of task complexity. For coarse-grained tasks such as text classification, where relevant information is often global, this fixed allocation can introduce unnecessary computation. We propose BudgetFormer, a Transformer architecture that dynamically allocates attention heads on a per-input basis. The model learns both a head budget and a relevance distribution to select the most informative heads. To support effective head selection, we introduce a training strategy that balances exploration and exploitation. Experiments on text classification tasks show that BudgetFormer reduces FLOPs and memory usage while matching or surpassing the performance of standard multi-head attention. These results highlight adaptive head allocation as an effective approach to improving Transformer efficiency and performance.

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

↑