Papers
Topics
Authors
Recent
Search
2000 character limit reached

Graph-GRPO: Training Graph Flow Models with Reinforcement Learning

Published 11 Mar 2026 in cs.LG | (2603.10395v1)

Abstract: Graph generation is a fundamental task with broad applications, such as drug discovery. Recently, discrete flow matching-based graph generation, \aka, graph flow model (GFM), has emerged due to its superior performance and flexible sampling. However, effectively aligning GFMs with complex human preferences or task-specific objectives remains a significant challenge. In this paper, we propose Graph-GRPO, an online reinforcement learning (RL) framework for training GFMs under verifiable rewards. Our method makes two key contributions: (1) We derive an analytical expression for the transition probability of GFMs, replacing the Monte Carlo sampling and enabling fully differentiable rollouts for RL training; (2) We propose a refinement strategy that randomly perturbs specific nodes and edges in a graph, and regenerates them, allowing for localized exploration and self-improvement of generation quality. Extensive experiments on both synthetic and real datasets demonstrate the effectiveness of Graph-GRPO. With only 50 denoising steps, our method achieves 95.0\% and 97.5\% Valid-Unique-Novelty scores on the planar and tree datasets, respectively. Moreover, Graph-GRPO achieves state-of-the-art performance on the molecular optimization tasks, outperforming graph-based and fragment-based RL methods as well as classic genetic algorithms.

Summary

  • The paper introduces an analytic, fully differentiable transition-rate formula that replaces Monte Carlo pseudo-clean-state sampling, enabling policy-gradient optimization for graph flow models.
  • Graph-GRPO combines GRPO training with priority-pool renoising and regeneration, achieving 95.0% V.U.N. on Planar and 97.5% on Tree graphs using only 50 denoising steps.
  • The method improves molecular discovery under limited oracle calls, reaching 18.987 cold-start AUC-top10 on PMO and a 60.76% docking hit ratio for parp1, while requiring reward curricula for extremely sparse objectives.

Motivation and problem statement

Graph flow models (GFMs), which formulate graph generation as a continuous-time Markov chain (CTMC) over discrete node and edge states, offer strong sample quality and flexible inference-time control through the number of denoising steps. However, aligning these models with task-specific objectives—binding affinity, scaffold constraints, structural validity—remains difficult. The paper identifies two obstacles to applying online reinforcement learning (RL) to GFMs. First, policy-gradient methods require differentiable action probabilities, but existing GFMs estimate transition rates via Monte Carlo sampling of a pseudo-clean state z^1\hat{z}_1 from the denoiser's prediction, which breaks the gradient path. Second, de novo generation produces sparse rewards in goal-directed settings: most sampled graphs are invalid or low-quality, so exploration is ineffective. Graph-GRPO addresses both problems within a Group Relative Policy Optimization (GRPO) framework built on DeFoG as the base model (2603.10395).

Analytic transition probabilities

The core technical contribution is a closed-form expression for the GFM rate matrix that eliminates Monte Carlo estimation. Starting from the conditional rate matrix of Campbell et al., which requires knowledge of the clean state z1z_1, the authors take the expectation over the denoiser's predicted distribution pθ(⋅∣zt)p_\theta(\cdot \mid z_t) and analytically sum over all possible clean states. Grouping terms by whether the hypothesized clean state equals the current state, the target state, or neither yields:

Rtθ(zt,zt+dt)=pθ(zt+dt)V1+(1−pθ(zt)−pθ(zt+dt))V2,R_t^\theta(z_t, z_{t+\mathrm{d}t}) = p_{\theta}(z_{t+\mathrm{d}t})V_1 + (1 - p_{\theta}(z_t) - p_{\theta}(z_{t+\mathrm{d}t}))V_2,

where V1V_1 and V2V_2 depend only on the prior p0p_0, the time tt, and the state count Zt>0Z_t^{>0}, and can be precomputed before generation. This construction has two properties that matter for RL. It is fully differentiable with respect to θ\theta, so the importance-sampling ratio z1z_10 needed for PPO-style clipping is well-defined. It also removes the train–inference mismatch that arises when the old and new policies sample different pseudo-graphs z1z_11—a failure mode the authors note would persist even under Gumbel-Softmax relaxation.

The derivation assumes the prior z1z_12 has full support, which keeps z1z_13 positive and makes z1z_14 constant; the practical implementation additionally computes off-diagonal probabilities directly and derives the diagonal by normalization to guarantee valid categorical distributions. Notably, the framework also learns the prior non-parametrically: empirical marginals over node types, edge types, and graph sizes are estimated from a top-z1z_15 global reward buffer and updated via exponential moving average (z1z_16), so that initial noise states concentrate on high-reward structural regions.

RL training and refinement

Training follows standard GRPO: for each noisy initial graph z1z_17, z1z_18 trajectories are rolled out in parallel, rewards are group-normalized into advantages, and the clipped surrogate objective with asymmetric clipping (z1z_19, pθ(⋅∣zt)p_\theta(\cdot \mid z_t)0, following DAPO) is optimized, with a KL penalty (pθ(⋅∣zt)p_\theta(\cdot \mid z_t)1) against the pre-trained reference to limit reward hacking.

