首页 > AI前沿 > State Space Attention: Learning Context-Dependent Memory Retention

State Space Attention: Learning Context-Dependent Memory Retention

arXiv自然语言 2026-11-25 09:56 6 阅读 查看原文
用户现在需要把给定的新闻正文排版成语义化的HTML片段,要遵守规则,每个自然段用p,重要句子加strong,保留所有内容,不要文档级标签。首先,先看原文,整篇是一个长段落?不对,先看内容,有没有需要分小节的?原文主要是介绍SSA的提出、方法、训练、实验结果这些。首先,开头第一部分是说标准注意力的缓存问题,引出问题,然后提出SSA。首先,先处理: 首先,第一部分:

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.

然后下一部分,讲scorer的:

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的优势和后续:

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.

等等,有没有需要用h2或者h3的?原文是连续的,没有明显的小节,不过是不是可以按照内容分小节?比如“问题与模型提出”用h2?不对,用户说长文用h2/h3划分小节,那原文是一个完整的研究介绍,是不是可以分几个小节?比如:

研究背景与模型提出

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.

这样是不是更符合语义化?对,因为长文划分小节,这样结构更清楚,而且没有增删改内容,只是划分了小节标题,标题是根据内容来的,有没有问题?用户说“保留原文所有信息,不得增删改内容”,小节标题是对内容的概括,没有增加信息,对吧?不过要确保标题是基于原文的,不能瞎编。比如“研究背景与模型提出”是符合的,因为开头就是讲背景和提出SSA。“模型机制”讲的是scorer的工作,对的。“模型训练”讲训练方式和recovery技术,对的。“实验设置与结果”讲实验对比和结果,对的。“模型特性与扩展实验”讲SSA的优势和400M模型的实验,对的。 然后检查有没有重要句子需要加strong,比如标准注意力的缓存问题,SSA的名称,recovery技术,这些是重要术语,加strong是对的。然后每个自然段用p,列表这里没有,引用也没有,代码也没有,所以不需要其他标签。然后不要文档级标签,直接输出片段。 现在整理成正确的HTML,确保没有错误,标签闭合正确。比如h2标签都是闭合的,p都是闭合的,strong都是闭合的。现在写出来:

研究背景与模型提出

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 model