All models

GraphMultisetTransformer

An attention-based graph pooling layer that condenses nodes into a few seeds and then into one graph vector.

Graphs and geometry · 143 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 (10 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

Parameters
281.3K
Operations
143
Framework
PyTorch
Recurrent
No
Published
ICLR 2021
Cited by
104 (as of 19 October 2026)
Authors
Jinheon Baek, Minki Kang, Sung Ju Hwang
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
m1246
Graph hash
b0038bb576501afceb840b1408c4e27c2afa85b3f4e03faff3f08d22468f939d
Skeleton hash
fd40544390194fe08a6e5cbbc4ebf221b19acabd1229c0394a69829013552ba6
Architecture hash
cc950ba63cec9a7698cc3dff9a154fa8b82b89f83636f1adbf78886ce0a70cec
Diagram SHA-256
49cdf3540219963b78a4debb4cb4c20e8ab33196bd2664b9b87c478f73133042
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

This page's module is the pooling operator on its own: it compresses the nodes to k representatives with attention, runs self-attention blocks over them, then pools them into a single vector. It requires the batch index to be sorted.

The Graph Multiset Transformer (GMT) is a global pooling layer that turns a graph's node representations into a single vector using multi-head attention shaped by the graph structure. A plain sum or average weighs all nodes equally, ignoring task relevance and the structural dependencies among them. Hierarchical pooling methods may give the same representation to two graphs that the Weisfeiler-Lehman test tells apart. The paper instead frames pooling as encoding a multiset of node features with auxiliary information about the graph structure.

Graph Multiset Pooling (GMPool) compresses the n nodes into k representative nodes using a learned seed matrix of k query vectors that is optimized end to end. In its graph multi-head attention block, keys and values come from GNNs rather than linear projections, so the attention uses neighborhood information. A self-attention block then models interactions among the condensed nodes, and a final GMPool with k = 1 produces the graph representation. The pooling is injective and permutation invariant, so a GNN with this readout is at most as powerful as the Weisfeiler-Lehman test.

The paper evaluates graph classification on 10 benchmark datasets from biochemical and social domains. The gain over baselines is larger on graph reconstruction, which the authors read as the pooled nodes retaining the original graph structure. The authors note that GMT is also featured in PyTorch Geometric, where each block can be assembled separately.

Key idea. GMT treats graph pooling as multiset encoding, using graph-aware multi-head attention to compress nodes into a compact readout that is as powerful as the Weisfeiler-Lehman test.

  • graph multiset transformer
  • gmt
  • graph multiset pooling
  • gmpool
  • graph pooling
  • readout
  • multiset encoding
  • weisfeiler-lehman
  • graph classification

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

Cite the paper

@misc{baek2021accuratelearninggraphrepresentations,
      title={Accurate Learning of Graph Representations with Graph Multiset Pooling}, 
      author={Jinheon Baek and Minki Kang and Sung Ju Hwang},
      year={2021},
      eprint={2102.11533},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2102.11533}, 
}