arXiv:2505.22338cs.CLcs.AI2025-05被引 16

让自然语言反馈直接指导模型微调,精准修正错误部分。

Text2Grad: Reinforcement Learning from Natural Language Feedback

  • 将文本批评映射到具体词元片段,生成可微梯度信号。
  • 在摘要、编程、问答任务中超越传统奖励方法,提升性能与可解释性。
  • 适合需要精细对齐与人类反馈的模型优化场景。

传统基于语言模型的强化学习人类反馈(RLHF)使用粗粒度标量奖励,掩盖了成功或失败的细粒度原因,导致学习缓慢且不透明。近期工作通过提示或反思引入文本批评,提升了可解释性,但未修改模型参数。本文提出Text2Grad,一种将自由形式的文本反馈转化为片段级梯度的强化学习范式。给定人类或程序化批评,Text2Grad将每个批评短语对齐至相关词元片段,将其转换为可微奖励信号,并执行梯度更新以直接优化模型策略中存在问题的部分。该方法实现精确的反馈驱动调整,而非全局扰动。Text2Grad由三部分构成:(1) 高质量的反馈标注管道,将批评与词元片段配对;(2) 细粒度奖励模型,在生成解释性批评的同时预测片段级奖励;(3) 片段级策略优化器,反向传播自然语言梯度。在摘要生成、代码生成和问答任务中,Text2Grad consistently优于标量奖励强化学习和仅提示基线,同时获得更高的任务指标和更丰富的可解释性。结果表明,自然语言反馈不仅能作为解释,还可作为细粒度对齐的可操作训练信号。代码已开源:https://github.com/microsoft/Text2Grad。

原文摘要 · Abstract (English)

Traditional RLHF optimizes language models with coarse, scalar rewards that mask the fine-grained reasons behind success or failure, leading to slow and opaque learning. Recent work augments RL with textual critiques through prompting or reflection, improving interpretability but leaving model parameters untouched. We introduce Text2Grad, a reinforcement-learning paradigm that turns free-form textual feedback into span-level gradients. Given human (or programmatic) critiques, Text2Grad aligns each feedback phrase with the relevant token spans, converts these alignments into differentiable reward signals, and performs gradient updates that directly refine the offending portions of the model's policy. This yields precise, feedback-conditioned adjustments instead of global nudges. Text2Grad is realized through three components: (1) a high-quality feedback-annotation pipeline that pairs critiques with token spans; (2) a fine-grained reward model that predicts span-level reward on answers while generating explanatory critiques; and (3) a span-level policy optimizer that back-propagates natural-language gradients. Across summarization, code generation, and question answering, Text2Grad consistently surpasses scalar-reward RL and prompt-only baselines, providing both higher task metrics and richer interpretability. Our results suggest that natural-language feedback can serve not only as explanations, but also as actionable training signals for fine-grained alignment. The code for our method is available at https://github.com/microsoft/Text2Grad.

强化学习自然语言反馈细粒度对齐模型优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。