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

GRPO-Guard: Mitigating Implicit Over-Optimization in Flow Matching via Regulated Clipping

Jing Wang, Jiajun Liang, Jie Liu, Henglin Liu, Gongye Liu, Jun Zheng, Wanyuan Pang, Ao Ma, Zhenyu Xie, Xintao Wang, Meng Wang, Pengfei Wan, Xiaodan Liang

TL;DR

GRPO-Guard addresses a critical flaw in applying reinforcement learning to flow-matching and diffusion models, where optimization often leads to severe "reward hacking" and degraded image quality. By introducing ratio normalization and gradient reweighting, it fixes a fundamental mathematical mismatch between discrete language models and continuous diffusion models, ensuring stable training and high-quality visual generation.

What Problem Does This Paper Address?

Reinforcement learning methods like Group Relative Policy Optimization (GRPO) have successfully aligned Large Language Models (LLMs) with human preferences. Recently, frameworks like FlowGRPO and DanceGRPO have attempted to port this success over to flow-matching and diffusion models to improve image aesthetics and prompt alignment.

However, the authors identify a major issue: implicit over-optimization. As training progresses, the proxy reward score keeps going up, but the actual visual quality, diversity, and text-image consistency of the generated images completely collapse.

Figure 1. Comparison between FlowGRPO and GRPO-Guard under over-optimization. Left: The proxy score and gold score trends during training. As the proxy score increases, FlowGRPO rapidly enters an over-optimization phase, where the gold score continuously declines. Right: A visual comparison between FlowGRPO and GRPO-Guard. Due to severe reward hacking, FlowGRPO suffers from a drastic degradation in diversity, detail richness, visual quality, and text-image consistency (upper part). In contrast, GRPO-Guard maintains a stable gold score and high visual quality under a comparable proxy score, as shown in the bottom part of the figure.

This reward hacking happens because of a fundamental design mismatch. LLMs operate on discrete token probabilities, whereas diffusion models compute continuous Gaussian probabilities. This quadratic nature causes the importance-ratio distribution to shift left (mean < 1) and its variance to fluctuate wildly across different denoising timesteps. As a result, the standard PPO clipping mechanism fails to constrain overconfident positive updates, allowing the model to exploit the reward function ruthlessly.

Methods

To restore the protective properties of the clipping mechanism, the authors propose GRPO-Guard, which introduces two core components:

  1. Ratio Normalization (RatioNorm): Instead of using the raw importance ratio, RatioNorm standardizes the log-importance ratio at each denoising step. This mathematical adjustment shifts the mean back toward zero and eliminates the distorting influence of denoising scheduler parameters, allowing the upper and lower clipping bounds to function symmetrically as originally intended.
  2. Gradient Reweighting Strategy: Even with normalized ratios, gradients at low-noise timesteps can be disproportionately larger than those at high-noise timesteps. GRPO-Guard incorporates a reweighting factor ($\delta = 1/dt$) directly into the policy loss to equalize gradient magnitudes across the entire denoising trajectory, preventing any single timestep from dominating the optimization process.

Datasets

The authors evaluated their method across several prominent diffusion backbones, including Stable Diffusion 3.5 (SD3.5-M) and Flux.1-dev.

To evaluate performance, they utilized three distinct proxy tasks:

  • GenEval: For object-focused text-to-image alignment.
  • TextRender: For text generation accuracy within images.
  • PickScore: For overall human preference alignment.

To detect reward hacking, they constructed a composite "Gold Score" baseline using independent, robust evaluation metrics: HPSv2, ImageReward, and UnifiedReward.

Key Insights and Ideas

  • The Continuous vs. Discrete Mismatch: The root cause of reward hacking in diffusion RL isn't just a flawed reward model; it's a structural mathematical anomaly born from applying discrete token optimization logic to continuous Gaussian state transitions.
  • Clipping Failure Mode: Because the importance-ratio distribution naturally shifts left in standard flow matching, positive-advantage samples rarely cross the upper clipping threshold. This means the algorithm effectively loses its brakes for positive updates.
Figure 2. Comparison of r(θ) distributions between FlowGRPO and GRPO-Guard across timesteps. (a) Ideally, the ratio distribution should have a mean near 1 and stable variance across timesteps to ensure effective clipping. (b) Under FlowGRPO, the distribution exhibits a leftward mean shift and increasing variance at low-noise timesteps, causing the clipping mechanism to fail—particularly for trajectories with positive advantages. In contrast, GRPO-Guard with RatioNorm preserves a balanced mean and consistent variance (c), enabling proper clipping and stable policy updates across all timesteps.
  • Timestep Dominance: Without gradient balancing, the policy model tends to overfit to specific noise conditions (often low-noise steps), sacrificing early-step exploration and diversity.

Key Results

GRPO-Guard consistently prevents over-optimization while matching or exceeding the proxy reward gains of baseline methods.

  • Stabilized Gold Scores: On the GenEval task using SD3.5-M, while FlowGRPO's composite gold score dropped to 0.84, GRPO-Guard achieved a score of 1.20 at 10,200 steps.
  • Gradient Equalization: Standard FlowGRPO exhibits a massive ~20× variation in gradient magnitudes across different timesteps. GRPO-Guard successfully compresses this imbalance down to just ~2.5×, leading to a much more stable training trajectory.
Figure 3. Gradient magnitude differences across timesteps. In FlowGRPO, gradient magnitudes vary by roughly 20× across timesteps, reflecting the large differences in gradient scale. GRPO-Guard substantially reduces this imbalance, limiting the variation to about 2.5× and preventing over-optimization under any single noise condition.
  • Qualitative Improvements: Visually, GRPO-Guard eliminates the severe artifacts seen in baseline over-optimization, such as repetitive text flooding, unnatural body distortions, and prominent horizontal/vertical stripe artifacts.

Limitations and Future Work

While GRPO-Guard successfully fixes the mechanics of the clipping optimization, the authors note that it cannot completely eliminate reward hacking stemming from intrinsic flaws in the reward models themselves (i.e., the fundamental gap between what a proxy model scores and true human preference).

The authors suggest that scaling up reward models or designing more efficient, perfectly aligned reward functions remains a vital direction for future research in generative policy optimization.

Summary updated

BibTeX
@inproceedings{wang2026grpo,
  author = {Jing Wang and Jiajun Liang and Jie Liu and Henglin Liu and Gongye Liu and Jun Zheng and Wanyuan Pang and Ao Ma and Zhenyu Xie and Xintao Wang and Meng Wang and Pengfei Wan and Xiaodan Liang},
  title = {{GRPO-Guard: Mitigating Implicit Over-Optimization in Flow Matching via Regulated Clipping}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=kPu56Q5LQh},
}
Figure