GraphRNN
Autoregressive graph generator: one GRU adds nodes and a second GRU adds each node's edges.
Graphs and geometry · 25 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Graphs and geometry
- Parameters
- 389.9K
- Operations
- 25
- Framework
- PyTorch
- Recurrent
- No
- Published
- ICML 2018
- Cited by
- 537 (as of 28 October 2026)
- Authors
- Jiaxuan You, Rex Ying, Xiang Ren and others
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m17156
- Graph hash
- 7b68f11fc00bf54813011063a2a1d2f6dd1be54e5267b5c5ad061cc0ad9cce4b
- Skeleton hash
- a75bd79c63602700481ad45eb044e1a47ac62a42d01b4c5a80f3ff7f0eba27d9
- Architecture hash
- 064c4d27c69197ad836b96b8189287a4c3575811f5ba8c640d444c1c8cd87910
- Diagram SHA-256
- a4d9ee976438139721633404cf322c7783ae0c9770cba046d70822ff4a1f2750
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
GraphRNN generates graphs piece by piece, as a sequence of node and edge formations, each conditioned on the graph built so far. It is trained on a representative set of graphs and is meant to model their distribution with minimal assumptions about their structure.
The model is two recurrent networks, one nested inside the other. A graph-level RNN maintains the state of the graph and generates new nodes, while an edge-level RNN generates the edges for each newly generated node. In the paper's larger configuration, which this model follows, the graph-level RNN is 4 layers of GRU cells with a 128-dimensional hidden state. The edge-level RNN is 4 layers of GRU cells with a 16-dimensional hidden state. The paper also describes a simplified variant, GraphRNN-S, whose edge model is a single-layer MLP instead of an RNN.
A graph can be written down under many node orderings, so the paper learns to generate graphs under breadth-first-search (BFS) orderings only. The tree structure that BFS induces also limits how many edge predictions each node needs, so each node predicts edges to at most M earlier nodes. For the grid dataset the paper sets M = 40, the width of this model's output. The paper reports scaling to graphs 50 times larger than previous deep models.
Key idea. GraphRNN casts graph generation as an autoregressive sequence of node and edge decisions, with a graph-level RNN adding nodes and an edge-level RNN adding each node's edges.
- GraphRNN
- graph generation
- graph generative model
- autoregressive graph model
- deep generative models of graphs
- BFS node ordering
- graph-level RNN
- edge-level RNN
- GraphRNN-S
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{you2018graphrnngeneratingrealisticgraphs,
title={GraphRNN: Generating Realistic Graphs with Deep Auto-regressive Models},
author={Jiaxuan You and Rex Ying and Xiang Ren and William L. Hamilton and Jure Leskovec},
year={2018},
eprint={1802.08773},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/1802.08773},
}