Graph-GRPO: Training Graph Flow Models with Reinforcement Learning

Baoheng Zhu, Deyu Bo, Delvin Ce Zhang, Xiao Wang

Graph generation is a fundamental task with broad applications, particularly in drug discovery. While discrete graph flow models (GFMs) have emerged as powerful tools due to their flexible sampling and strong performance, aligning them with complex human preferences or task-specific objectives remains a significant challenge. Specifically, fine-tuning GFMs using reinforcement learning (RL) faces two major hurdles: the differentiability gap and the sparse reward problem.

The Challenge of Aligning Graph Flow Models

Generating graphs—especially complex molecules—that satisfy stringent requirements (such as high protein binding affinity coupled with low toxicity) is incredibly difficult. When applying RL to fine-tune GFMs for these goals, researchers encounter two primary obstacles:

  1. The Differentiability Gap: Standard RL algorithms rely on policy gradients, which require the model's actions to be differentiable. Existing GFMs estimate action probabilities using Monte Carlo sampling. This stochastic process is non-differentiable and effectively "breaks" the gradient flow needed for training.
  2. The Sparse Reward Problem: Most graphs generated entirely from scratch (de novo) are invalid or of low quality. Consequently, the RL agent rarely receives a positive "reward" signal, making it nearly impossible for the model to learn how to improve.

Introducing Graph-GRPO

To address these issues, researchers propose Graph-GRPO, an online RL framework that builds upon the Group Relative Policy Optimization (GRPO) algorithm. Graph-GRPO introduces two primary innovations that allow GFMs to explore high-reward regions of the chemical space more efficiently:

1. Analytic Transition Probability

The "aha moment" of this research is the realization that stochastic sampling is not strictly necessary for training. By solving the underlying Kolmogorov forward equations for the flow model, the authors derived a closed-form mathematical expression for the transition rate. This replaces random Monte Carlo sampling, making the entire generation rollout fully differentiable and allowing the model to be optimized directly via policy gradients.

2. Iterative Refinement (Renoising)

To overcome the sparse reward problem, Graph-GRPO moves beyond simple de novo generation. The system maintains a "priority pool" of high-scoring graphs. During each cycle, it selects a promising graph, injects a controlled amount of noise into it (Renoising), and then prompts the model to regenerate the missing parts (Regeneration). This enables a highly efficient local search within the generative space. The authors found that tweaking a nearly perfect molecule is significantly more effective than attempting to invent one from scratch.

Additionally, the model utilizes Dynamic Priors, adaptively updating its starting noise distribution based on the characteristics of previously discovered high-reward graphs to focus the search on productive areas.

Experimental Setup and Key Results

The framework was rigorously evaluated across synthetic benchmarks (Planar and Tree topologies) and real-world molecular optimization tasks, utilizing the ZINC250k dataset for pre-training.

  • State-of-the-Art Molecular Optimization: On the Practical Molecular Optimization (PMO) benchmark—consisting of 23 diverse tasks evaluated under a strict budget of 10,000 oracle calls—Graph-GRPO achieved a record AUC-top10 score of 19.270, outperforming specialized fragment-based RL methods and classic genetic algorithms.
  • Superior Protein Docking: In tasks aiming to maximize binding affinity for five target proteins (parp1, fa7, 5ht1b, braf, jak2), Graph-GRPO demonstrated massive improvements. For the parp1 target, it achieved a 60.7% hit ratio, obliterating the 9.8% hit ratio of the previous best RL-based graph model (GDPO).
  • High Fidelity with Speed: Unlike graph diffusion models that often require up to 1,000 denoising steps, Graph-GRPO achieves superior results in just 50 steps. On synthetic tasks, it reached 95.0% (Planar) and 97.5% (Tree) Valid-Unique-Novelty (V.U.N.) scores, proving it maximizes rewards without sacrificing structural integrity.

Limitations and Future Directions

While highly effective, Graph-GRPO's training memory requirements scale quadratically ($O(N^2)$) with the number of nodes ($N$) due to its Graph Transformer architecture. This computational scaling may currently limit the size of the graphs the model can process. Furthermore, the refinement strategy relies on computationally expensive "oracle calls" (simulations) to evaluate rewards.

Looking forward, the authors suggest that the Graph-GRPO framework has potential far beyond drug discovery. Future applications could include material generation, such as the automated design of novel polymers or crystal structures.

Summary updated

BibTeX
@inproceedings{zhu2026graph,
  author = {Baoheng Zhu and Deyu Bo and Delvin Ce Zhang and Xiao Wang},
  title = {{Graph-GRPO: Training Graph Flow Models with Reinforcement Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=Abko94Sl7D},
}
Figure