DART: Decoded Attention over Recurrent States for Efficient Long-Context Sequence Modeling

📄 arXiv: 2608.02032v1 📥 PDF

作者: Yixiao Qian, Song Chen, Pengkai Wang, Jiaxu Liu, Shengze Cai, Chao Xu

分类: cs.LG

发布日期: 2026-08-03


💡 一句话要点

提出DART以解决长序列建模中的注意力效率问题

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture)

关键词: 长序列建模 状态空间模型 注意力机制 信息检索 机器学习

📋 核心要点

  1. 现有的变换器和递归模型在长序列建模中存在效率低下的问题,尤其是在注意力机制的缓存使用上。
  2. DART通过解码令牌条件的键和值,并结合状态-记忆注意力,优化了长序列的建模效率,提升了信息检索能力。
  3. 实验结果显示,DART在推理缓存方面节省了75%的资源,同时在关联召回和语言建模质量上均有显著提升。

📝 摘要(中文)

现代语言模型主要基于变换器、递归模型及其混合架构。变换器依赖于基于令牌的注意力记忆,而递归模型如状态空间模型(SSMs)则维护紧凑的递归状态。本文通过Mamba-2的状态空间对偶视角,提出DART(Decoded Attention over Recurrent sTates),该方法保留Mamba-2的块状态贡献,解码令牌条件的键和值,并在这些键值对上执行状态-记忆注意力(SMA)。实验表明,DART在推理缓存方面显著减少了长度依赖性,相较于基线方法节省了75%的缓存需求,同时在关联召回和检索方面也有显著提升。

🔬 方法详解

问题定义:本文旨在解决长序列建模中,现有变换器和递归模型在注意力机制下的效率低下问题,尤其是缓存的长度依赖性。

核心思路:DART通过保留Mamba-2的块状态贡献,解码令牌条件的键和值,并在此基础上执行状态-记忆注意力(SMA),以提高信息检索效率。

技术框架:DART的整体架构包括块状态记忆的保留、键值对的解码以及SMA的计算。首先,利用Mamba-2的块扫描获取状态,然后解码出键和值,最后通过SMA进行信息检索。

关键创新:DART的主要创新在于将块状态与注意力机制结合,形成了一种新的状态-记忆注意力计算方式,显著提升了信息检索的效率和质量。

关键设计:DART采用了FlashAttention风格的计算方式,优化了训练过程,并在参数设置上进行了精细调整,以实现最佳的性能表现。具体的块大小和状态大小设置为S=256和N=128,确保了高效的缓存利用。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,DART在推理缓存方面相较于匹配的注意力基线节省了75%的资源,同时在关联召回和检索的性能上显著提升。与Mamba-2相比,DART在保持语言建模质量的同时,显著提高了信息检索的效率,展示了其在长序列建模中的优势。

🎯 应用场景

DART的研究成果在自然语言处理、机器翻译和对话系统等领域具有广泛的应用潜力。通过提高长序列建模的效率,DART能够支持更复杂的语言理解任务,推动智能对话系统的进步,提升用户体验。未来,DART的技术框架也可能被应用于其他序列数据处理任务,如时间序列分析和视频理解等。

📄 摘要(原文)

Modern language models are built primarily from Transformers, recurrent models, and their hybrid architectures. Transformers rely on token-level attention memories, while recurrent models such as state space models (SSMs) and linear attention maintain compact recurrent states. These architectures are typically instantiated separately or interleaved at the layer level, leaving open whether a shared memory representation can support both recurrent compression and attention-style retrieval. We study this question through the state space duality (SSD) view of Mamba-2, where the SSM state can be interpreted as a compressed associative key--value (KV) cache. We observe that Mamba-2 decodes token-conditioned values from this state but does not decode token-conditioned keys. Based on this observation, we propose DART (Decoded Attention over Recurrent sTates), which retains the chunk state contributions produced by the Mamba-2 chunked scan as chunk state memories, decodes token-conditioned keys and values from these memories, and performs state-memory attention (SMA) over the resulting KV pairs. The retrieved output is then combined with the native Mamba-2 output through a gated residual connection. DART supports practical training by reusing the Mamba-2 chunked scan and implementing SMA as a FlashAttention-style computation. Our analysis and experiments show that DART substantially reduces the length-dependent inference cache compared with a matched attention baseline (e.g., $75\%$ savings when the chunk size is $S=256$ and the state size is $N=128$). Compared with Mamba-2, DART substantially improves associative recall and retrieval while preserving general language-modeling quality.