让大模型在推理时自我修正,提升问答准确率
TR-ICRL: Test-Time Rethinking for In-Context Reinforcement Learning
- 用检索实例+多数投票生成伪标签作为奖励信号
- 在MedQA上使Qwen2.5-7B提升21.23%,AIME2024达137.59%
- 适合需要高精度推理与知识理解的场景
上下文强化学习(ICRL)使大语言模型(LLMs)能在上下文窗口内直接从外部奖励中在线学习。然而,其核心挑战在于缺乏真实奖励信号。为此,我们提出测试时重思框架TR-ICRL,适用于推理与知识密集型任务。该方法首先为查询检索最相关的未标注实例,每轮迭代中,模型对每个实例生成候选答案,通过多数投票生成伪标签,作为代理奖励信号并生成反馈,引导模型迭代优化。最终将合成信息与原始查询结合,通过最终多数投票确定答案。在主流推理与知识密集型任务上验证,显著提升性能:在MedQA上使Qwen2.5-7B平均提升21.23%,在AIME2024上提升达137.59%。消融实验进一步验证了方法的有效性与鲁棒性。
原文摘要 · Abstract (English)
In-Context Reinforcement Learning (ICRL) enables Large Language Models (LLMs) to learn online from external rewards directly within the context window. However, a central challenge in ICRL is reward estimation, as models typically lack access to ground-truths during inference. To address this limitation, we propose Test-Time Rethinking for In-Context Reinforcement Learning (TR-ICRL), a novel ICRL framework designed for both reasoning and knowledge-intensive tasks. TR-ICRL operates by first retrieving the most relevant instances from an unlabeled evaluation set for a given query. During each ICRL iteration, LLM generates a set of candidate answers for every retrieved instance. Next, a pseudo-label is derived from this set through majority voting. This label then serves as a proxy to give reward messages and generate formative feedbacks, guiding LLM through iterative refinement. In the end, this synthesized contextual information is integrated with the original query to form a comprehensive prompt, with the answer determining through a final round of majority voting. TR-ICRL is evaluated on mainstream reasoning and knowledge-intensive tasks, where it demonstrates significant performance gains. Remarkably, TR-ICRL improves Qwen2.5-7B by 21.23% on average on MedQA and even 137.59% on AIME2024. Extensive ablation studies and analyses further validate the effectiveness and robustness of our approach. Our code is available at https://github.com/pangpang-xuan/TR_ICRL.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。