Graph Guided Diffusion: Unified Guidance for Conditional Graph Generation

Victor M. Tenorio, Nicolas Zilberstein, Santiago Segarra, Antonio G. Marques · 2025

Read Graph Guided Diffusion: Unified Guidance for Conditional Graph Generation by Victor M. Tenorio, Nicolas Zilberstein, Santiago Segarra, Antonio G. Marques (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2505-19685.txt.

Introduction

Victor Tenorio and co-authors propose Graph Guided Diffusion in 2025 for generating graphs under conditions set by reward signals. Diffusion models generate graphs well, but steering them is hard. Graphs are discrete and combinatorial, and many rewards cannot be differentiated, which blocks standard gradient guidance methods.

Their framework treats guided diffusion as a stochastic control problem. It unifies gradient, control-based, and zero-order guidance in one plug-and-play system. Pre-trained models can be guided at test time with no retraining. Tasks include motif constraints, fairness, and link prediction. Results show strong reward alignment with sample quality kept.

Catalog record

CREATORVictor M. Tenorio, Nicolas Zilberstein, Santiago Segarra, Antonio G. Marques
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE60 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2505-19685

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Graph Guided Diffusion: Unified Guidance for Conditional Graph Generation Victor M. Tenorio, Nicolas Zilberstein, Santiago Segarra, Antonio G. Marques Abstract Diffusion models have emerged as powerful generative models for graph generation, yet their use for conditional graph generation remains a fundamental challenge. In particular, guiding diffusion models on graphs under arbitrary reward signals is difficult: gradient-based methods, while powerful, are often unsuitable due to the discrete and combinatorial nature of graphs, and non-differentiable rewards further complicate gradient-based guidance. We propose Graph Guided Diffusion (GGDiff), a novel guidance framework that interprets conditional diffusion on graphs as a stochastic control problem to address this challenge. GGDiff unifies multiple guidance strategies, including gradient-based guidance (for differentiable rewards), control-based guidance (using control signals from forward reward evaluations), and zero-order approximations (bridging gradient-based and gradient-free optimization). This comprehensive, plug-and-play framework enables zero-shot guidance of pre-trained diffusion models under both differentiable and non-differentiable reward functions, adapting well-established guidance techniques to graph generation — a direction largely unexplored. Our formulation balances computational efficiency, reward alignment, and sample quality, enabling practical conditional generation across diverse reward types. We demonstrate the efficacy of GGDiff in various tasks, including constraints on graph motifs, fairness, and link prediction, achieving superior alignment with target rewards while maintaining diversity and fidelity. 1 Introduction Diffusion models have recently shown great promise for graph generation, enabling the synthesis of realistic graph structures across diverse domains such as drug design [ 36 ] , social networks [ 7 ] , and molecular dynamics [ 10 ] . A key motivation behind these models is their ability to serve as flexible generative priors , capturing complex dependencies in both graph topology and node features. However, most existing graph diffusion models focus on unconditional or controllable generation under simple objectives. Incorporating more general forms of rewards or constraints , such as enforcing specific structural properties, functional motifs, or domain-specific validity criteria like fairness, remains an essential and open challenge. Recent advances in conditional graph generation typically modify the diffusion trajectory using a conditional gradient to steer the process toward sampling from the desired conditional distribution. DiGress [ 34 ] combines a learnable regressor with classifier guidance [ 9 ] , while LGD [ 38 ] adopts a similar gradient-based strategy in a latent space instead of a discrete domain like DiGress. However, these approaches require differentiable constraints, which limits their applicability in more complex graph generation tasks where constraints might be black-box functions without tractable gradients or involve discrete structures. Closer to our approach, PRODIGY [ 28 ] enforces hard constraints through projected sampling along the diffusion trajectory using the bisection method [ 3 ] . This requires closed-form projection operators for a time-efficient implementation, which are often unavailable for complex constraints, necessitating expensive solvers, and limiting the applicability to more sophisticated conditions. As a result, no existing method can flexibly and effectively handle arbitrary, non-differentiable, or complex constraints in the sampling process for conditional graph generation. In this work, we propose Graph Guided Diffusion (GGDiff), a general guidance framework for graph generation that interprets conditional graph generation as a stochastic optimal control (SOC) problem. By casting the task as a control problem, we reformulate guided diffusion as a conditional generation process with an additional control variable defined as a linear drift term. Inspired by recent advances in SOC for diffusion models [ 24 , 11 , 26 ] , we optimize this control via path integral control, which provides an analytical yet intractable gradient. To overcome this limitation, we introduce gradient-free approximations based on zeroth-order (ZO) optimization techniques [ 15 , 16 ] . Our formulation generalizes several gradient-free strategies introduced previously [ 11 ] and offers new possibilities. GGDiff unifies various existing guidance methods in a single framework and is plug-and-play, allowing zero-shot guidance of pre-trained diffusion models under both differentiable and non-differentiable reward functions. We validate the advantages of GGDiff through extensive experiments on a wide range of constraints, including structural constraints, fairness, and link prediction. Our results demonstrate GGDiff’s versatility in guiding graph generation not only towards constraints previously explored in the literature (beating current state-of-the-art architectures) but also towards arbitrary, user-defined desired outcomes (such as fair or incomplete graphs), effectively balancing precise outcome satisfaction with the preservation of the underlying graph family’s characteristics. To summarize, our contributions are threefold: • We propose GGDiff, a framework for conditional graph generation that handles both differentiable and non-differentiable rewards by reformulating the problem as a stochastic optimal control (SOC) task. • We introduce a general gradient-free ZO optimization formulation to handle non-differentiable rewards, enabling optimization without requiring tractable gradients. • We conduct extensive experiments on structural, fairness, and link prediction constraints, demonstrating GGDiff’s superior performance and flexibility over existing methods. Figure 1 : Illustration of GGDiff, a method that guides the generation of graphs to satisfy a set of constraints (in this case, the constraint is fairness). The guidance {\mathbf{U}}_{t} is a local direction obtained via SOC, and approximated using ZO techniques, like the multi-point estimate shown here. 2 Background and Related Works We review graph diffusion models in the continuous domain in Section 2.1 , and then explain how they can be used in the context of inverse problems in Section 2.2 2.1 Diffusion Models on Graphs Diffusion models [ 29 , 8 , 31 ] are composed of two processes: i) a forward process that starts with clean data and gradually adds noise; and ii) a reverse process that learns to generate new data by iteratively denoising its diffused version. While graph diffusion models have been developed in both continuous [ 22 , 12 ] and discrete domains [ 34 , 4 ] , in this work we focus on the continuous case. We represent a graph as {\mathbf{G}}_{0}=\{{\mathbf{X}}_{0},{\mathbf{A}}_{0}\} , where {\mathbf{X}}_{0}\in{\mathbb{R}}^{N\times F} are node features and {\mathbf{A}}_{0}\in{\mathbb{R}}^{N\times N} is the weighted adjacency matrix. Then, following GDSS [ 12 ] , the forward diffusion process is defined by the stochastic differential equation \text{d}{\mathbf{G}}_{t}=-\frac{1}{2}\beta(t){\mathbf{G}}_{t}\,\mathrm{d}t+\sqrt{\beta(t)}\,\mathrm{d}{\mathbf{W}}_{t},\quad t\in[0,T] , where \beta(t) controls the noise schedule and is given by \beta(t):=\beta_{\mathrm{min}}+(\beta_{\mathrm{max}}-\beta_{\mathrm{min}})\frac{t}{T} . Here, {\mathbf{W}}_{t} denotes standard Brownian motion. This process is designed such that the distribution of {\mathbf{G}}_{T} converges to a standard Gaussian as t\to T . Notice that by construction, the forward process allows for interaction between the adjacency matrix and the node features. Based on this forward process, we define the reverse process as \text{d}{\mathbf{G}}_{t}=[-\frac{1}{2}{\mathbf{G}}_{t}-g(t)^{2}\nabla_{{\mathbf{G}}_{t}}\log p({\mathbf{G}}_{t})]\text{d}t+g(t)\text{d}{\mathbf{W}}_{t} , where \nabla_{{\mathbf{G}}_{t}}\log p({\mathbf{G}}_{t}) is the score function , which is unknown, and g(t)=\sqrt{\beta(t)} . In particular, GDSS considers two different score functions, namely \nabla_{{\mathbf{A}}_{t}}\log p({\mathbf{A}}_{t}) and \nabla_{{\mathbf{X}}_{t}}\log p({\mathbf{X}}_{t}) . Notice that the requirement for sampling, i.e., running the reverse process, is to have access to the score functions \nabla_{{\mathbf{A}}_{t}}\log p({\mathbf{A}}_{t}) and \nabla_{{\mathbf{X}}_{t}}\log p({\mathbf{X}}_{t}) , which are generally unknown. Instead, we approximate them with score networks \boldsymbol{\epsilon}_{\boldsymbol{\theta}_{A}}({\mathbf{A}}_{t},t)\approx-\sigma_{t}\nabla_{{\mathbf{A}}_{t}}\log p({\mathbf{A}}_{t}) and \boldsymbol{\epsilon}_{\boldsymbol{\theta}_{X}}({\mathbf{X}}_{t},t)\approx-\sigma_{t}\nabla_{{\mathbf{X}}_{t}}\log p({\mathbf{X}}_{t}) , and learn them by minimizing the denoising score-matching loss [ 35 ] . After training, samples are generated using samplers like DDPM [ 8 ] and DDIM [ 30 ] . 2.2 Controllable Generation of Graphs With Continuous Diffusion Models Given a condition {\mathcal{C}} and a reward function r({\mathbf{G}}_{0}) that quantifies how close the sample {\mathbf{G}}_{0} is to meeting {\mathcal{C}} , our objective is to generate graphs G_{0} that

Read the complete text