NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

It Takes Two: Your GRPO Is Secretly DPO

Yihong Wu, Liheng Ma, Lei Ding, Muzhi Li, Xinyu Wang, Kejia Chen, Zhan Su, Zhanguang Zhang, Chenyang Huang, Yingxue Zhang, Mark Coates, Jian-Yun Nie · DOI

Abstract

Group Relative Policy Optimization (GRPO) has emerged as a critical algorithm for training reasoning models like DeepSeek-R1. This paper demonstrates that GRPO is fundamentally an online variant of Direct Preference Optimization (DPO). By reframing the objective as contrastive learning, we show that the large group sizes typically associated with GRPO (e.g., $G=16$) are unnecessary. We introduce 2-GRPO, which utilizes a group size of only two, achieving 98% of the performance of 16-GRPO while reducing training time by nearly 80%.

Introduction

Post-training Large Language Models (LLMs) for complex reasoning typically relies on Reinforcement Learning (RL). While Proximal Policy Optimization (PPO) is the standard, its requirement for a "critic" model to estimate rewards imposes significant GPU memory overhead. GRPO was recently introduced to eliminate the critic by comparing a group of outputs for the same prompt and using their average as a baseline. However, the prevailing wisdom suggested that GRPO required large group sizes ($G=16$ or more) for stable estimation. This paper investigates whether such large groups are truly necessary or if the algorithm's success stems from a different mechanism.

Theoretical Framework: GRPO as Contrastive Learning

The authors provide a mathematical unmasking of the GRPO objective, proving that its gradient is equivalent to a contrastive loss estimator. Rather than merely estimating a baseline, GRPO functions as an $N$-vs-$M$ contrastive objective where correct answers are incentivized and incorrect ones are penalized. This establishes a formal link between GRPO and DPO; while DPO is typically an offline method learning from fixed datasets, GRPO acts as an online version that generates its own preferences via a reward model or verifier.

The group mechanism in GRPO acts as a control variate. The correlation between outputs from the same prompt helps cancel noise in the gradients, allowing even a group size of two to remain surprisingly stable.

The 2-GRPO Approach

We propose 2-GRPO, which utilizes a group size of $G=2$. To maintain a strong learning signal, we implement a Resampling Strategy (RS): if both samples in a pair are incorrect, the system continues sampling until a contrastive pair (one correct, one incorrect) is found. This ensures the model always has meaningful comparisons to learn from, even on difficult problems where the initial success rate is low.

Validation scores over time comparing 2-GRPO with resampling to 16-GRPO.

Experimental Results

The approach was evaluated on Reinforcement Learning with Verifiable Rewards (RLVR) benchmarks, including MATH, AMC 2023, and Code-R1-12k.

Efficiency and Performance

Empirical results demonstrate that 2-GRPO is highly efficient. Across models like Qwen-7B and DeepSeek-1.5B, 2-GRPO retained 98.1% of the performance of 16-GRPO. Crucially, training with 2-GRPO required only 21% of the wall-clock time and 12.5% of the total rollouts compared to the $G=16$ baseline.

Scaling and Generalization

On the Qwen-7B model, 2-GRPO occasionally outperformed 16-GRPO on specific benchmarks like Minerva Math. The method also generalized well to non-arithmetic tasks such as vision reasoning (Geometric3K) and code generation (Code-R1-12k), confirming that the contrastive signal is a robust driver of reasoning capabilities.

Conclusion

GRPO's success is rooted in its contrastive signal rather than its ability to estimate a "poor man's critic" baseline. By leveraging this insight, 2-GRPO offers a path to training state-of-the-art reasoning models with significantly fewer resources. Future work will explore the application of this minimalist framework to continuous reward scenarios and longer reasoning chains.

Summary updated

BibTeX
@inproceedings{wu2025it,
  author = {Yihong Wu and Liheng Ma and Lei Ding and Muzhi Li and Xinyu Wang and Kejia Chen and Zhan Su and Zhanguang Zhang and Chenyang Huang and Yingxue Zhang and Mark Coates and Jian-Yun Nie},
  title = {{It Takes Two: Your GRPO Is Secretly DPO}},
  booktitle = {ER @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=evlIZKNVt7},
}
Figure