The scalability of Large Language Models (LLMs) to long contexts is fundamentally constrained by the quadratic complexity of standard attention, motivating the adoption of linear attention mechanisms with sub-quadratic cost. To improve representation capacity under long contexts, recent approaches organize memory in a multi-state manner. However, existing multi-state linear attention methods rely on fixed state merging policies that cannot adapt to dynamically varying token importance, irreversibly obscuring critical tokens and causing severe error accumulation over long sequences. To address this limitation, we propose DLA, a dynamic memory modeling framework for multi-state linear attention. DLA introduces (i) Information-Aware Dynamic State Merging, which adaptively determines state boundaries based on token-level information variation, preserving high-resolution representations around semantic transitions while aggressively summarizing stable regions, and (ii) Capacity-Bounded Memory Modeling, which maintains a fixed-size, chronologically ordered state cache by selectively merging adjacent low-information states to control memory growth with minimal information loss. We pre-train DLA on two different linear attention models and evaluate on 16 datasets across three categories. Experimental results demonstrate the superiority of DLA over state-of-the-art.
翻译:大型语言模型(LLMs)在处理长上下文时的可扩展性从根本上受限于标准注意力的二次复杂度,这促使我们采用具有亚二次复杂度的线性注意力机制。为提升长上下文下的表征能力,近期研究以多状态方式组织记忆。然而,现有基于多状态线性注意力方法依赖于固定的状态合并策略,无法适应动态变化的token重要性,导致关键token被不可逆地遮蔽,并在长序列中引发严重的误差累积。为解决此限制,我们提出DLA——一种面向多状态线性注意力的动态记忆建模框架。DLA引入了:(i)信息感知的动态状态合并机制,根据token级信息变化自适应确定状态边界,在语义转换附近保留高分辨率表征,同时对稳定区域进行激进摘要;以及(ii)容量受限的记忆建模机制,通过选择性合并相邻低信息状态来维护固定大小、按时间顺序排列的状态缓存,从而在最小化信息损失的前提下控制记忆增长。我们在两种不同线性注意力模型上预训练DLA,并在三个类别的16个数据集上进行评估。实验结果表明,DLA优于现有最先进方法。