Skip to content
AI.info

Research

Discrete Bayesian Sample Inference for Graph Generation

Overview Research area: Generative machine learning for discrete structured data, specifically graph generation (molecular design, network synthesis), building on Bayesian Flow Networks and Bayesian S

arXiv
2511.03015
Published
2025-11-04
Authors
Ole Petersen, Marcel Kollovieh, Marten Lienen, Stephan Günnemann

AI summary

Overview

Research area: Generative machine learning for discrete structured data, specifically graph generation (molecular design, network synthesis), building on Bayesian Flow Networks and Bayesian Sample Inference.

Technical level: Advanced. The paper is theory-forward, deriving Bayesian updates, an ELBO, an SDE, and a noise-controlled SDE family, though its core intuition (iteratively sharpening a belief about a graph) is explainable without the mathematics.

Scope: The paper derives a categorical (discrete) formulation of Bayesian Sample Inference, formulates it as a stochastic differential equation, and applies the resulting model — GraphBSI — to one-shot molecular and synthetic graph generation, where it reaches state-of-the-art results.

What This Paper Is About

Most generative models work directly on samples (pixels, tokens, nodes), but graphs are discrete and unordered, which makes that awkward. This paper instead evolves a probability distribution over graphs in a continuous space, refining it step by step until it concentrates on a single valid graph. The goal is a one-shot, permutation-invariant graph generator that handles discreteness naturally and beats existing diffusion and flow-matching baselines on standard molecule benchmarks.

Key Contributions

  1. Categorical BSI derivation. The authors extend Bayesian Sample Inference from continuous data to categorical data, showing that a Gaussian noisy measurement of a one-hot sample updates the belief logits by a simple additive rule (z_post = z + αy). This generalizes Bayesian Flow Networks with a simpler interpretation and avoids the limit approximations BFNs rely on.

  2. SDE formulation and a noise-controlled family. They take the infinite-step limit of the discrete update to obtain an SDE, then use the Fokker-Planck equation to derive a one-parameter (γ) family of SDEs with identical marginals. γ = 0 gives a deterministic probability-flow ODE, γ = 1 recovers the base SDE, and large γ yields a highly stochastic sampler that effectively overwrites previous predictions each step.

  3. Practical samplers with an exact Ornstein-Uhlenbeck step. Because the score function is unavailable in closed form, they show the BSI training loss is also a score-matching loss and use it to parameterize the score. They then freeze the network prediction within each interval to solve the SDE exactly, yielding an OU discretization that stays stable where Euler-Maruyama diverges, plus a "quantize instead of sample" final step for efficiency.

  4. State-of-the-art empirical results. GraphBSI outperforms existing one-shot graph generators on GuacaMol and Moses, including at low compute budgets (50 function evaluations), and is competitive on synthetic planar, tree, and stochastic block model graphs.

Main Findings

  • State-of-the-art molecule generation. With 500 steps and OU discretization, GraphBSI beats all compared models on every metric on GuacaMol, saturating validity. On Moses, its Euler-Maruyama variant reduces the FCD (Fréchet ChemNet Distance) metric from 1.07 to 0.72, a substantial improvement over the prior best.

  • Competitive even at low budgets. At only 50 neural function evaluations, GraphBSI is already on par with or better than DeFoG across most metrics on both benchmarks, which matters for expensive per-sample generation.

  • Noise control is the dominant performance lever. Ablations across γ ∈ {0, 5, 20, 100, 250, 1000} and budgets from 25 to 500 evaluations show that all metrics perform poorly at γ = 0 — the deterministic probability-flow ODE equivalent to prior work — while moderate-to-high noise yields the best SNN and Filters scores and a medium noise level is optimal for FCD.

  • OU sampling is more robust than Euler-Maruyama. EM becomes unstable when γ·Δt grows too large, causing sharp performance drops; the exactly solved OU step remains stable and matches or exceeds EM at essentially every budget and noise level.

  • Final precision matters more than the schedule shape. An exponential precision schedule works best but barely beats a linear one. The critical parameter is the final precision β(t = 1): too large wastes steps, too small leaves samples noisy. The ideal value is just high enough for the reconstructor to recover the sample perfectly.

  • Sampling the initial belief helps. Unlike BFNs, GraphBSI samples z₀ from a Gaussian prior rather than fixing it. A larger initial variance (β₀ = 1.0 vs. 0.05) improves OU-sampler performance and avoids a discontinuity at t = 0, while the Flowback-style sampler degrades badly as β₀ increases.

  • Non-uniform time grids give only marginal gains. Concentrating steps near the end (ρ < 1) slightly improves FCD, but SNN and Filters are largely insensitive to the spacing.

  • Permutation invariance and variable size come for free. Treating each node and edge as an independent categorical component, combined with a permutation-invariant graph transformer and isotropic noise, yields a permutation-invariant model; variable node counts are handled by sampling a node count and masking inactive nodes.

