2025-06-05 · 进阶 · 机器学习 · 自然语言处理

Rectified Sparse Attention

该论文提出了Rectified Sparse Attention (ReSA)方法,通过结合块稀疏注意力和周期性密集校正,实现了高效的长序列生成。

更新于 2025-06-06。作者:Yutao Sun、Tianzhu Ye、Li Dong、Yuqing Xia、Jian Chen、Yizhao Gao、Shijie Cao、Jianyong Wang、Furu Wei。

中文摘要

高效的长序列生成对于大型语言模型来说是一个关键的挑战。尽管最近的稀疏解码方法提高了效率,但它们却受到KV缓存错位的问题,其中近似误差累积并降低了生成质量。在这项工作中,我们提出了修正稀疏注意力(ReSA),这是一种简单而有效的方法,它结合了块稀疏注意力与周期性密集修正。通过使用密集正向传递在固定间隔刷新KV缓存,ReSA限制了误差累积并保持了与预训练分布的对齐。在数学推理、语言建模和检索任务上的实验表明,ReSA在显著提高效率的同时,实现了近乎无损的生成质量。值得注意的是,在256K序列长度的解码中,ReSA提供了高达2.42倍的端到端加速,使其成为可扩展长上下文推理的实用解决方案。代码可在https://aka.ms/ReSA-LM获取。

英文摘要

Efficient long-sequence generation is a critical challenge for Large Language Models. While recent sparse decoding methods improve efficiency, they suffer from KV cache misalignment, where approximation errors accumulate and degrade generation quality. In this work, we propose Rectified Sparse Attention (ReSA), a simple yet effective method that combines block-sparse attention with periodic dense rectification. By refreshing the KV cache at fixed intervals using a dense forward pass, ReSA bounds error accumulation and preserves alignment with the pretraining distribution. Experiments across math reasoning, language modeling, and retrieval tasks demonstrate that ReSA achieves near-lossless generation quality with significantly improved efficiency. Notably, ReSA delivers up to 2.42times end-to-end speedup under decoding at 256K sequence length, making it a practical solution for scalable long-context inference. Code is available at https://aka.ms/ReSA-LM.

解读

一句话总结

该论文提出了Rectified Sparse Attention (ReSA)方法,通过结合块稀疏注意力和周期性密集校正,实现了高效的长序列生成。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt