跳到正文
arXiv (AI + Vision + Imaging)· Ege \c{C}akar, Cengiz Pehlevan·· 4 小时前精选AI 评分60

State Space Attention:学习上下文相关的记忆保留机制

State Space Attention: Learning Context-Dependent Memory Retention

AI 导读

论文提出 State Space Attention(SSA),让模型学习保留一组有界的过去表示,并用标准注意力读取,使固定数量的 token 在更长上下文中保持可用。

推荐理由

论文提出可学习的记忆保留机制,在检索与推理任务上以恒定推理内存逼近全注意力,为长上下文序列建模提供了一条可迁移的方法路径。

正文 · 原文

arXiv:2611.33625v1 Announce Type: new Abstract: Standard attention's key-value cache grows linearly with context length. Bounding it raises the question of what a sequence model should retain for long-context reasoning. We argue this choice should be learned, and introduce State Space Attention (SSA), which learns to keep a bounded set of past representations and reads them with standard attention. A learned scorer rescores every chunk against newly arriving context and the rest of memory. A fixed-context Transformer is then the special case that always keeps the most recent tokens. We train the scorer and reader jointly, either moving gradually from a differentiable soft weighting of memories to hard retention, or with hard retention from the start. To produce signal for the scorer, we generate supervised samples during training, a technique we call recovery. We compare SSA with recurrent models, bounded-memory attention methods, and full-attention Transformers across retrieval, variable tracking, multi-hop reasoning, and language modeling. On our retrieval and reasoning benchmarks, SSA matches or comes within a few points of full attention on most tasks, far outperforms a Transformer with the same readable budget on every long-context retrieval task we evaluate, and matches or outperforms one with about 4 times that budget, while using constant inference memory. The largest remaining gap to full attention at small language model scale is on RULER. SSA makes a fixed number of tokens useful over a longer context, and since it reads memory with standard attention, we propose that it can be stacked with KV cache eviction methods. We also pretrain and post-train 400M-parameter models and measure how SSA's training and inference costs scale with context length and model size. Together, these experiments examine the capabilities and limitations of learned memory retention for long-context sequence modeling.

来源:arXiv (AI + Vision + Imaging) · arxiv.org