Group Relative Policy Optimization (GRPO) has emerged as an effective method for training reasoning models. While it computes advantages based on group mean, GRPO treats each output as an independent sample during the optimization and overlooks a vital structural signal: the natural contrast between correct and incorrect solutions within the same group, thus ignoring the rich, comparative data that could be leveraged by explicitly pitting successful reasoning traces against failed ones. To capitalize on this, we present a contrastive reformulation of GRPO, showing that the GRPO objective implicitly maximizes the margin between the policy ratios of correct and incorrect samples. Building on this insight, we propose Bilateral Context Conditioning (BICC), a mechanism that allows the model to cross-reference successful and failed reasoning traces during the optimization, enabling a direct information flow across samples. We further introduce Reward-Confidence Correction (RCC) to stabilize training by dynamically adjusts the advantage baseline in GRPO using reward-confidence covariance derived from the first-order approximation of the variance-minimizing estimator. Both mechanisms require no additional sampling or auxiliary models and can be adapted to all GRPO variants. Experiments on mathematical reasoning benchmarks demonstrate consistent improvements across comprehensive models and algorithms. Code is available at \href{https://github.com/Skylanding/BiCC}{https://github.com/Skylanding/BiCC}.
翻译:群体相对策略优化(GRPO)已成为训练推理模型的有效方法。虽然它基于群体均值计算优势函数,但在优化过程中将每个输出视为独立样本,忽略了一个关键的结构性信号:同一群体内正确与错误解决方案之间的天然对比,从而忽视了通过显式对比成功与失败推理轨迹所能利用的丰富比较数据。为充分利用这一信号,我们提出GRPO的对比重构形式,证明GRPO目标函数隐式地最大化正确与错误样本策略比率之间的间隔。基于此洞见,我们提出双边上下文条件化(BICC)机制,使模型在优化过程中能够交叉参考成功与失败的推理轨迹,实现样本间的直接信息流动。我们进一步引入奖励-置信度校正(RCC),通过采用方差最小估计器一阶近似导出的奖励-置信度协方差动态调整GRPO中的优势基线,从而稳定训练过程。两种机制均无需额外采样或辅助模型,可适配所有GRPO变体。在数学推理基准测试上的实验表明,该方法在多种模型与算法中均能带来持续的性能提升。代码发布于 \href{https://github.com/Skylanding/BiCC}{https://github.com/Skylanding/BiCC}。