Diffusion-Free Graph Generation with Next-Scale Prediction

Samuel Belkadi, Steve Hong, Marian Chen, Miruna Cretu, Charles Harris, Pietro Lio

TL;DR

MAG is a novel, diffusion-free graph generation framework that replaces traditional next-node or next-edge autoregressive prediction with next-scale prediction. By progressively generating a graph from coarse to fine resolutions using a multi-scale quantized tokenizer and a transformer, MAG bypasses the need for artificial node orderings while achieving inference speedups of up to three orders of magnitude over state-of-the-art diffusion models.

What Problem Does This Paper Address?

Generating realistic graphs is a fundamental challenge in machine learning with massive implications for drug discovery, protein design, and social network analysis. Currently, two paradigms dominate graph generation, but both have significant drawbacks:

  1. Autoregressive (AR) Models: These models are highly efficient and scale predictably, but they generate graphs node-by-node or edge-by-edge. Because graphs are inherently unordered (permutation-invariant), forcing an artificial sequence order introduces severe long-range dependencies and limits generalization.
  2. Diffusion Models: These models successfully maintain permutation invariance and generate high-quality graphs, but they are computationally ruinous—often requiring thousands of sequential denoising steps and expensive auxiliary features to break symmetries.

The authors bridge this gap by asking: Can we build an autoregressive model that generates graphs without enforcing an artificial node ordering, thereby capturing the efficiency of AR models and the structural flexibility of diffusion?

Methods

Inspired by recent breakthroughs in visual autoregressive (VAR) modeling for images, the authors propose MAG (Multi-scale Autoregressive Graph generator). Instead of predicting the next token in a sequence, MAG predicts the next resolution scale of the entire graph.

Figure 1. Overview of the Mutli-Scale Graph Generation Framework. The input graph is first encoded through an MPNN, which produces a latent representation that is quantized at multiple scales. A Transformer then predicts the scales autoregressively via a coarse-to-fine next-scale process, and a GCN-based decoder reconstructs the graph from the final discrete latent representation rK.

The architecture consists of two primary stages:

1. Permutation Equivariant Multi-Scale Tokenizer

To represent graphs hierarchically, the authors design a multi-scale Vector Quantized Variational Autoencoder (VQ-VAE).

  • Encoder: Uses Message Passing Neural Networks (MPNNs) to encode node and edge features into a unified continuous latent space.
  • Downsampling & Quantization: The continuous representation is interpolated into $K$ different coarse-to-fine latent scales. Each scale is quantized into discrete tokens using a shared codebook.
  • Decoder: A Graph Convolutional Network (GCN) reconstructs the final graph from the highest-resolution discrete latent map. Because it preserves node ordering and feature cardinality throughout, the tokenizer remains strictly permutation equivariant.
Figure 2. Permutation Equivariant Multi-Scale VQ-VAE. The encoder converts the input graph into a continuous latent representation f, which is downsampled and quantized into discrete token maps {r1, . . . , rK}. The final token map rK is then passed to the GCN-based decoder to reconstruct the original graph, preserving permutation equivariance throughout.

2. Autoregressive Multi-Scale Transformer

A standard decoder-only transformer is trained to predict these token maps scale-by-scale. At each step $k$, the transformer generates all tokens for that scale in parallel, conditioned on the previous scales. Crucially, a scale-wise causal mask ensures that tokens within the same scale can attend to each other but only look back at coarser scales. No positional encodings are used within scales, preserving the model's permutation invariance.

Figure 3. Autoregressive Next-scale Prediction with Scale-Wise Causal Mask. At each step k, the transformer attends to all previously generated scales {r1, . . . , rk−1} and predicts the next-scale token map rk all at once. A scale-wise causal mask ensures that each scale only depends on its prefix. Cross-entropy loss is used for training the transformer.

Datasets

The authors evaluated MAG across two distinct domains:

  • Generic Graphs:
  • Community-small: A synthetic dataset of 100 random community graphs (12–20 nodes).
  • Enzymes: A dataset of 587 protein tertiary structures (10–125 nodes) categorized into 6 enzyme top-level classes.
  • Molecular Graphs:
  • QM9: 133,885 small organic molecules containing up to 9 heavy atoms (C, O, N, F).
  • ZINC-250K: 250,000 commercially available chemical compounds with up to 38 heavy atoms.

