ChatPaper.aiChatPaper

MSA: 100M 토큰까지 효율적인 엔드투엔드 메모리 모델 확장을 위한 메모리 희소 어텐션

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

March 6, 2026
저자: Yu Chen, Runkai Chen, Sheng Yi, Xinda Zhao, Xiaohong Li, Jianjin Zhang, Jun Sun, Chuanrui Hu, Yunyun Han, Lidong Bing, Yafeng Deng, Tianqiao Chen
cs.AI

초록

장기 기억은 인간 지능의 핵심 기반입니다. AI에 생애 전체 규모의 정보 처리 능력을 부여하는 것은 해당 분야의 오랜 과제로 남아있습니다. 완전 주의(full-attention) 구조의 한계로 인해, 대규모 언어 모델(LLM)의 효과적 문맥 길이는 일반적으로 1M 토큰으로 제한됩니다. 혼합 선형 어텐션(hybrid linear attention), RNN과 같은 고정 크기 메모리 상태, RAG 또는 에이전트 시스템과 같은 외부 저장 방식 등 기존 접근법들은 이 한계를 확장하려 시도합니다. 그러나 이러한 방법들은 문맥 길이가 증가함에 따라 심각한 정밀도 저하와 급격한 지연 시간 증가, 메모리 내용의 동적 수정 불가능, 또는 종단간 최적화 부족 등의 문제를 자주 겪습니다. 이러한 병목 현상은 대규모 말뭉치 요약, 디지털 트윈, 장기 역사 에이전트 추론과 같은 복잡한 시나리오를 저해하며, 메모리 용량을 제한하고 추론 속도를 늦춥니다. 우리는 종단간 학습 가능하고 효율적이며 대규모로 확장 가능한 메모리 모델 프레임워크인 Memory Sparse Attention(MSA)을 제시합니다. 확장 가능한 희소 어텐션(scalable sparse attention)과 문서 단위 RoPE(document-wise RoPE)를 포함한 핵심 혁신을 통해, MSA는 훈련과 추론 모두에서 선형 복잡도를 달성하면서도 탁월한 안정성을 유지하며, 16K 토큰에서 100M 토큰으로 확장 시 9% 미만의 성능 저하를 보입니다. 더 나아가, KV 캐시 압축과 Memory Parallel을 결합하여 2개의 A800 GPU로 100M 토큰 추론을 가능하게 합니다. 또한 우리는 흩어진 메모리 세그먼트 간의 복잡한 다중 홉 추론(multi-hop reasoning)을 용이하게 하는 Memory Interleaving을 제안합니다. MSA는 장문맥 벤치마크에서 최첨단 LLM, 최신 RAG 시스템, 그리고 선도적인 메모리 에이전트들을 크게 능가합니다. 이러한 결과는 MSA가 메모리 용량과 추론을 분리함으로써, 범용 모델에 본질적이고 생애 규모의 기억을 부여할 수 있는 확장 가능한 기반을 제공함을 입증합니다.
English
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.
PDF191March 28, 2026