TL;DR
FLAGG (Flexible Autoregressive Graph Generation) unifies the two extremes of graph generation—one-shot and sequential modeling—into a single, cohesive framework. By iteratively generating blocks of nodes and edges using a nested one-shot model, FLAGG provides a tunable "axis of sequentiality" that beats pure one-shot and autoregressive baselines in both generation quality and scalability.
What Problem Does This Paper Address?
Graph generation is crucial for fields like drug discovery and social network analysis, but existing deep learning methods are stuck at two impractical extremes:
- One-Shot Models: These generate all nodes and edges simultaneously (e.g., graph diffusion models). While excellent at capturing compact structures like small molecules, they require quadratic memory ($O(N^2)$), making them completely unfeasible for large graphs.
- Sequential (Autoregressive) Models: These generate graphs step-by-step, usually one node or edge at a time. They handle larger graphs better but suffer from poor hardware parallelization and struggle to maintain global structural integrity on smaller, tightly bound graphs.
The authors introduce FLAGG to bridge this gap, creating a flexible framework where a user can choose exactly how sequential or one-shot the generation process should be based on their hardware and domain constraints.
Methods
FLAGG breaks graph generation down into a modular, step-by-step pipeline consisting of three main components:
- The Insertion Model: Determines how many new nodes to add at the current step.
- The Filler Model: A nested one-shot model (such as DiGress) that fills in the labels of the new nodes and determines the connectivity (edges) between the new block and the existing graph structure.
- The Halting Model: A binary classifier that decides when the graph is complete and stops the generation loop.
To train these models, FLAGG conceptualizes graph generation as the reverse of a stochastic node removal process. During training, a complete graph is gradually stripped of nodes until it becomes empty. The models learn to reverse this corruption.
To optimize memory and step efficiency, the authors model the choice of block sizes as a classic change-making problem, using dynamic programming to decompose a graph into the minimum number of blocks possible given a predefined set of allowed block sizes.
The authors also introduce two specialized variants:
- Sparse FLAGG: Uses a node-masking technique to generate massive graphs without overloading GPU memory.
- Properties FLAGG (P-FLAGG): Factorizes the generation step further by explicitly sampling specific graph properties (like node degree and distance) to guide edge placement, bypassing expensive diffusion steps entirely.
Datasets
The framework was evaluated across several diverse graph domains:
- Molecular Chemistry: QM9 (133K small molecules up to 9 heavy atoms) and ZINC250k (250K larger molecules up to 38 heavy atoms).
- Generic/Social Graphs: Community-small, Ego-small, Ego, and Enzymes.
- Large-Scale Networks: The Cora citation network, featuring 2,810 nodes in its largest connected component.
Key Insights and Ideas
- The Sequentiality Continuum: One-shot generation and node-by-node sequential generation are not mutually exclusive paradigms; they are simply the endpoints of a continuous spectrum. Tuning the block size allows a direct trade-off between memory consumption and computational time.
- Smart Graph Decomposition via Coin-Changing: Instead of randomly selecting how many nodes to drop during the training noise process, treating it as a change-making problem ensures well-behaved categorical distributions, minimizing padding waste in GPU memory.
- Bypassing Diffusion for Speed: P-FLAGG demonstrates that if you explicitly factorize and learn local structural properties (like preferential attachment inspired by the Barabási-Albert model), you can achieve high-quality autoregressive generation without relying on computationally heavy diffusion steps.
Key Results
- Superior Molecule Quality: On the QM9 and ZINC250k datasets, FLAGG achieved state-of-the-art Fréchet ChemNet Distance (FCD) scores when using intermediate block sizes, outperforming both pure one-shot models (DiGress) and sequential baselines (GraphARM).
- Massive Speedups: P-FLAGG proved to be incredibly lightweight. On the Ego dataset, it achieved a sampling speed 225 times faster than diffusion-based sequential models while maintaining competitive structural metrics.
- Scaling to Huge Graphs: Using Sparse FLAGG, the authors successfully generated the 2,810-node Cora citation network. It drastically outperformed the hierarchical baseline HiGGs on degree distribution accuracy (MMD of 0.020 vs 0.254).
Limitations and Future Work
While highly flexible, FLAGG currently requires the experimenter to manually predefine the node ordering policy (e.g., Breadth-First Search) and the set of allowed block sizes. A major avenue for future work is enabling the framework to learn the optimal node ordering and block sizes directly from data end-to-end. Additionally, while Sparse FLAGG excelled at capturing global degree distributions on large graphs like Cora, its local clustering coefficients and eccentricity metrics still lag slightly behind purely hierarchical models.
Summary updated