DenseGraphConv
A graph convolution layer that works on dense adjacency matrices for batches of graphs.
Graphs and geometry · 7 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
- 528
- Operations
- 7
- Framework
- PyTorch
- Recurrent
- No
- Published
- AAAI 2019
- Cited by
- 153 (as of 18 October 2026)
- Authors
- Christopher Morris, Martin Ritzert, Matthias Fey and others
- Source
- torch_geometric 2.6.1
- 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
- m732
- Graph hash
- 904e166cb234f62423df4e9a0893f4da03fe43ac9653a6d1a07a42b7eccebcdc
- Skeleton hash
- 5065bb088998e4fd45b6fbbf61d97c55cc867840a266dd3aabc176c8d801245c
- Architecture hash
- cc78fad611547f75608ce9db92fd485c12e7a828fd0ff0c44411cbac5c582c83
- Diagram SHA-256
- 4ec22dc14ac6d938f71d4d4979294c8d41e45ac35eaa7bfa61c08ae942505639
- 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
DenseGraphConv is a dense-matrix counterpart of GraphConv, the graph neural network operator from the paper "Weisfeiler and Leman Go Neural: Higher-order Graph Neural Networks". It takes a node feature tensor and an adjacency tensor for a batch of graphs, plus an optional mask indicating the valid nodes of each graph.
The layer follows the basic pattern the paper describes for a graph neural network (GNN): aggregate the features of each node's neighbors and pass the result on. In the code, the aggregated neighbor features go through one linear map and are added to a second linear map of the node's own features. The aggregation can be a sum, a mean or a maximum, and the sum is the default.
The paper calls architectures of this kind 1-dimensional GNNs (1-GNNs) and relates them to the 1-dimensional Weisfeiler-Leman graph isomorphism heuristic (1-WL). Its first theoretical result is that 1-GNNs have no more power than 1-WL to distinguish non-isomorphic graphs and subgraphs. It also shows that, with a suitable parameter initialization, GNNs have the same power as the 1-WL. On that basis the paper proposes k-GNNs, higher-order models that perform message passing directly between subgraph structures and not between individual nodes. Its conclusion states that in the experimental study k-GNNs consistently outperform 1-GNNs.
Key idea. The paper shows that GNNs have the same expressiveness as the 1-dimensional Weisfeiler-Leman heuristic in distinguishing non-isomorphic graphs and subgraphs, and proposes higher-order k-GNNs.
- GraphConv
- DenseGraphConv
- 1-GNN
- k-GNN GraphConv
- Weisfeiler and Leman Go Neural
- higher-order graph neural networks
- Weisfeiler-Leman
- graph isomorphism
- dense adjacency
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{morris2021weisfeilerlemanneuralhigherorder,
title={Weisfeiler and Leman Go Neural: Higher-order Graph Neural Networks},
author={Christopher Morris and Martin Ritzert and Matthias Fey and William L. Hamilton and Jan Eric Lenssen and Gaurav Rattan and Martin Grohe},
year={2021},
eprint={1810.02244},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/1810.02244},
}