arXiv:2406.01495 · 中英对照阅读
Re-ReST:面向语言智能体的反思强化自训练(Reflection-Reinforced Self-Training)
Re-ReST: Reflection-Reinforced Self-Training for Language Agents
中文速览
语言智能体通常需要靠高质量的“思考—行动”示范来训练,但人工标注或调用更强模型既昂贵,也不总是可行;只让模型自己生成,又常会得到太多低质量样本。作者提出 Re-ReST:先让智能体生成答案或行动轨迹,再用外部环境给出的反馈(如任务是否成功、代码测试结果)指导另一个模型修改失败样本,并把改好的样本用于训练智能体。实验覆盖问答、规划、代码、视觉问答和图像生成等任务,发现自训练能提升表现,加入 Re-ReST 后在 HotpotQA 和 AlfWorld 上又分别提升 2.0 和 14.1 个百分点。它的重要意义是让开源智能体能利用自身尝试和环境反馈逐步变强,减少对人工示范或商业模型的依赖,而且训练完成后使用时不需要额外的反思模型或环境反馈。
摘要
使用推理—行动轨迹对语言智能体进行微调是有效的,但从人工标注或更强大的模型获取这些轨迹成本高昂,有时也不切实际。本文探讨了在语言智能体中使用自训练,这种方法可以由智能体自身生成监督信号,为不依赖人工或更强大模型的示范提供了一种有前景的替代方案。然而,自训练需要高质量的模型生成样本,而对于具有挑战性的语言智能体任务,这类样本难以获得。为解决这一问题,我们提出反思强化自训练(Re-ReST),它在自训练过程中使用反思器来改进低质量的生成样本。反思器利用智能体的输出以及来自外部环境的反馈(例如,代码生成中的单元测试结果),生成改进后的样本。这一技术能够提升劣质样本的质量,并高效地丰富自训练数据集,加入更多高质量样本。我们在多个任务上对开源语言智能体进行了广泛实验,任务包括多跳问答、序贯决策、代码生成、视觉问答和文本生成图像。结果表明,自训练和Re-ReST在语言智能体任务中均有效:自训练使HotpotQA上的基线性能提升了7.6%,使AlfWorld上的基线性能提升了28.4%;Re-ReST则分别进一步提升了2.0%和14.1%。我们的研究还证实,使用反思器为自训练生成高质量样本是高效的。此外,我们展示了一种在推理阶段使用反思、而无需真实标注反馈的方法,解决了以往反思研究的局限性。我们的代码已发布于https://github.com/PlusLabNLP/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 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.
术语表
- language agents
- 语言智能体
- large language models (LLMs)
- 大语言模型(LLM)
- finetuning
- 微调
- reasoning-action trajectories
- 推理—行动轨迹
- self-training
- 自训练
- Reflection-Reinforced Self-Training (Re-ReST)
- 反思强化自训练(Re-ReST)
- reflector
- 反思器
- reflection model
- 反思模型
- external feedback
- 外部反馈
- environmental feedback
- 环境反馈
- pseudo-label
- 伪标签
- thought-action trajectory
- 思维—行动轨迹
- reasoning traces
- 推理轨迹
- multi-hop question answering
- 多跳问答
- sequential decision-making
- 序贯决策
- long-horizon planning
- 长时程规划
- code generation
- 代码生成
- visual question answering
- 视觉问答
- text-to-image generation
- 文本生成图像
- self-consistency decoding
- 自一致性解码
- preference optimization
- 偏好优化
- ReAct
- ReAct(推理与行动)
- HotpotQA
- HotpotQA
- AlfWorld
- AlfWorld
- unit tests
- 单元测试