In large language models built upon the Transformer architecture, recent studies have shown that inter-head interaction can enhance attention performance. Motivated by this, we propose Multi-head Explicit Attention (MEA), a simple yet effective attention variant that explicitly models cross-head interaction. MEA consists of two key components: a Head-level Linear Composition (HLC) module that separately applies learnable linear combinations to the key and value vectors across heads, thereby enabling rich inter-head communication; and a head-level Group Normalization layer that aligns the statistical properties of the recombined heads. MEA shows strong robustness in pretraining, which allows the use of larger learning rates that lead to faster convergence, ultimately resulting in lower validation loss and improved performance across a range of tasks. Furthermore, we explore the parameter efficiency of MEA by reducing the number of attention heads and leveraging HLC to reconstruct them using low-rank "virtual heads". This enables a practical key-value cache compression strategy that reduces KV-cache memory usage by 50% with negligible performance loss on knowledge-intensive and scientific reasoning tasks, and only a 3.59% accuracy drop for Olympiad-level mathematical benchmarks.


翻译:基于Transformer架构构建的大语言模型中,近期研究表明头间交互能够提升注意力机制的性能。受此启发,我们提出多头显式注意力(MEA),这是一种简单而有效的注意力变体,能够显式建模跨头交互。MEA包含两个核心组件:头级线性组合模块(HLC),该模块分别对跨头的键向量和值向量应用可学习的线性组合,从而实现丰富的头间通信;以及头级组归一化层,用于对齐重组后头向量的统计特性。MEA在预训练中表现出强大的鲁棒性,允许使用更大的学习率以加速收敛,最终在多个任务上实现更低的验证损失和更优的性能。此外,我们通过减少注意力头数量并利用HLC模块通过低秩“虚拟头”重构它们,探索了MEA的参数效率。这实现了一种实用的键值缓存压缩策略,在知识密集型任务和科学推理任务上以可忽略的性能损失将KV缓存内存使用量降低50%,在奥林匹克级数学基准测试中仅产生3.59%的准确率下降。

0
下载
关闭预览

相关内容

多模态大语言模型遇见多模态情绪识别与推理:综述
专知会员服务
22+阅读 · 2025年10月3日
多模态大型语言模型:综述
专知会员服务
45+阅读 · 2025年6月14日
当持续学习遇上多模态大型语言模型:综述
专知会员服务
32+阅读 · 2025年3月5日
TransMLA:多头潜在注意力(MLA)即为所需
专知会员服务
23+阅读 · 2025年2月13日
《多模态大语言模型视觉提示》综述
专知会员服务
36+阅读 · 2024年9月25日
【ICML2024】通过动态可组合多头注意力改进Transformers
专知会员服务
21+阅读 · 2024年5月17日
深度学习的下一步:Transformer和注意力机制
云头条
56+阅读 · 2019年9月14日
基于关系网络的视觉建模:有望替代卷积神经网络
微软研究院AI头条
10+阅读 · 2019年7月12日
干货!自然语言处理中的自注意力机制!
全球人工智能
11+阅读 · 2018年3月27日
深度学习中的注意力机制
人工智能头条
16+阅读 · 2017年11月2日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
10+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
相关VIP内容
多模态大语言模型遇见多模态情绪识别与推理:综述
专知会员服务
22+阅读 · 2025年10月3日
多模态大型语言模型:综述
专知会员服务
45+阅读 · 2025年6月14日
当持续学习遇上多模态大型语言模型:综述
专知会员服务
32+阅读 · 2025年3月5日
TransMLA:多头潜在注意力(MLA)即为所需
专知会员服务
23+阅读 · 2025年2月13日
《多模态大语言模型视觉提示》综述
专知会员服务
36+阅读 · 2024年9月25日
【ICML2024】通过动态可组合多头注意力改进Transformers
专知会员服务
21+阅读 · 2024年5月17日
相关基金
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
10+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员