用中位数替代均值,提升小批量强化学习的稳定性与精度
MC-GRPO: Median-Centered Group Relative Policy Optimization for Small-Rollout Reinforcement Learning
- 以中位数替代共享均值基准,减少异常奖励干扰
- 在G=2时性能接近G=8,差距缩至1%以内
- 无需增加训练成本,适合资源受限场景
群组相对策略优化方法通过每提示生成多个推理序列,并以共享均值作为奖励基准进行归一化。在推理预算有限的小批量场景下,基准噪声常导致优势符号翻转,使部分序列获得错误更新方向。本文提出中位数中心群组相对策略优化(MC-GRPO),核心思想是将均值替换为中位数——中位数对异常奖励更鲁棒。额外生成一个推理序列(共G+1个)作为中位数参考,优势计算基于群体中位数。奇数规模下,恰好一个序列等于中位数,其优势为零,不参与反向传播,故每提示仍仅贡献G个梯度样本,保持原有训练开销。在多种GRPO类方法及多尺度模型上,该方法显著提升低批量下的稳定性与最终准确率,使G=2与G=8之间的性能差距控制在1%以内。代码已开源。
原文摘要 · Abstract (English)
Group-relative policy optimization methods train language models by generating multiple rollouts per prompt and normalizing rewards with a shared mean reward baseline. In resource-constrained settings where the rollout budget is small, accuracy often degrades. We find that noise in the shared baseline induces advantage sign flips, where some rollouts receive an incorrect advantage sign, and the update direction is reversed. To address this, we propose Median-Centered Group Relative Policy Optimization (MC-GRPO), a simple and effective solution for small-rollout training. Our main idea is to replace the mean baseline with a median baseline: the median is far less sensitive to outlier rewards than the mean, mitigating the sign flips under small rollout size (G). We generate one additional rollout for median reference (G+1), and compute advantages by using the group median. With an odd-sized group, exactly one completion is the median and receives zero advantage, we exclude this pivot rollout from backpropagation so the number of gradient-contributing samples per prompt remains G, preserving the core update cost of standard G-rollout training. Across various GRPO-family methods and a wide range of models and scales, this median-centered training consistently improves stability and final accuracy in the low-rollout regime, reducing the gap between G=2 and G=8 to within 1%. Code is available at https://github.com/lotusroot-kim/MC-GRPO
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。