Generating graphs—whether they represent life-saving molecules or complex social networks—is notoriously difficult. Unlike images, graphs are discrete, unordered, and vary wildly in size. While diffusion models have revolutionized continuous image generation, applying them to the discrete, "all-or-nothing" world of graph edges often feels like trying to fit a square peg in a round hole.
In this paper, researchers introduce GraphBSI (Discrete Bayesian Sample Inference for Graph Generation), a novel framework that moves away from "noising" the data itself. Instead, it iteratively refines a belief (a probability distribution) over the graph structure in a continuous parameter space.
TL;DR
GraphBSI is a one-shot generative model that treats graph construction as a sequence of Bayesian updates, evolving a distribution of potential graphs rather than noisy samples. By formulating this process as a noise-controlled Stochastic Differential Equation (SDE), the authors achieve state-of-the-art results on molecular benchmarks like Moses and GuacaMol with significantly fewer steps than traditional models.
What Problem Does This Paper Address?
Traditional generative models like GANs or standard Diffusion struggle with graphs because graphs are discrete and lack a natural ordering. Autoregressive models, which generate one node at a time, solve the ordering problem but are slow and computationally expensive.
Recently, Bayesian Flow Networks (BFNs) emerged as a solution by operating on the parameters of a distribution (like the logits of a categorical distribution) rather than the samples themselves. However, BFNs are mathematically dense and can be difficult to tune. GraphBSI builds on Bayesian Sample Inference (BSI), a framework that simplifies BFNs by viewing generation as a series of Bayesian updates. The challenge addressed here is extending this "belief-refinement" logic to the complex, discrete structures of graphs while maintaining mathematical rigor and sampling efficiency.
Methods
The core of GraphBSI is the transition from discrete graph states to a continuous "probability simplex."
- Categorical BSI: The authors represent nodes and edges as categorical variables. They start with a "prior belief" (random noise in logit space) and use a neural network to predict the final graph.
- Bayesian Updates: Each step of the generation process takes a "noisy measurement" of the predicted graph and uses Bayes' Theorem to update the current belief.
- The SDE Formulation: By taking the limit of these updates as the steps become infinitesimal, the authors derive a Stochastic Differential Equation (SDE).
- Noise Control ($\gamma$): A key innovation is the introduction of a parameter, $\gamma$, which allows the user to interpolate between a deterministic "probability flow" (like an ODE) and a highly stochastic sampler. This allows the model to "correct" its own mistakes during the generation process.
- OU Sampling: To solve the SDE during inference, they use an Ornstein-Uhlenbeck (OU) discretization, which proves much more stable than standard methods when high levels of noise are used.
Key Insights and Ideas
- Parameter Space is Smoother: By evolving the logits of the distribution rather than the discrete categories, the "path" from noise to a valid graph becomes continuous and differentiable. This bypasses the "jumpiness" that plagues discrete diffusion.
- The Power of $\gamma$: The authors found that "noise control" is a massive performance driver. At $\gamma=0$, the model is deterministic but cannot recover from early errors. At higher $\gamma$ values, the model effectively "overwrites" its previous state with new information, allowing for much higher quality samples.
- Quantization > Sampling: In the final stages of generation, the model's belief is usually sharp enough that the neural network can predict the final graph perfectly. The authors show that "quantizing" (taking the most likely category) at the end is more efficient than continuing to sample with noise.
- BSI as a Bridge: The paper elegantly shows that BSI is not just a new method, but a generalization that connects Bayesian Flow Networks, Diffusion models, and Flow Matching into a single theoretical framework.
Key Results
The authors evaluated GraphBSI across several domains, including molecular generation (Moses, GuacaMol, QM9), synthetic graphs (Planar, Trees, SBM), and even sequences (DNA, toy categorical datasets).
- SOTA Performance: GraphBSI achieved state-of-the-art results on almost all metrics for GuacaMol and Moses. Notably, it saturated the "Validity" metric (generating 100% chemically valid molecules) on GuacaMol.
- Efficiency: The model outperforms existing one-shot models like DeFoG and GraphBFN even with as few as 50 function evaluations, making it highly practical for real-world use.
- Stability: The custom OU discretization remained stable at noise levels where standard Euler-Maruyama schemes failed, proving crucial for high-fidelity generation.
Limitations and Future Work
While powerful, GraphBSI shares a common limitation with most graph transformers: its computational cost grows quadratically ($O(N^2)$) with the number of nodes, limiting its ability to generate massive networks. Additionally, the number of nodes is currently sampled from the training distribution before the graph features are generated. The authors suggest that exploring "jump diffusion"—allowing nodes to appear or disappear during the process—and more memory-efficient graph neural network architectures are promising directions for scaling GraphBSI to even larger datasets.
Summary updated