All models

GPSConv

A graph Transformer layer design that combines local message passing with global attention.

Graphs and geometry · 105 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
GraphGPS
Parameters
46.6K
Operations
105
Framework
PyTorch
Recurrent
No
Published
NeurIPS 2022
Cited by
330 (as of 22 October 2026)
Authors
Ladislav Rampášek, Mikhail Galkin, Vijay Prakash Dwivedi 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 diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m1150
Graph hash
ce225e1b617cd1103c10d39b7ff5a7b38a31cc94ac151757d652417a8dba47b3
Skeleton hash
7747f5fee35e09cae6d90a519fda63f68ff090a3f05cc9a9ea24131ddce8d240
Architecture hash
e7aff17ccf5d415336b021eb63c0f005449b608cb07aa44af52a4e6faf0e2efd
Diagram SHA-256
4bd6443446e33e6ac1fead07926341a12434ba1c9c83557db541433c23061a75
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 model wraps a single GPSConv block, the PyTorch Geometric implementation of the layer from Recipe for a General, Powerful, Scalable Graph Transformer, as a small graph-level model.

About this model's family

GraphGPS is a recipe for building graph Transformers, where GPS stands for general, powerful, scalable. The paper is a response to a field in which graph Transformers had become popular but lacked a common foundation about what makes a good positional or structural encoding.

The recipe consists of choosing three main ingredients: a positional or structural encoding, a local message-passing mechanism and a global attention mechanism. Message passing over the real edges of the graph is decoupled from the fully-connected Transformer, and the paper states that this gives a complexity linear in the number of nodes and edges. The authors argue that the decoupling does not negatively affect expressivity.

The GraphGPS package implements the recipe with several encodings and model choices. For local message passing it lists GatedGCN, GINE and PNA, and for global attention it lists Transformer, Performer and BigBird. The paper reports tests on 16 benchmarks.

Key idea. GraphGPS is a modular framework for graph Transformers that combines positional or structural encodings, local message passing and global attention, with complexity linear in the number of nodes and edges.

  • graphgps
  • gps
  • gpsconv
  • general powerful scalable graph transformer
  • graph transformer
  • gps layer
  • positional encoding
  • structural encoding
  • message passing
  • global attention

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

Cite the paper

@misc{rampášek2023recipegeneralpowerfulscalable,
      title={Recipe for a General, Powerful, Scalable Graph Transformer}, 
      author={Ladislav Rampášek and Mikhail Galkin and Vijay Prakash Dwivedi and Anh Tuan Luu and Guy Wolf and Dominique Beaini},
      year={2023},
      eprint={2205.12454},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2205.12454}, 
}