Sparse attention reduces the quadratic complexity of full self-attention but faces two challenges: (1) an attention gap, where applying sparse attention to full-attention-trained models causes performance degradation due to train-inference distribution mismatch, and (2) a capability gap, where models trained purely with sparse attention lack complete gradient flow, preventing them from matching full-attention performance. We propose SSA (Sparse Sparse Attention), a training framework that integrates both sparse and full attention with bidirectional attention-output alignment. We prove that the approximation error scales linearly with the attention mass dropped under sparse attention, and show that SSA's alignment objective substantially reduces this quantity compared to baselines. Experiments demonstrate that SSA achieves state-of-the-art performance under both inference modes, adapts smoothly to varying sparsity budgets, and demonstrates superior long-context capabilities. The code is available at https://github.com/zhenyi4/ssa.


翻译:稀疏注意力降低了完整自注意力的二次复杂度,但仍面临两个挑战:(1) 注意力间隙:将稀疏注意力应用于完整注意力训练的模型时,由于训练-推理分布不匹配会导致性能下降;(2) 能力间隙:仅用稀疏注意力训练的模型缺乏完整的梯度流,使其无法达到完整注意力的性能。我们提出SSA(稀疏稀疏注意力),一种通过双向注意力输出对齐来整合稀疏与完整注意力的训练框架。我们证明了近似误差随稀疏注意力丢弃的注意力质量呈线性增长,并表明与基线方法相比,SSA的对齐目标能显著降低该误差量。实验表明,SSA在两种推理模式下均达到最先进的性能,能平滑适应不同的稀疏度预算,并展现出卓越的长上下文处理能力。代码发布于 https://github.com/zhenyi4/ssa。

0
下载
关闭预览

相关内容

TransMLA:多头潜在注意力(MLA)即为所需
专知会员服务
23+阅读 · 2025年2月13日
最新「注意力机制」大综述论文,66页pdf569篇文献
专知会员服务
210+阅读 · 2021年4月2日
注意力机制综述
专知会员服务
210+阅读 · 2021年1月26日
注意力机制介绍,Attention Mechanism
专知会员服务
172+阅读 · 2019年10月13日
稀疏大模型简述:从MoE、Sparse Attention到GLaM
夕小瑶的卖萌屋
14+阅读 · 2022年3月22日
注意力机制综述(中文版)
专知
23+阅读 · 2021年1月26日
干货!自然语言处理中的自注意力机制!
全球人工智能
11+阅读 · 2018年3月27日
深度学习中的注意力机制
CSDN大数据
24+阅读 · 2017年11月2日
神经网络中的「注意力」是什么?怎么用?
北京思腾合力科技有限公司
17+阅读 · 2017年10月28日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Arxiv
0+阅读 · 2月12日
VIP会员
相关资讯
稀疏大模型简述:从MoE、Sparse Attention到GLaM
夕小瑶的卖萌屋
14+阅读 · 2022年3月22日
注意力机制综述(中文版)
专知
23+阅读 · 2021年1月26日
干货!自然语言处理中的自注意力机制!
全球人工智能
11+阅读 · 2018年3月27日
深度学习中的注意力机制
CSDN大数据
24+阅读 · 2017年11月2日
神经网络中的「注意力」是什么?怎么用?
北京思腾合力科技有限公司
17+阅读 · 2017年10月28日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员