GraphGUIDE: interpretable and controllable conditional graph generation with discrete Bernoulli diffusion

Alex M. Tseng, Nathaniel Diamant, Tommaso Biancalani, Gabriele Scalia

TL;DR

GraphGUIDE introduces a discrete Bernoulli diffusion framework for graph generation that enables precise, manual control over structural properties. By operating directly on binary edge states rather than continuous relaxations, it allows researchers to enforce specific motifs or constraints during the generation process with 100% success, without requiring retraining or predefined labels.

What Problem Does This Paper Address?

Diffusion models have revolutionized generative AI, but applying them to graphs—especially for drug discovery—remains challenging. Most current graph diffusion methods rely on continuous noise, which results in "fractional" or negative edge values during the intermediate steps of generation. This makes the process a "black box": it is nearly impossible for a human to interpret what a 0.6 probability of an edge means mid-generation, let alone control it.

Furthermore, existing "conditional" generation methods (like classifier guidance) act as soft constraints. They "nudge" the model toward a desired property, but they don't guarantee it. They also require a predefined set of labels and expensive retraining if you want to generate a graph with a new, specific property (e.g., "this molecule must contain a toluene ring"). GraphGUIDE aims to bridge this gap by providing a framework that is both fully interpretable and strictly controllable.

Methods

The core innovation of GraphGUIDE is Bernoulli diffusion on edges. Instead of adding Gaussian noise to an adjacency matrix, the model defines a forward process where edges are flipped or set according to a Bernoulli distribution.

The authors derive three specific discrete diffusion kernels:

  1. Bit-flip kernel: Randomly toggles edges on or off. The prior distribution is an Erdős–Rényi graph ($p=0.5$).
  2. Bit-one kernel: Randomly sets bits to 1 (adds edges). The prior is a complete graph. In reverse diffusion, the model learns to remove edges.
  3. Bit-zero kernel: Randomly sets bits to 0 (removes edges). The prior is an empty graph. In reverse diffusion, the model learns to add edges.
Overview of the interpretable and controllable graph diffusion process.

Because every intermediate step in both forward and reverse diffusion is a well-defined, discrete graph, a user can manually intervene. For example, if a specific motif is required, the user can simply "lock" those edges at every step of the reverse diffusion process. Because the model is trained on discrete graphs, these manually edited intermediates remain "in-distribution," ensuring the neural network (a Graph Attention Network in this study) continues to function reliably.

The three Bernoulli diffusion kernels: Bit-flip, Bit-one, and Bit-zero.

Datasets

The authors evaluated GraphGUIDE on several benchmark and synthetic datasets:

  • Community-small: Graphs consisting of two communities with sparse inter-community links.
  • Stochastic Block Models (SBM): Graphs with multiple clusters and specific intra/inter-block edge probabilities.
  • Cliques: A synthetic dataset containing cliques of sizes 3 to 6.
  • Molecule-like graphs: A custom dataset mimicking organic chemistry structures, featuring "backbone" nodes (like carbons) and "secondary" nodes (like halogens).

Key Insights and Ideas

  • Discreteness is the Key to Control: By avoiding continuous relaxations, the model ensures that every intermediate state is a valid graph. This allows for "hard" constraints that are impossible in continuous space.
  • Kernel Selection for Specific Tasks: The choice of kernel matters for control. The Bit-one kernel is ideal for ensuring specific edges are retained (since the reverse process only removes edges), while the Bit-zero kernel is best for ensuring specific edges are never added.
  • Zero-Shot Property Injection: Unlike traditional conditional models, GraphGUIDE can enforce properties that were never explicitly labeled during training. As long as the property can be defined structurally (by the presence or absence of edges), it can be injected during sampling.
  • Robustness to Intervention: Because the manual edits result in valid discrete graphs, the denoising network doesn't "break" when a human changes the intermediate state, a common failure point in continuous diffusion models.

Key Results

  • Generative Quality: GraphGUIDE achieves generative performance (measured by Maximum Mean Discrepancy or MMD) comparable to state-of-the-art discrete models like DiGress and outperforms several other baselines like GraphRNN and MolGAN.
  • 100% Control Success: In experiments enforcing 6-cliques, disjoint communities, or 6-membered backbone rings, GraphGUIDE achieved a 100% success rate. In contrast, unconditional generation only produced these properties 68%, 21%, and 12% of the time, respectively.
  • Extrapolation: Interestingly, when constrained to generate a 6-clique, the model occasionally "over-delivered" by generating 7- or 8-cliques, showing it can generalize beyond the exact motifs seen in the training data.
Examples of graphs generated with manual control, such as enforcing specific rings or disjoint communities.

Limitations and Future Work

  • Structural Definition Requirement: The manual control currently requires the desired property to be definable by specific edges or motifs. It is not yet clear how to manually control for high-level properties like "high binding affinity" or "low toxicity" without falling back on standard classifier-based methods.
  • Node Features: This work focused primarily on edge diffusion. While the authors suggest the framework can be extended to node features (using multinomial kernels), they did not implement it in this specific study.
  • Scalability: The experiments were conducted on relatively small graphs (up to 40 nodes). Scaling these discrete kernels to very large graphs while maintaining efficiency is a promising direction for future research.

Summary updated

BibTeX
@misc{tseng2023graphguide,
  author = {Alex M. Tseng and Nathaniel Diamant and Tommaso Biancalani and Gabriele Scalia},
  title = {{GraphGUIDE: interpretable and controllable conditional graph generation with discrete Bernoulli diffusion}},
  year = {2023},
  eprint = {2302.03790},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2302.03790},
}
Figure