让我们(不)仅仅将事物放入上下文:针对长上下文LLM的测试时训练
Let's (not) just put things in Context: Test-Time Training for Long-Context LLMs
AI总结:
针对长上下文LLM的测试时训练方法通过针对性梯度更新克服静态自注意力限制,显著提升模型性能。
摘要:
在训练和架构策略上的进展使具有数百万个标记上下文长度的LLM成为可能。然而,实证证据表明,此类长上下文LLM可能消耗的文本远多于其能够可靠利用的文本。另一方面,已证明推理时的计算可以用于提升LLM的性能,通常通过生成思考标记,在涉及多步骤推理的挑战性任务中尤为明显。通过在沙盒长上下文任务上的受控实验,我们发现此类推理时策略显示出迅速递减的回报,并在长上下文中失败。我们归因于这些失败的是分数稀释,这是静态自注意力机制固有的现象。进一步,我们展示出当前的推理时策略在某些条件下无法检索到相关的长上下文信号。我们提出了一种简单的方法,通过在给定上下文中进行有针对性的梯度更新,可以证明性地克服静态自注意力的限制。我们发现,这种推理时计算的使用方式的转变在模型和长上下文基准测试中始终带来显著的性能提升。我们的方法在LongBench-v2和ZeroScrolls基准的子集上,平均为Qwen3-4B带来了12.6和14.1个百分点的提升。结论是实用的:对于长上下文,少量的上下文特定训练比当前的推理时扩展策略如生成更多思考标记更有效。
英文摘要:
Progress on training and architecture strategies has enabled LLMs with millions of tokens in context length. However, empirical evidence suggests that such long-context LLMs can consume far more text than they can reliably use. On the other hand, it has been shown that inference-time compute can be used to scale performance of LLMs, often by generating thinking tokens, on challenging tasks involving multi-step reasoning. Through controlled experiments on sandbox long-context tasks, we find that such inference-time strategies show rapidly diminishing returns and fail at long context. We attribute these failures to score dilution, a phenomenon inherent to static self-attention. Further, we show that current inference-time strategies cannot retrieve relevant long-context signals under certain conditions. We propose a simple method that, through targeted gradient updates on the given context, provably overcomes limitations of static self-attention. We find that this shift in how inference-time compute is spent leads to consistently large performance improvements across models and long-context benchmarks. Our method leads to large 12.6 and 14.1 percentage point improvements for Qwen3-4B on average across subsets of LongBench-v2 and ZeroScrolls benchmarks. The takeaway is practical: for long context, a small amount of context-specific training is a better use of inference compute than current inference-time scaling strategies like producing more thinking tokens.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。