The refinement strategy addresses the sparse-reward problem at the inference level. A priority pool stores the top-pθ(⋅∣zt)p_\theta(\cdot \mid z_t)2 (pθ(⋅∣zt)p_\theta(\cdot \mid z_t)3) graphs by reward; each candidate is renoised to an intermediate time pθ(⋅∣zt)p_\theta(\cdot \mid z_t)4 via the conditional probability path and re-denoised, generating variants that compete for pool membership. The perturbation level pθ(⋅∣zt)p_\theta(\cdot \mid z_t)5 controls the exploration–exploitation trade-off, and ablations show that large values (pθ(⋅∣zt)p_\theta(\cdot \mid z_t)6–pθ(⋅∣zt)p_\theta(\cdot \mid z_t)7, with pθ(⋅∣zt)p_\theta(\cdot \mid z_t)8 used in practice) work best, while aggressive perturbation (pθ(⋅∣zt)p_\theta(\cdot \mid z_t)9) degrades molecular structure—though even Rtθ(zt,zt+dt)=pθ(zt+dt)V1+(1−pθ(zt)−pθ(zt+dt))V2,R_t^\theta(z_t, z_{t+\mathrm{d}t}) = p_{\theta}(z_{t+\mathrm{d}t})V_1 + (1 - p_{\theta}(z_t) - p_{\theta}(z_{t+\mathrm{d}t}))V_2,0-adjacent settings outperform pure de novo generation on tasks like Valsartan SMARTS. The authors are careful to state that all oracle calls consumed during refinement count against the evaluation budget.

Experimental results

Synthetic graph generation. On the Planar and Tree benchmarks (64-node graphs), Graph-GRPO with only 50 denoising steps achieves 95.0% and 97.5% Valid-Unique-Novel (V.U.N.) scores, respectively. On Tree, this is a large improvement over the DeFoG base model at the same step count (73.5%), and it exceeds diffusion baselines using 1,000 steps, including DiGress (90.0%) and GDPO (73.8% on Planar). On Planar, the V.U.N. matches DeFoG while the ratio metric improves from 3.2 to 1.5, indicating better structural alignment; the full appendix tables show Graph-GRPO slightly below Cometh-PC and DeFoG's 99.5% V.U.N. at full sampling budgets, so the RL gains are most pronounced under constrained step counts and on the harder Tree distribution.

Protein docking. Following the GDPO protocol on five targets (parp1, fa7, 5ht1b, braf, jak2), Graph-GRPO achieves the best or near-best top-5% docking scores and dramatically higher hit ratios—for parp1, a 60.76% hit ratio, roughly 6× the best baseline (GDPO at 9.81%). Since generation is capped at 2,048 molecules, the authors note that the hit ratio itself feeds back into the docking score by enlarging the candidate pool, a caveat on interpreting the DS comparison in isolation. Validity and uniqueness remain near-perfect (≈98–100%) across targets.

PMO benchmark. Under the strict 10,000-oracle-call budget, Graph-GRPO reaches a summed AUC-top10 of 18.987 in the cold-start setting and 19.270 with prescreening, versus 18.993 (prescreened InVirtuoGen) and 16.676 (cold-start InVirtuoGen). A strong claim here is that a model pretrained only on ZINC250k matches or exceeds fragment-based baselines pretrained on over a billion molecules. The cold-start advantage is concentrated on hard rediscovery tasks (Thiothixene, Troglitazone), which the authors attribute to effective exploration of high-potential chemical space. One exception is Valsartan SMARTS, where prescreened InVirtuoGen scores higher (0.935 vs. 0.841); the paper handles this task with a two-stage curriculum—first optimizing the binary substructure indicator, then the full geometric-mean reward—because the multiplicative reward otherwise suppresses gradients below Rtθ(zt,zt+dt)=pθ(zt+dt)V1+(1−pθ(zt)−pθ(zt+dt))V2,R_t^\theta(z_t, z_{t+\mathrm{d}t}) = p_{\theta}(z_{t+\mathrm{d}t})V_1 + (1 - p_{\theta}(z_t) - p_{\theta}(z_{t+\mathrm{d}t}))V_2,1. This concession is significant: on tasks with severely multiplicative sparse rewards, the method requires task-specific reward shaping to train at all.

Ablations. On PMO, RL training alone lifts the DeFoG base model from 11.079 to 17.450 AUC-top10; refinement adds a further gain to 18.987, and prescreening to 19.270. The components are therefore complementary, with RL training contributing the largest share.

Limitations and open questions

The paper concedes several boundaries. The analytic rate matrix derivation relies on full-support priors and the specific rectified-flux rate construction of DeFoG; whether the closed form extends to other conditional paths or non-uniform priors lacking full support is not established. The Valsartan SMARTS curriculum shows that the framework is sensitive to reward sparsity and multiplicative reward structure, and the two-stage workaround is hand-designed per task. The refinement hyperparameter Rtθ(zt,zt+dt)=pθ(zt+dt)V1+(1−pθ(zt)−pθ(zt+dt))V2,R_t^\theta(z_t, z_{t+\mathrm{d}t}) = p_{\theta}(z_{t+\mathrm{d}t})V_1 + (1 - p_{\theta}(z_t) - p_{\theta}(z_{t+\mathrm{d}t}))V_2,2 is fixed at 0.8 across benchmarks, and the paper does not explore adaptive schedules. Evaluation on PMO counts refinement oracle calls against the budget, but the 250k-call prescreening cost in the prescreening setting is a separate expense not available in all practical regimes. Finally, the reported synthetic-dataset gains over the DeFoG base are concentrated at low step counts; at full budgets, non-RL baselines remain competitive on Planar.

Conclusion

Graph-GRPO makes online RL applicable to graph flow models by replacing Monte Carlo rate estimation with an analytic, fully differentiable transition probability, and complements it with a renoise-and-regenerate refinement scheme for localized exploration. The combination yields state-of-the-art results on molecular optimization benchmarks under strict oracle budgets and strong synthetic graph generation with 50 denoising steps, while leaving open the treatment of highly sparse multiplicative rewards without task-specific curricula and the generalization of the analytic rate derivation beyond the current flow-matching formulation.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Tweets

Sign up for free to view the 1 tweet with 1 like about this paper.