All models

GINEConv-net

The Graph Isomorphism Network: sum your neighbors, apply an MLP, and match the Weisfeiler-Lehman test.

Graphs and geometry · 16 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (22 KB)

Open in a new tab

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

Family
gin
Parameters
5.3K
Operations
16
Framework
PyTorch
Recurrent
No
Published
ICLR 2019
Cited by
2,728 (as of 16 October 2026)
Authors
Keyulu Xu, Weihua Hu, Jure Leskovec, Stefanie Jegelka
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m1136
Graph hash
852c996b4ce5b8ec465ef558fbdc01263f45e251d9bf5b8d8757f2ee90c1c26e
Skeleton hash
ebc7613bb8b907c76d7973b1f2c2d630343ac85d3b05ce1d230b86cba73d77bc
Architecture hash
5f7963b0e1f835310ab28f0516c45ddf569777994d6ad50050a8d395b69e899b
Diagram SHA-256
40e4ee6e0c16e133bc441ea7d98b5ff6b1dd546642fd9a368d7c82c5a1f85de7
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

About this model's family

GIN, the Graph Isomorphism Network, is a simple graph neural network that is provably the most expressive among the class of GNNs: as powerful as the Weisfeiler-Lehman graph isomorphism test at telling graph structures apart. The paper behind it, How Powerful are Graph Neural Networks?, builds a theoretical framework for the expressive power of GNNs and shows that popular variants such as Graph Convolutional Networks and GraphSAGE cannot distinguish certain simple graph structures.

The key insight is that a maximally powerful GNN must never map two different neighborhoods, two different multisets of feature vectors, to the same representation, so its aggregation scheme must be injective. Sum aggregation is what delivers this, since sum aggregators can represent injective, in fact universal, functions over multisets. Mean captures only the proportion of each element type in the neighborhood and max reduces the multiset to a plain set, which is why GCN-style and GraphSAGE-style aggregators fall short. In practice a multi-layer perceptron follows each summation, since MLPs can represent the composition of functions, and in the first layer no MLP is needed before the sum when inputs are one-hot, because their summation alone is injective. For graph classification the readout uses information from all depths of the model, concatenating per-layer graph summaries in the manner of Jumping Knowledge Networks.

The members traced here span the implementations in circulation: the PyTorch Geometric GIN model and its GINConv and GINEConv layers, the Open Graph Benchmark molecular baselines with and without a virtual node, and a sum-pooling network in the style of the authors' code. Some return node embeddings, which serve node classification and link prediction directly; the molecular baselines pool them into a graph-level readout and predict a label for the whole graph. One quirk the authors flag in their repository: the paper's cross-validation used only training and validation sets, with no test set, because the benchmark datasets are small.

Key idea. A proof that injective, sum-based neighborhood aggregation makes a message-passing GNN as powerful as the Weisfeiler-Lehman test, and a simple architecture, GIN, that achieves it.

  • gin
  • graph isomorphism network
  • how powerful are graph neural networks
  • ginconv
  • gineconv
  • gin-virtual
  • ogb gin baseline
  • weisfeiler-lehman
  • wl test
  • graph classification
  • molecular property prediction
  • pytorch geometric
  • xu
  • leskovec
  • jegelka

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{xu2019powerfulgraphneuralnetworks,
      title={How Powerful are Graph Neural Networks?}, 
      author={Keyulu Xu and Weihua Hu and Jure Leskovec and Stefanie Jegelka},
      year={2019},
      eprint={1810.00826},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/1810.00826}, 
}