arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2607.02509cs.AI
收藏

ReContext: 递归证据重放作为大语言模型的长上下文推理工具

ReContext: Recursive Evidence Replay as LLM Harness for Long-Context Reasoning

University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)

Yanjun Zhao, Ruizhong Qiu, Tianxin Wei, Yuanchen Bei, Zhining Liu, Lingjie Chen, Ismini Lourentzou, Hanghang Tong, Jingrui He

AI总结:

提出一种免训练推理方法ReContext,通过模型内部相关性信号构建查询条件证据池并在最终生成前重放,以提升长上下文推理中的证据利用,无需外部记忆或上下文剪枝。

摘要:

理解和推理长上下文已成为在现实应用中部署大型语言模型(LLM)的关键需求。尽管最近的LLM支持越来越长的上下文窗口,但它们常常无法利用输入中已经存在的相关证据,揭示了上下文访问与有效上下文利用之间的差距。在这项工作中,我们提出了递归证据重放作为LLM长上下文推理的工具(RECONTEXT),一种无需训练的长上下文推理改进方法。RECONTEXT利用模型内部的相关性信号构建查询条件证据池,并在最终生成前重放该证据池,同时保留完整的原始上下文。这种递归选择过程将证据组织与答案生成分离,无需训练、外部记忆或上下文剪枝。我们还基于联想记忆提供了理论分析,将上下文表征为记忆存储,问题作为检索线索,注意力作为线索-痕迹关联,重放作为痕迹重新激活。在八个128K上下文长度的长上下文数据集上的实验表明,RECONTEXT在Qwen3-4B、Qwen3-8B和Llama3-8B上一致地提高了证据利用,在所有三个骨干模型上取得了最佳平均排名。代码可在该网址获取。

英文摘要:

Understanding and reasoning over long contexts has become a key requirement for deploying large language models (LLMs) in realistic applications. Although recent LLMs support increasingly long context windows, they often fail to use relevant evidence that is already present in the input, revealing a gap between context access and effective context utilization. In this work, we propose Recursive Evidence Replay as LLM Harness for Long-Context Reasoning (RECONTEXT), a training-free inference method for improving long-context reasoning. RECONTEXT uses model-internal relevance signals to construct a query-conditioned evidence pool and replays it before final generation while preserving the full original context. This recursive selection process separates evidence organization from answer generation without training, external memory, or context pruning. We also provide a theoretical analysis based on associative memory, which characterizes the context as a memory store, the question as a retrieval cue, attention as cue-trace association, and replay as trace reactivation. Experiments on eight long-context datasets with 128K context length show that RECONTEXT consistently improves evidence utilization across Qwen3-4B, Qwen3-8B, and Llama3-8B, achieving the best average rank on all three backbones. Code is available at https://github.com/Yanjun-Zhao/ReContext.

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

↑