Introduction
Generating large-scale graphs is computationally expensive because traditional models rely on adjacency matrices that grow quadratically with the number of nodes. This paper introduces Gap Encoded Edge List (GEEL), a compact representation that uses relative "gaps" between node indices to drastically reduce vocabulary size and memory overhead. By combining GEEL with a simple LSTM and node positional encoding, the authors achieve state-of-the-art generation quality while scaling to graphs with up to 10,000 nodes—often running 10x to 100x faster than complex diffusion-based models.
The Scalability Wall in Graph Generation
Graph generation is a cornerstone of modern AI applications, from designing new life-saving molecules to simulating social networks. However, the field faces a significant "scalability wall."
Most current models represent graphs as adjacency matrices. For a graph with $N$ nodes, the matrix has $N^2$ elements. If you use a Transformer to generate this matrix, the computational complexity balloons to $O(N^4)$, making it impossible to generate large-scale graphs.
An alternative is using an edge list (a simple list of pairs of connected nodes). While this is more efficient for sparse graphs, the "vocabulary" of possible edges is still $N^2$. This massive search space makes it hard for models to learn dependencies, often leading to overfitting or poor generation quality. The authors set out to find a representation that is both compact (like an edge list) and has a manageable vocabulary size.
Methods: Gap Encoded Edge List (GEEL)
The core innovation is the Gap Encoded Edge List (GEEL). Instead of recording absolute node indices (e.g., "edge between node 100 and 105"), GEEL records the gaps between them:
- Intra-edge gap ($b_m$): The difference between the source node and the target node.
- Inter-edge gap ($a_m$): The difference between the source node of the current edge and the source node of the previous edge.
To keep these gaps small, the authors use bandwidth restriction (specifically the Cuthill-McKee ordering). This ensures that connected nodes have indices close to each other. By doing this, the vocabulary size shrinks from $N^2$ (all possible pairs) to $B^2$, where $B$ is the graph's bandwidth. In many real-world graphs, $B$ is much smaller than $N$.
Model Architecture
- Autoregressive Generation: Because GEEL turns a graph into a sequence of gap-tuples, the authors use a standard LSTM (Long Short-Term Memory) network. This keeps the complexity at $O(M)$, where $M$ is the number of edges.
- Node Positional Encoding: To help the LSTM keep track of where it is in the graph (since gaps are relative), they supplement the input with the absolute index of the current source node.
- Attributed Grammar: For graphs with labels (like atoms in a molecule), they designed a specific grammar that ensures the model generates node types and edge types in a valid, logical order.
Key Results
The authors evaluated GEEL across twelve diverse benchmarks, including general graphs (Planar, Enzymes, Grid, Proteins), molecular graphs (QM9, ZINC250k), and scalability tests on synthetic grids ranging from 10 to 10,000 nodes.
- Superior Quality: On metrics like Maximum Mean Discrepancy (MMD) for degree and clustering, GEEL consistently matched or beat state-of-the-art models like GRAN, BiGG, and DiGress across almost all datasets.
- Massive Speedups: In inference time tests, GEEL generated graphs significantly faster than competitors. For example, on the Enzymes dataset, GEEL took 0.12 seconds per graph, while the diffusion-based GDSS took 15.21 seconds—a 125x difference.
- Extreme Scalability: GEEL successfully generated 3D point cloud graphs with over 5,000 nodes and synthetic grids with 10,000 nodes. Most other high-performing models hit "Out of Memory" (OOM) errors long before reaching this scale.
Limitations and Future Work
While highly effective, GEEL does have limitations:
- Unseen Tokens: GEEL is limited by its training vocabulary. If a test graph requires a "gap" larger than any seen during training, the model cannot generate it.
- Bandwidth Dependency: The efficiency of GEEL relies on the graph having a relatively small bandwidth. For "dense" or "expander" graphs where $B \approx N$, the vocabulary reduction benefits diminish.
The authors suggest exploring graph decomposition—breaking massive graphs into smaller subgraphs with low bandwidth—to further extend GEEL's reach to even larger, more complex structures.
Summary updated