[论文解读] Re-ReST: Reflection-Reinforced Self-Training for Language Agents
本文提出反射增强自训练(Re-ReST),一种通过反射模型利用外部反馈(例如单元测试结果)纠正低质量输出,从而提升语言智能体自训练性能的方法。经修正的样本随后用于改进智能体性能,在无需推理开销的情况下,实现多个任务的一致性提升。
Finetuning language agents with reasoning-action trajectories is effective, but obtaining these trajectories from human annotations or stronger models is costly and sometimes impractical. In this paper, we investigate the use of self-training in language agents, which can generate supervision from the agent itself, offering a promising alternative without relying on human or stronger model demonstrations. Self-training, however, requires high-quality model-generated samples, which are hard to obtain for challenging language agent tasks. To address this, we present Reflection-Reinforced Self-Training (Re-ReST), which uses a extit{reflector} to refine low-quality generated samples during self-training. The reflector takes the agent's output and feedback from an external environment (e.g., unit test results in code generation) to produce improved samples. This technique enhances the quality of inferior samples and efficiently enriches the self-training dataset with higher-quality samples. We conduct extensive experiments on open-source language agents across tasks, including multi-hop question answering, sequential decision-making, code generation, visual question answering, and text-to-image generation. The results demonstrate the effectiveness of self-training and Re-ReST in language agent tasks, with self-training improving baselines by 7.6\% on HotpotQA and 28.4\% on AlfWorld, and Re-ReST further boosting performance by 2.0\% and 14.1\%, respectively. Our studies also confirm the efficiency of using a reflector to generate high-quality samples for self-training. Moreover, we demonstrate a method to employ reflection during inference without ground-truth feedback, addressing the limitation of previous reflection work. Our code is released at https://github.com/PlusLabNLP/Re-ReST.
研究动机与目标
- 解决自训练在获取高质量样本方面效率低下的问题,尤其是在复杂任务中。
- 克服因丢弃低质量样本而带来的局限,通过反射实现其精炼。
- 在训练过程中利用外部反馈(例如测试结果)指导准确修正,避免推理阶段依赖不可靠的自我判断。
- 通过训练使智能体在反射增强的数据增强后能直接生成正确输出,确保零推理成本。
- 证明该方法与现有自一致性解码策略兼容,并可在多种语言智能体任务中实现可扩展性。
提出的方法
- 引入一个反射模型,以模型生成的输出和外部反馈(例如执行结果、测试结果)作为输入。
- 利用反射模型生成对错误或低质量输出的修正版本,提升其质量。
- 将这些精炼后的样本加入自训练数据集中,以提升微调阶段智能体的性能。
- 在原始样本与反射样本的组合数据集上训练智能体,采用标准自训练目标。
- 将反射过程与推理解耦:推理阶段仅使用智能体模型,消除运行时开销。
- 通过允许反射器处理多个生成结果并输出改进版本,确保与自一致性解码的兼容性。

实验结果
研究问题
- RQ1基于反射的低质量输出修正是否能显著提升自训练的效率与性能?
- RQ2在反射过程中使用外部反馈(例如单元测试)是否能带来比仅依赖自我判断更可靠、更高质量的样本精炼?
- RQ3反射增强的自训练在代码生成和多跳问答等多样化语言智能体任务中,其泛化能力如何?
- RQ4与原始自训练及其他自提升方法相比,Re-ReST 在样本质量与下游性能方面表现如何?
- RQ5反射机制是否与现有的推理时解码策略(如自一致性)兼容?
主要发现
- Re-ReST 在五个多样化任务中均一致优于原始自训练方法:多跳问答、序列决策、代码生成、视觉问答和文本到图像生成。
- 消融实验表明,反射模型显著提升了自训练样本的质量与实用性,优于仅依赖模型采样的方法。
- 该方法与自一致性解码兼容,表明可无缝集成至现有高性能推理流水线中,无需修改。
- 在训练阶段使用外部反馈(例如测试结果)使反射器能够生成准确修正,避免了仅依赖自我判断的反射方法所出现的性能下降。
- 最终的智能体模型在无需任何推理时反射的情况下达到更优性能,确保测试阶段零计算开销。
- 该方法展现出强大的泛化能力,即使在低样本和复杂推理场景中也观察到性能提升。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。