让大模型从全错答案中学习,提升数学推理能力
NGRPO: Negative-enhanced Group Relative Policy Optimization
- 引入优势校准机制,将全错回答转化为有效学习信号
- 在数学基准上超越PPO、GRPO等算法,最高提升12.3%
- 适合需要从错误中迭代优化的AI推理系统使用
强化学习中的相对价值(RLVR)已显著提升大语言模型在多种任务中的推理能力。然而,代表性算法GRPO存在关键缺陷:当一组回答全部正确或全部错误时,模型无法从中学习。尤其对于全错组,GRPO的优势函数值为零,导致梯度消失,丧失重要学习信号。为此,我们提出NGRPO(Negative-enhanced Group Relative Policy Optimization),通过两个核心机制克服此问题。首先,优势校准机制假设存在一个虚拟最优样本,在计算优势时调整组内奖励的均值与方差,使全错样本的优势不再为零。其次,采用非对称裁剪策略,放松对正样本的更新幅度,严格限制负样本的更新强度,以稳定优势校准带来的探索扰动。在Qwen2.5-Math-7B模型上的实验表明,NGRPO在MATH500、AMC23和AIME2025等数学基准上显著优于PPO、GRPO、DAPO和PSR-NSR等基线方法,验证了其从同质性错误中学习的能力,实现了稳定且显著的推理性能提升。代码已开源。
原文摘要 · Abstract (English)
RLVR has enhanced the reasoning capabilities of Large Language Models (LLMs) across various tasks. However, GRPO, a representative RLVR algorithm, suffers from a critical limitation: when all responses within a group are either entirely correct or entirely incorrect, the model fails to learn from these homogeneous responses. This is particularly problematic for homogeneously incorrect groups, where GRPO's advantage function yields a value of zero, leading to null gradients and the loss of valuable learning signals. To overcome this issue, we propose NGRPO (Negative-enhanced Group Relative Policy Optimization), an algorithm designed to convert homogeneous errors into robust learning signals. First, NGRPO introduces Advantage Calibration. This mechanism hypothesizes the existence of a virtual maximum-reward sample during advantage calculation, thereby altering the mean and variance of rewards within a group and ensuring that the advantages for homogeneously incorrect samples are no longer zero. Second, NGRPO employs Asymmetric Clipping, which relaxes the update magnitude for positive samples while imposing stricter constraints on that of negative samples. This serves to stabilize the exploration pressure introduced by the advantage calibration. Our experiments on Qwen2.5-Math-7B demonstrate that NGRPO significantly outperforms baselines such as PPO, GRPO, DAPO, and PSR-NSR on mathematical benchmarks including MATH500, AMC23, and AIME2025. These results validate NGRPO's ability to learn from homogeneous errors, leading to stable and substantial improvements in mathematical reasoning. Our code is available at https://github.com/nangongrui-ngr/NGRPO.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。