arXiv:2607.20214cs.LGcs.AI2026-07

ELSSA通过稀疏与低秩联合近似,让Transformer处理更长序列而不损失精度。

ELSAA: Efficient Low-Rank and Sparse Attention Approximation for Training Transformers

  • 将注意力分数矩阵拆分为稀疏高相似项与低秩全局项并行计算
  • 避免显式构造全量二次矩阵,节省内存且支持长序列训练
  • 适合需要长上下文建模的NLP任务,如文档生成与摘要

Transformer中的 $N\times N$ 二次注意力分数矩阵仍是扩展输入长度的核心瓶颈。现有方法通常通过引入稀疏性(每个查询仅关注少量键)或使用低秩/核映射(将全局交互压缩到低维表示)来缓解。本文提出 ELSAA,一种高效的低秩与稀疏注意力近似方法。关键在于:不将Transformer的投影或输出矩阵分解为稀疏与低秩形式;而是对密集投影后的 $Q,K,V$ 所诱导的注意力分数算子进行近似:稀疏分支捕捉高相似度局部交互,低秩分支总结扩散的全局交互。由于两分支归一化时分母质量差异大,ELSAA引入一个分母感知融合项,按稀疏分支相对低秩分支的估计注意力质量进行缩放。该框架无需显式构建完整的二次分数矩阵,既保留了细粒度的标记级交互,又实现广域上下文混合,支持更长上下文训练。

原文摘要 · Abstract (English)

The quadratic $N\times N$ attention score matrix remains a central obstacle to extending Transformers to longer input lengths. Existing efficient attention methods usually reduce this bottleneck by either imposing sparsity, so that each query attends to only a small subset of keys, or by using low-rank/kernel sketches, so that global interactions are compressed into a lower-dimensional representation. We propose \emph{ELSAA}, an efficient low-rank and sparse approximation of attention. Importantly, ELSAA does \emph{not} decompose the learned projection or output matrices of the Transformer into sparse and low-rank factors. Instead, after dense projections produce $Q,K,V$, ELSAA approximates the induced attention score operator itself: a sparse branch captures selected high-similarity interactions, while a low-rank branch summarizes diffuse global interactions. Since the two branches can be normalized over supports with very different denominator mass, ELSAA introduces a denominator-aware fusion term that scales the sparse branch according to its estimated attention mass relative to the low-rank branch. This gives a practical framework for constructing low-rank and sparse attention outputs without materializing the full quadratic score matrix, aiming to enable longer-context training while preserving both sharp token-level interactions and broad contextual mixing.

注意力机制Transformer长序列

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