arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.23516cs.CLcs.AIcs.IR
收藏

MSA:内存稀疏注意力用于高效端到端内存模型扩展至100M标记

MSA: Memory Sparse Attention for Efficient End-to-End Memory Model Scaling to 100M Tokens

Evermind;Shanda Group(盛大集团);Peking University(北京大学)

Yu Chen, Runkai Chen, Sheng Yi, Xinda Zhao, Xiaohong Li, Jianjin Zhang, Jun Sun, Chuanrui Hu, Yunyun Han, Lidong Bing, Yafeng Deng, Tianqiao Chen

AI总结:

本文提出MSA,一种高效的端到端可训练内存模型框架,通过可扩展稀疏注意力和文档级RoPE实现线性复杂度,支持从16K到100M标记的扩展,同时保持稳定性,且在100M标记推理中实现2xA800 GPU的高效处理。

摘要:

长期记忆是人类智能的核心。使AI处理生命周期信息仍是一个长期追求。由于全注意力架构的限制,大型语言模型(LLMs)的有效上下文长度通常被限制在1M标记。现有方法如混合线性注意力、固定大小内存状态(如RNNs)和外部存储方法如RAG或代理系统试图扩展这一限制。然而,它们常常面临严重的精度退化和快速增加的延迟,无法动态修改内存内容,或缺乏端到端优化。这些瓶颈阻碍了复杂场景如大规模语料摘要、数字孪生和长历史代理推理,同时限制了内存容量并减慢了推理速度。我们提出Memory Sparse Attention(MSA),一种端到端可训练、高效且大规模可扩展的内存模型框架。通过核心创新包括可扩展稀疏注意力和文档级RoPE,MSA在训练和推理中均实现线性复杂度,同时保持卓越的稳定性,当从16K扩展到100M标记时,退化小于9%。此外,KV缓存压缩结合内存并行,使100M标记推理在2xA800 GPU上成为可能。我们还提出内存交错,以促进复杂多跳推理跨分散内存段。MSA在长上下文基准测试中显著超越了前沿LLM、最先进的RAG系统和领先的内存代理。这些结果表明,通过解耦内存容量与推理,MSA提供了一个可扩展的基础,使通用模型具备内在的生命周期级记忆。

英文摘要:

Long-term memory is a cornerstone of human intelligence. Enabling AI to process lifetime-scale information remains a long-standing pursuit in the field. Due to the constraints of full-attention architectures, the effective context length of large language models (LLMs) is typically limited to 1M tokens. Existing approaches, such as hybrid linear attention, fixed-size memory states (e.g., RNNs), and external storage methods like RAG or agent systems, attempt to extend this limit. However, they often suffer from severe precision degradation and rapidly increasing latency as context length grows, an inability to dynamically modify memory content, or a lack of end-to-end optimization. These bottlenecks impede complex scenarios like large-corpus summarization, Digital Twins, and long-history agent reasoning, while limiting memory capacity and slowing inference. We present Memory Sparse Attention (MSA), an end-to-end trainable, efficient, and massively scalable memory model framework. Through core innovations including scalable sparse attention and document-wise RoPE, MSA achieves linear complexity in both training and inference while maintaining exceptional stability, exhibiting less than 9% degradation when scaling from 16K to 100M tokens. Furthermore, KV cache compression, combined with Memory Parallel, enables 100M-token inference on 2xA800 GPUs. We also propose Memory Interleaving to facilitate complex multi-hop reasoning across scattered memory segments. MSA significantly surpasses frontier LLMs, state-of-the-art RAG systems, and leading memory agents in long-context benchmarks. These results demonstrate that by decoupling memory capacity from reasoning, MSA provides a scalable foundation to endow general-purpose models with intrinsic, lifetime-scale memory.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