arXiv:2511.09596cs.LG2025-11AAAI被引 5

通过结构化稀疏设计,让多头注意力既快又准。

Making Every Head Count: Sparse Attention Without the Speed-Performance Trade-off

论文配图:Making Every Head Count: Sparse Attention Without the Speed-Performance Trade-off
图 1 · 摘自论文原文
  • 将多头注意力重组为分段协作计算,避免重复运算。
  • 理论复杂度从O(H N²)降至O(N²),提速可达H倍。
  • 适合追求高效高精度大模型的架构设计者。

大型语言模型的注意力机制长期受限于核心计算复杂度O(H N²),随上下文长度N和注意力头数H增长而急剧上升。现有稀疏方法常以牺牲信息完整性换取效率。本文提出SPAttention,引入一种系统性结构稀疏范式:将总注意力任务按距离带划分成互不重叠的平衡区块,每个头负责唯一一段。该设计使原本H个独立的O(N²)计算,转化为单一协同的O(N²)计算,理论复杂度降低H倍。结构化先验促使各头功能分化,实现计算资源从冗余建模向全局依赖的高效分配。实验表明,精心设计的结构稀疏可同时提升效率与性能,为下一代高性能大模型架构开辟新路径。

原文摘要 · Abstract (English)

The design of Large Language Models (LLMs) has long been hampered by a fundamental conflict within their core attention mechanism: its remarkable expressivity is built upon a computational complexity of O(H N^2) that grows quadratically with the context size (N) and linearly with the number of heads (H). This standard implementation harbors significant computational redundancy, as all heads independently compute attention over the same sequence space. Existing sparse methods, meanwhile, often trade information integrity for computational efficiency. To resolve this efficiency-performance trade-off, we propose SPAttention, whose core contribution is the introduction of a new paradigm we term Principled Structural Sparsity. SPAttention does not merely drop connections but instead reorganizes the computational task by partitioning the total attention workload into balanced, non-overlapping distance bands, assigning each head a unique segment. This approach transforms the multi-head attention mechanism from H independent O(N^2) computations into a single, collaborative O(N^2) computation, fundamentally reducing complexity by a factor of H. The structured inductive bias compels functional specialization among heads, enabling a more efficient allocation of computational resources from redundant modeling to distinct dependencies across the entire sequence span. Our work demonstrates that thoughtfully designed structural sparsity can serve as an effective inductive bias that simultaneously improves both computational efficiency and model performance, opening a new avenue for the architectural design of next-generation, high-performance LLMs.

注意力机制稀疏计算大模型优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。