MetaLayer
A graph-to-graph block that updates edge, node and global attributes with caller-supplied sub-models.
Graphs and geometry · 49 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
- 6.6K
- Operations
- 49
- Framework
- PyTorch
- Recurrent
- No
- Published
- 2018, arXiv preprint
- Cited by
- 2,240 (as of 18 October 2026)
- Authors
- Peter W. Battaglia, Jessica B. Hamrick, Victor Bapst 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
- m1763
- Graph hash
- d5305b86d61428e4bb9adcabb53372607ee2bb33c5eafdfa215be4646f4d4432
- Skeleton hash
- 58e0c60ea45b605cd210e117c079206598526bf33f1452c412d3cbe3b6c3141a
- Architecture hash
- a68c90ca04622b4168fa622bce887e7caf571768b0e5d5a858dd93428c810091
- Diagram SHA-256
- 66255d621780d893c4662b6354b8ea3c4fc8894edbae62e3b5af867ac8620773
- 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
A graph network block is a graph-to-graph module: it takes a graph as input, performs computations over its structure, and returns a graph as output. The graphs it handles carry edge-, node- and global-level attributes, and the output graph has the same structure with updated attributes. The member captured here is pytorch_geometric's MetaLayer, which the Graph Nets library itself points to as an analog of its Graph Nets interface.
Inside, a GN block contains three update functions and three aggregation functions. Computation proceeds from the edge, to the node, to the global level. The aggregation functions must be invariant to permutations of their inputs and accept variable numbers of arguments, such as elementwise summation, mean or maximum. Because per-edge and per-node functions are reused across all edges and nodes, a single GN can operate on graphs of different sizes and shapes.
The paper that defines the block, Relational inductive biases, deep learning, and graph networks, is part position paper, part review and part unification. Its argument is that combinatorial generalization must be a top priority for AI, and that structured representations and computations are key to it. The authors present the graph network as a new building block with a strong relational inductive bias that generalizes and extends various approaches for neural networks that operate on graphs. The companion open-source library, Graph Nets, is DeepMind's library for building graph networks in Tensorflow and Sonnet.
Key idea. The graph network is a new building block with a strong relational inductive bias that generalizes and extends various approaches for neural networks that operate on graphs.
- MetaLayer
- Graph Network
- GN block
- graph networks
- Graph Nets
- graph_nets
- relational inductive biases
- Relational inductive biases, deep learning, and graph networks
- edge model node model global model
- PyTorch Geometric
- DeepMind
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{battaglia2018relationalinductivebiasesdeep,
title={Relational inductive biases, deep learning, and graph networks},
author={Peter W. Battaglia and Jessica B. Hamrick and Victor Bapst and Alvaro Sanchez-Gonzalez and Vinicius Zambaldi and Mateusz Malinowski and Andrea Tacchetti and David Raposo and Adam Santoro and Ryan Faulkner and Caglar Gulcehre and Francis Song and Andrew Ballard and Justin Gilmer and George Dahl and Ashish Vaswani and Kelsey Allen and Charles Nash and Victoria Langston and Chris Dyer and Nicolas Heess and Daan Wierstra and Pushmeet Kohli and Matt Botvinick and Oriol Vinyals and Yujia Li and Razvan Pascanu},
year={2018},
eprint={1806.01261},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/1806.01261},
}