Methodology in Plain English

The model starts with a vague guess about the graph it wants to generate, expressed as a set of scores (logits) for each node and edge category. Instead of committing to discrete choices, it keeps a running probability distribution over categories. At each step, a graph transformer looks at the current belief and predicts what the true graph probably is. That prediction is then treated as a noisy measurement, and Bayesian updating folds it into the belief — adding a scaled amount to the logits, where the scale is set by a precision schedule that grows over time.

As the precision increases, the belief sharpens. The authors show that in the continuous-time limit this process is a stochastic differential equation: a drift term pushing toward the network's prediction plus a noise term. By tuning a single parameter γ, they can slide between a fully deterministic ODE and a sampler with arbitrary stochasticity, without changing the distribution the process targets. Because the true score function is unknown, they substitute the network's own prediction through a score-matching identity implied by their training objective.

For sampling, they use two numerical schemes. Euler-Maruyama is the standard approach; the Ornstein-Uhlenbeck scheme freezes the network's prediction over each short interval, making the SDE analytically solvable there and much more stable. Training minimizes a simple weighted squared error between the network's predicted category probabilities and the true one-hot labels, which the authors show is equivalent to maximizing a variational lower bound on data likelihood.

Why This Matters

Impact on research. The paper unifies several threads — Bayesian Flow Networks, discrete diffusion, flow matching — under one framing, and shows that the choice of how much stochasticity to inject is not cosmetic but the primary determinant of quality. The noise-controlled SDE family with provably identical marginals is a transferable tool: the same construction could be applied to text, DNA, or any categorical generative model.

Real-world applications.

  • Drug discovery: generating novel, valid, synthesizable molecules with favorable properties, evaluated directly on the standard GuacaMol and Moses benchmarks used in the field.
  • Materials discovery: proposing new crystal or polymer structures where the search space is discrete and combinatorial, and where sampling cost per candidate matters.
  • Knowledge graph completion and augmentation: filling gaps in large discrete relational databases where graph structure is the data.
  • Network simulation and privacy: synthesizing realistic transportation, social, or communication networks for simulation, stress-testing, or releasing datasets without exposing real structure.
  • Biological sequence design: the authors demonstrate the framework applies to sequences generally, with a DNA example in the appendix.

Industry relevance. The low compute budget is the practical headline: strong results at 50 function evaluations means cheaper inference, which matters for high-throughput screening pipelines where thousands of candidates must be generated and filtered. The model's stability at high noise and its exact OU integration also reduce the risk of sampler divergence in production settings.

Future Directions

  • Scaling to larger graphs. Experiments focus on molecules (tens of atoms) and small synthetic graphs; whether the approach holds for large networks, and whether the transformer backbone or the BSI formulation becomes the bottleneck, is open.
  • Conditional and property-targeted generation. The paper only demonstrates unconditional generation; extending to conditional generation (targeting specific molecular properties, binding affinities, or constraints) is the obvious next application.
  • Joint continuous-discrete generation. BFNs already support mixing discrete and continuous quantities; extending GraphBSI similarly would allow simultaneous generation of 3D molecular conformations alongside atom and bond types.
  • Better score approximation and larger-γ theory. The theoretical marginal equivalence holds exactly, but the score is approximated, so the benefit of high γ is empirical rather than guaranteed. Understanding when the approximation degrades, and how far γ can be pushed usefully, remains unresolved.
  • Beyond graphs. A principled evaluation of categorical BSI on language and biological sequences, where the demonstrated DNA prototype is only a proof of concept.

Target Audience

Machine learning researchers working on generative models for discrete and structured data, particularly those interested in diffusion, flow matching, or Bayesian Flow Networks and their theoretical connections. It also suits computational chemists and drug discovery practitioners who need a practical molecule generator and care about benchmark performance and inference cost. A strong mathematical background in stochastic differential equations and variational inference is needed to follow the derivations fully, though the algorithmic descriptions and experimental sections are accessible to a broader applied audience.

Authors’ abstract

Generating graph-structured data is crucial in applications such as molecular generation, knowledge graphs, and network analysis. However, their discrete, unordered nature makes them difficult for traditional generative models, leading to the rise of discrete diffusion and flow matching models. In this work, we introduce GraphBSI, a novel one-shot graph generative model based on Bayesian Sample Inference (BSI). Instead of evolving samples directly, GraphBSI iteratively refines a belief over graphs in the continuous space of distribution parameters, naturally handling discrete structures. Further, we state BSI as a stochastic differential equation (SDE) and derive a noise-controlled family of SDEs that preserves the marginal distributions via an approximation of the score function. Our theoretical analysis further reveals the connection to Bayesian Flow Networks and Diffusion models. Finally, in our empirical evaluation, we demonstrate state-of-the-art performance on molecular and synthetic graph generation, outperforming existing one-shot graph generative models on the standard benchmarks Moses and GuacaMol.

Read the original paper