系统梳理高效注意力机制,助力大模型长文本处理
Efficient Attention Mechanisms for Large Language Models: A Survey
- 分线性与稀疏两类方法,降低注意力计算开销
- 实现线性复杂度,支持长序列高效推理
- 适合关注大模型部署效率的研究者与工程师
基于Transformer的架构已成为大语言模型的主流骨干。然而,自注意力机制固有的二次时间与内存复杂度,仍是长上下文建模的主要障碍。为解决此问题,近期研究提出了两类主要的高效注意力机制:线性注意力通过核近似、递归形式或快速权重动态实现线性复杂度,从而降低计算开销;稀疏注意力则基于固定模式、分块路由或聚类策略,仅对部分标记进行计算,兼顾效率与上下文覆盖。本综述系统全面地梳理了这些进展,融合算法创新与硬件层面考量。同时分析了高效注意力在大规模预训练模型中的集成方式,包括完全基于高效注意力的架构及局部与全局组件结合的混合设计。通过理论基础与实际部署策略的对齐,本工作旨在为可扩展、高效的语言模型设计提供基础参考。
原文摘要 · Abstract (English)
Transformer-based architectures have become the prevailing backbone of large language models. However, the quadratic time and memory complexity of self-attention remains a fundamental obstacle to efficient long-context modeling. To address this limitation, recent research has introduced two principal categories of efficient attention mechanisms. Linear attention methods achieve linear complexity through kernel approximations, recurrent formulations, or fastweight dynamics, thereby enabling scalable inference with reduced computational overhead. Sparse attention techniques, in contrast, limit attention computation to selected subsets of tokens based on fixed patterns, block-wise routing, or clustering strategies, enhancing efficiency while preserving contextual coverage. This survey provides a systematic and comprehensive overview of these developments, integrating both algorithmic innovations and hardware-level considerations. In addition, we analyze the incorporation of efficient attention into largescale pre-trained language models, including both architectures built entirely on efficient attention and hybrid designs that combine local and global components. By aligning theoretical foundations with practical deployment strategies, this work aims to serve as a foundational reference for advancing the design of scalable and efficient language models.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。