Key Insights and Ideas

  • From $O(n^3)$ to $O(n^2)$ Complexity: Traditional node-by-node generation requires computing attention over $N$ steps, leading to an $O(n^3)$ computational cost. By generating entire token maps in parallel across a logarithmic number of scales ($K \approx \log N$), MAG reduces the generation complexity to $O(n^2)$.
  • Parallelism via Coarse-to-Fine Hierarchy: Generating a graph "all at once" usually fails because it ignores complex internal dependencies. MAG solves this by generating the global topology first (coarse scales) and filling in local details later (fine scales), allowing for intra-scale parallel generation.
  • Order-Agnostic Autoregression: By ensuring the tokenizer is permutation equivariant and omitting positional encodings within the transformer's scales, MAG achieves autoregressive generation without needing an explicit node ordering.

Key Results

MAG demonstrates competitive structural and chemical generation quality while delivering massive wall-clock speedups.

Generic Graph Benchmarks

On Community-small, MAG closely matched the generation quality (measured by Maximum Mean Discrepancy of graph statistics) of state-of-the-art diffusion models like GDSS and DiGress, while running 204× and 15,347× faster, respectively.

Table 1. Results on Community-small and Enzymes benchmark datasets. Wall-clock inference times are reported in seconds for 50 and 100 samples, respectively, on an NVIDIA GeForce RTX 4060 GPU.

Molecular Graph Benchmarks

On the QM9 and ZINC250k datasets, MAG consistently outperformed VAE baselines and matched or exceeded the uniqueness and novelty of diffusion models.

  • For QM9, MAG achieved a 99.31% uniqueness score.
  • In terms of generation time for 1,000 samples on ZINC250k, MAG took just 19.7 seconds, compared to 340 seconds for GDSS and 200 seconds for DiGress.
Table 2. Results on QM9 and ZINC250k molecule datasets. Wall-clock inference times are reported in seconds for 1,000 samples, respectively, on an NVIDIA GeForce RTX 4060 GPU (Val: Validity; Uni: Uniqueness; Nov: Novelty; FCD: Fr´echet ChemNet Distance). Entries marked “–” denote results that were not reported or for which reproduction was not possible.

Limitations and Future Work

Despite its impressive speed, MAG faces a few hurdles:

  • Scalability on Complex Graphs: On the larger, more complex Enzymes dataset, MAG's structural generation quality lagged behind diffusion models. The authors attribute this to its sensitivity to predefined, manually tuned scale sizes.
  • Quantization Bottleneck: Relying on a discrete VQ-VAE codebook can restrict the expressivity of the latent space.

Future Directions: The authors suggest developing a data-driven, optimized scale selection method to handle larger graphs dynamically. They also propose a compelling hybrid direction: applying scale-wise diffusion (diffusion between continuous scales) to eliminate the quantization bottleneck while preserving the efficiency of the coarse-to-fine paradigm.

Summary updated

Abstract

Autoregressive models excel in efficiency and plug directly into the transformer ecosystem, delivering robust generalization, predictable scalability, and seamless workflows such as fine-tuning and parallelized training. However, they require an explicit sequence order, which contradicts the unordered nature of graphs. In contrast, diffusion models maintain permutation invariance and enable one-shot generation but require up to thousands of denoising steps and additional features for expressivity, leading to high computational costs. Inspired by recent breakthroughs in image generation, especially the success of visual autoregressive methods, we propose MAG, a novel diffusion-free graph generation framework based on next-scale prediction. By leveraging a hierarchy of latent representations, the model progressively generates scales of the entire graph without the need for explicit node ordering. Experiments on both generic and molecular graph datasets demonstrated the potential of this method, achieving inference speedups of up to three orders of magnitude over state-of-the-art methods, while preserving high-quality generation.
BibTeX
@inproceedings{belkadi2025diffusion,
  author = {Samuel Belkadi and Steve Hong and Marian Chen and Miruna Cretu and Charles Harris and Pietro Lio},
  title = {{Diffusion-Free Graph Generation with Next-Scale Prediction}},
  booktitle = {GenBio @ ICML},
  year = {2025},
  doi = {10.48550/arxiv.2503.23612},
}
Figure