arXiv:2507.00449cs.LGcs.CL2025-07NeurIPS被引 4

用稀疏注意力提升状态空间模型的长文本理解能力

Overcoming Long-Context Limitations of State-Space Models via Context-Dependent Sparse Attention

论文配图:Overcoming Long-Context Limitations of State-Space Models via Context-Dependent Sparse Attention
图 1 · 摘自论文原文
  • 提出上下文相关的稀疏注意力机制,解决SSM长程依赖难题
  • 新任务测试表明,传统SSM无法在亚二次复杂度下完成多查询联合回忆
  • HAX模型在真实和合成数据上均超越现有SSM方法

高效建模长序列仍是自然语言处理的关键挑战,因主流Transformer架构的时间复杂度随序列长度呈平方增长。状态空间模型(SSMs)虽提供亚二次解法,但难以有效捕捉长程依赖。本文分析发现,广泛使用的关联回忆任务(仅需回忆单一键对应的值)无法充分反映真实长序列建模的复杂性。为此,提出新任务‘联合回忆’,要求模型在指定上下文中回忆键对应的值。理论证明:SSMs无法在亚二次时间复杂度内解决多查询联合回忆问题。为此,提出结合上下文相关稀疏注意力(CDSA)的解决方案,具备该能力。进一步设计适用于自然语言的局部敏感哈希稀疏键选择(HAX),实验证明其在合成与真实长文本基准上持续优于基线SSM及使用上下文无关稀疏注意力的SSM。

原文摘要 · Abstract (English)

Efficient long-context modeling remains a critical challenge for natural language processing (NLP), as the time complexity of the predominant Transformer architecture scales quadratically with the sequence length. While state-space models (SSMs) offer alternative sub-quadratic solutions, they struggle to capture long-range dependencies effectively. In this work, we focus on analyzing and improving the long-context modeling capabilities of SSMs. We show that the widely used synthetic task, associative recall, which requires a model to recall a value associated with a single key without context, insufficiently represents the complexities of real-world long-context modeling. To address this limitation, we extend the associative recall to a novel synthetic task, \emph{joint recall}, which requires a model to recall the value associated with a key given in a specified context. Theoretically, we prove that SSMs do not have the expressiveness to solve multi-query joint recall in sub-quadratic time complexity. To resolve this issue, we propose a solution based on integrating SSMs with Context-Dependent Sparse Attention (CDSA), which has the expressiveness to solve multi-query joint recall with sub-quadratic computation. To bridge the gap between theoretical analysis and real-world applications, we propose locality-sensitive Hashing Attention with sparse Key Selection (HAX), which instantiates the theoretical solution and is further tailored to natural language domains. Extensive experiments on both synthetic and real-world long-context benchmarks show that HAX consistently outperforms SSM baselines and SSMs integrated with context-independent sparse attention (CISA).

状态空间模型长序列建模稀疏注意力NLP

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