arXiv:2602.10410cs.LG2026-02被引 1

LUCID注意力机制提升长序列任务表现,解决传统注意力泛化问题。

LUCID: Attention with Preconditioned Representations

  • 用核空间中键的相似性预处理注意力,增强关键信息聚焦能力。
  • 在128K上下文长度下,多任务测试中最高提升18%准确率。
  • 无需低温调节,避免梯度消失,适合长文本建模场景。

基于Softmax的点积注意力是Transformer的核心组件,支持上下文学习等强大能力。但随着上下文长度增加,Softmax函数会将概率质量分散到无关标记上,导致长序列性能下降。尝试通过降低温度来增强聚焦,又因梯度消失影响可学习性。我们提出LUCID注意力,对注意力概率施加由指数键-键相似性导出的预处理器。该预处理器在再生核希尔伯特空间中最小化键之间的重叠,使查询能准确聚焦于大量键中的重要项,且计算复杂度与标准注意力相同。此外,基于预处理的检索方式避免了低温度需求及由此带来的学习难题。我们在约10亿参数的语言模型上进行验证,评估上下文长度达128K的任务。结果表明,在长上下文检索任务中显著提升,尤其在BABILong、RULER、SCROLLS和LongBench上表现优异。例如,相比标准注意力,LUCID在BABILong上实现最高18%的提升,在RULER多针任务中提升14%。

原文摘要 · Abstract (English)

Softmax-based dot-product attention is a cornerstone of Transformer architectures, enabling remarkable capabilities such as in-context learning. However, as context lengths increase, a fundamental limitation of the softmax function emerges: it tends to diffuse probability mass to irrelevant tokens degrading performance in long-sequence scenarios. Furthermore, attempts to sharpen focus by lowering softmax temperature hinder learnability due to vanishing gradients. We introduce LUCID Attention, an architectural modification that applies a preconditioner to the attention probabilities. This preconditioner, derived from exponentiated key-key similarities, minimizes overlap between the keys in a Reproducing Kernel Hilbert Space, thus allowing the query to focus on important keys among large number of keys accurately with same computational complexity as standard attention. Additionally, LUCID's preconditioning-based approach to retrieval bypasses the need for low temperature and the learnability problems associated with it. We validate our approach by training ~1 billion parameter language models evaluated on up to 128K tokens. Our results demonstrate significant gains on long-context retrieval tasks, specifically retrieval tasks from BABILong, RULER, SCROLLS and LongBench. For instance, LUCID achieves up to 18% improvement in BABILong and 14% improvement in RULER multi-needle performance compared to standard attention.

注意力机制长序列Transformer检索

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