Skip to main content
QUICK REVIEW

[论文解读] Recursive Introspection: Teaching Language Model Agents How to Self-Improve

Yu-Yuan Qu, Tianjun Zhang|arXiv (Cornell University)|Jul 25, 2024
Natural Language Processing TechniquesComputer Science被引用 3
一句话总结

RISE(递归自省)是一种微调方法,通过在策略回溯和奖励加权回归中学习自身错误,使大语言模型能够通过多轮迭代自我改进其响应。该方法在GSM8K和MATH等推理任务上显著提升性能,使模型即使在没有外部反馈的情况下,也能随时间纠正错误并得出正确答案。

ABSTRACT

A central piece in enabling intelligent agentic behavior in foundation models is to make them capable of introspecting upon their behavior, reasoning, and correcting their mistakes as more computation or interaction is available. Even the strongest proprietary large language models (LLMs) do not quite exhibit the ability of continually improving their responses sequentially, even in scenarios where they are explicitly told that they are making a mistake. In this paper, we develop RISE: Recursive IntroSpEction, an approach for fine-tuning LLMs to introduce this capability, despite prior work hypothesizing that this capability may not be possible to attain. Our approach prescribes an iterative fine-tuning procedure, which attempts to teach the model how to alter its response after having executed previously unsuccessful attempts to solve a hard test-time problem, with optionally additional environment feedback. RISE poses fine-tuning for a single-turn prompt as solving a multi-turn Markov decision process (MDP), where the initial state is the prompt. Inspired by principles in online imitation learning and reinforcement learning, we propose strategies for multi-turn data collection and training so as to imbue an LLM with the capability to recursively detect and correct its previous mistakes in subsequent iterations. Our experiments show that RISE enables Llama2, Llama3, and Mistral models to improve themselves with more turns on math reasoning tasks, outperforming several single-turn strategies given an equal amount of inference-time computation. We also find that RISE scales well, often attaining larger benefits with more capable models. Our analysis shows that RISE makes meaningful improvements to responses to arrive at the correct solution for challenging prompts, without disrupting one-turn abilities as a result of expressing more complex distributions.

研究动机与目标

  • 在推理过程中,使大语言模型能够迭代地识别并纠正自身的错误,实现多轮响应中的自我改进。
  • 克服现有方法的局限性:尽管模型具备正确知识,但无法教会其如何优化自身响应。
  • 开发一种可扩展的单模型微调方法,无需依赖多个模型或复杂架构。
  • 证明即使在推理过程中没有最优反馈,模型也能通过模仿自我生成或专家监督的回溯过程,学习实现自我改进。
  • 在引入多轮自我改进能力的同时,保持单轮响应性能,通过精心设计的训练实现。

提出的方法

  • RISE将单轮提示微调建模为一个多轮马尔可夫决策过程(MDP),其中初始状态为输入提示。
  • 它使用由学习者模型生成的在策略回溯,后续轮次通过从学习者模型或更强大模型中进行最佳N选样的方式改进。
  • 监督信号来自最优响应或自我生成的修正结果,通过奖励加权回归(RWR)进行模型训练。
  • 训练过程是迭代的:每轮结束后,模型在展示如何改进先前响应的新回溯数据上进行微调。
  • 该方法借鉴在线模仿学习和强化学习的原理,引导模型以结构化、递归的方式纠正错误。
  • 通过学习复杂的响应分布,避免破坏单轮响应能力,同时保持初始响应质量不下降。
Figure 1 : Recursive Introspection (RISE). Using iterative multi-round training on on-policy rollouts and supervision from a reward function, RISE trains models that are capable of improving themselves over multiple turns. At inference, we run majority voting on candidate outputs from different turn
Figure 1 : Recursive Introspection (RISE). Using iterative multi-round training on on-policy rollouts and supervision from a reward function, RISE trains models that are capable of improving themselves over multiple turns. At inference, we run majority voting on candidate outputs from different turn

实验结果

研究问题

  • RQ1大语言模型能否被训练为在多轮推理中递归地检测并纠正自身的错误?
  • RQ2通过使用自我生成或专家监督的回溯进行微调,是否能在推理过程中无外部反馈的情况下实现有意义的自我改进?
  • RQ3单个模型能否通过迭代的在策略回溯和奖励加权回归,学习改进自身响应?
  • RQ4与单轮提示和现有多种轮次优化方法相比,RISE在性能和可扩展性方面表现如何?
  • RQ5RISE是否在实现多轮自我改进的同时,保持了模型的单轮响应性能?

主要发现

  • RISE使Llama2、Llama3和Mistral模型在数学推理任务上实现多轮响应的持续改进,使用相同推理计算量时,性能优于单轮基线模型。
  • 模型表现出一致的改进趋势:正确问题的比例随轮次增加而上升,而错误响应中持续错误的比例则下降。
  • 即使没有最优反馈,RISE仍能实现内在的自我改进,显著减少正确响应在后续轮次中变为错误的次数。
  • 当响应基本正确时,模型学会进行有针对性的修改;当响应存在根本性缺陷时,模型则学会完全重写。
  • RISE保持了强大的单轮响应性能,表明自我改进能力并未损害初始响应质量。
  • 该方法在模型规模上具有良好的可扩展性,在更强大的模型上取得了更大的性能增益。
Figure 2 : Left: Problem formulation. We convert single-turn problems into multi-turn MDPs as discussed in Section 4.1 . The state is given by the prompt, history of prior attempts, and optional feedback from the environment. An action is a response generated from the LLM given the state of multi-tu
Figure 2 : Left: Problem formulation. We convert single-turn problems into multi-turn MDPs as discussed in Section 4.1 . The state is given by the prompt, history of prior attempts, and optional feedback from the environment. An action is a response generated from the LLM given the state of multi-tu

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。