2025-05-06 · 专家 · 机器学习 · 自然语言处理

Optimizing Chain-of-Thought Reasoners via Gradient Variance Minimization in Rejection Sampling and RL

该论文提出了一种名为GVM-RAFT的动态样本分配策略,通过最小化拒绝采样和强化学习中的梯度方差,优化了大型语言模型中的思维链推理。

更新于 2025-05-06。作者:Jiarui Yao、Yifan Hao、Hanning Zhang、Hanze Dong、Wei Xiong、Nan Jiang、Tong Zhang。

中文摘要

思维链(CoT)推理在大语言模型(LLMs)中可以形式化为一个潜在变量问题,其中模型需要生成中间推理步骤。虽然先前的方法,如迭代奖励排名微调(RAFT)依赖于此类公式,但它们通常在提示中应用统一的推理预算,这未能考虑到难度和收敛行为的可变性。这项工作将CoT训练中的主要瓶颈识别为由于静态采样策略导致的低效随机梯度估计。我们提出了GVM-RAFT,这是一种针对提示的动态样本分配策略,旨在在计算预算约束下最小化随机梯度方差。该方法通过监控提示接受率和随机梯度范数动态分配计算资源,确保结果梯度方差最小化。我们的理论分析表明,所提出的动态采样策略在合适的条件下可以保证加速收敛。在数学推理上的实验表明,GVM-RAFT相较于传统的RAFT实现了2-4倍的加速和显著的准确率提升。所提出的动态采样策略是通用的,可以集成到其他强化学习算法中,如GRPO,从而在收敛和测试准确率上带来类似的改进。我们的代码可在https://github.com/RLHFlow/GVM上获取。

英文摘要

Chain-of-thought (CoT) reasoning in large language models (LLMs) can be formalized as a latent variable problem, where the model needs to generate intermediate reasoning steps. While prior approaches such as iterative reward-ranked fine-tuning (RAFT) have relied on such formulations, they typically apply uniform inference budgets across prompts, which fails to account for variability in difficulty and convergence behavior. This work identifies the main bottleneck in CoT training as inefficient stochastic gradient estimation due to static sampling strategies. We propose GVM-RAFT, a prompt-specific Dynamic Sample Allocation Strategy designed to minimize stochastic gradient variance under a computational budget constraint. The method dynamically allocates computational resources by monitoring prompt acceptance rates and stochastic gradient norms, ensuring that the resulting gradient variance is minimized. Our theoretical analysis shows that the proposed dynamic sampling strategy leads to accelerated convergence guarantees under suitable conditions. Experiments on mathematical reasoning show that GVM-RAFT achieves a 2-4x speedup and considerable accuracy improvements over vanilla RAFT. The proposed dynamic sampling strategy is general and can be incorporated into other reinforcement learning algorithms, such as GRPO, leading to similar improvements in convergence and test accuracy. Our code is available at https://github.com/RLHFlow/GVM.

解读

一句话总结

该论文提出了一种名为GVM-RAFT的动态样本分配策略,通过最小化拒绝采样和强化学习中的梯度方差,优化了大型语言模型中的思维链推理。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源