All models

GraphGPS

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

Graphs and geometry · 89 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 (23 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
41.9K
Operations
89
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
m1236
Graph hash
ea323df12367f83cb7d9a5f299a6ab57ad5c043a0d7ea0cbab5e29e9101a69a9
Skeleton hash
2a378d33159ffdc087475c2c1cc8ff738d076fb32a97602bf58d577d393b9f02
Architecture hash
134c4f7d451e8873f9068afc9fa93cc247b9180c3d3031c526a7c588e0fcc8dc
Diagram SHA-256
b464f2a89caabfa75afdd68d678296ba034701ee249aa7befbea3b7379023a12
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 is a single GPSConv layer, the PyTorch Geometric implementation of the layer from Recipe for a General, Powerful, Scalable Graph Transformer, so it returns node embeddings instead of a graph-level prediction.

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}, 
}