GraphK: Variable-Size Graph Generation with Efficient Edge Construction
Organizations: Department of Artificial Intelligence and Data Engineering Ataturk University, Turkey · Department of Artificial Intelligence and Data Engineering ITU AI Research and Application Center Istanbul Technical University, Turkey · Faculty of Engineering and Applied Science Memorial University, Canada
Abstract
Graph generation models have advanced significantly with deep learning, yet they remain limited in scalability, flexibility, and ability to model underlying structures. We present GraphK, a novel encoder-sampler-decoder framework for graph generation that overcomes these challenges through structural flexibility and computational efficiency. Unlike autoregressive approaches constrained by vocabulary size (i.e. number of nodes in graph generation), GraphK allows for both upscaling (generating graphs with more nodes than the input) and downscaling, providing a flexible control over output graph size. By learning permutation-invariant latent representations and sampling new node embeddings via maximum likelihood estimation, GraphK generalizes across graph sizes and structures. For edge generation, we employ edge prediction with a KDTree-based top-k neighbor search in the latent space, reducing computational cost. Based on the manifold smoothness assumption, our method effectively captures graph properties. Experiments on synthetic and real-world datasets show that GraphK outperforms existing methods, accurately learns graph structures, and generates synthetic graphs without explicit definitions.
Figures & tables
| Method | Core Approach | Focus | Node Order Invariance | Computational Complexity (per graph) | Up- scaling |
|---|---|---|---|---|---|
| ER Erdos and Renyi (1959) | Random graph generation based on edge probability | General | No | Low. Generates edges by one Bernoulli draw per pair | No |
| BA Barabasi and Albert (1999) | Preferential attachment | Scale-free networks | No | Low. Adds one node with preferential links | No |
| SBM Holland et al. (1983) | Community structure with probabilistic edge connections | Community | No | Low. Samples block‐wise probabilities. | No |
| GraphRNN You et al. (2018) | Autoregressive node and edge sequence generation | General | No | High. Sequential edge writing: worst-case decisions; BFS ordering shortens average run-time but still quadratic on dense graphs. Up to nodes. | No |
| GRAN Liao et al. (2020) | Recurrent attention over graph structure | General | Partial | Low. Adds blocks; GNN passes. With small constant the cost grows roughly . Shown to nodes. | No |
| BiGG Dai et al. (2020) | Autoregressive generation via binary indexing trees | General | No | Low. using recursive tree factorization. Scales to nodes. | No |
| 2-Block Community | Protein | CiteSeer | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Spectral | Orbit | Motif | Spectral | Orbit | Motif | Spectral | Orbit | Motif | |||
| ER | 0.051 | 1.117 | 1.131 | 0.102 | 1.684 | 1.450 | 0.056 | 1.993 | 1.951 | ||
| BA | 0.044 | 1.214 | 1.420 | 0.100 | 1.139 | 1.284 | 0.048 | 1.127 | 1.383 | ||
| GraphVAE | 0.106 | 1.416 | 1.402 | 0.082 | 1.266 | 1.266 | 0.245 | 1.416 | 1.422 | ||
| GraphRNN | 0.061 | 1.151 | 1.116 | 0.301 | 0.752 | 0.804 | OOM | ||||
| NetGAN | 0.021 | 0.298 | 0.398 | 0.075 | 1.112 | 1.172 | 0.024 | 1.351 | 1.184 | ||
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| Symbol | Description |
|---|---|
| Input graph with node set and edge set and features of nodes | |
| Number of nodes in the graph | |
| Dimensionality of the latent space | |
| Latent representation of node | |
| Set of latent embeddings for all nodes | |
| Euclidean distance between node embeddings and |