通过自我反思提升程序搜索,让长文本理解更稳定可靠。
Recursive Language Models Meet Uncertainty: The Surprising Effectiveness of Self-Reflective Program Search for Long Context
- 用自我一致性、推理长度和置信度评估候选程序,实现不确定性感知的程序选择。
- 在多种数据集上比当前最佳方法提升22%,且在长短上下文均表现稳定。
- 无需递归机制即可超越传统递归模型,适合复杂语义任务的长文本理解。
长上下文处理仍是语言模型的核心挑战:即使具备扩展的上下文窗口,模型仍难以可靠地提取、推理并利用长文本信息。近期工作如递归语言模型(RLM)通过程序化交互在推理时将长上下文分解为递归子调用,以应对该问题。然而,其成功高度依赖上下文交互程序的选择,这一关键环节长期未被深入探索。本文提出SRLM框架,通过引入不确定性感知的自我反思能力,增强程序化上下文交互。SRLM利用三个内在信号:自我一致性、推理长度与显式置信度,作为模型内部不确定性的互补指标,用于评估和比较候选程序。在多样化基准数据集、上下文长度及主干模型上的大量实验表明,SRLM持续优于现有最优基线,在相同时间预算下相较RLM最高提升22%。研究发现,递归本身并非性能提升的主要因素;简单的自我反思程序搜索即可匹配甚至超越RLM,且无需自查询或显式递归机制。当上下文长度处于模型窗口内时,含递归的RLM常导致性能下降,而SRLM在短长上下文上均获得一致提升。此外,对于语义密集型任务,启发式程序搜索不足,需更广泛的上下文理解,而SRLM中的自我反思提供了更好的语义引导信号。
原文摘要 · Abstract (English)
Long-context handling remains a core challenge for language models: even with extended context windows, models often fail to reliably extract, reason over, and use the information across long contexts. Recent works like Recursive Language Models (RLM) have approached this challenge by agentic way of decomposing long contexts into recursive sub-calls through programmatic interaction at inference. While promising, the success of RLM critically depends on how these context-interaction programs are selected, which has remained largely unexplored. In this paper, we study this problem and introduce SRLM, a framework that augments programmatic context interaction with uncertainty-aware Self-Reflection. SRLM leverages three intrinsic signals: self consistency, reasoning length, and verbalized confidence. These serve as complementary indicators of a model's internal uncertainty, and the model uses them to evaluate and compare candidate context-interaction programs. Extensive experiments across diverse benchmark datasets, context lengths, and backbone models, show that SRLM consistently outperforms state-of-the-art baselines, yielding up to 22% improvement over RLM under the same time budget. Our findings show that recursion itself is not the primary driver of performance in RLM, and a simple self-reflective program search can match or surpass RLM without requiring self-query or explicit recursion mechanisms. We find that for context lengths within the model's window, RLMs with recursion often degrade performance relative to the base model, whereas SRLM yields consistent gains across both short and long contexts. We also find that RLM is less effective in tasks with semantically intensive nature, where heuristic program search is insufficient and broader contextual understanding is required, while self-reflection in SRLM provides a semantic signal that better steers reasoning in these scenarios.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。