Papers › Graph Inductive Biases in Transformers without Message Passing

Graph Inductive Biases in Transformers without Message Passing

27 May 2023arXiv:2305.17589archive 2025-07-28

Liheng Ma, Chen Lin, Derek Lim, Adriana Romero-Soriano, Puneet K. Dokania, Mark Coates, Philip Torr, Ser-Nam Lim

Transformers for graph data are increasingly widely studied and successful in numerous learning tasks. Graph inductive biases are crucial for Graph Transformers, and previous works incorporate them using message-passing modules and/or positional encodings. However, Graph Transformers that use message-passing inherit known issues of message-passing, and differ significantly from Transformers used in other domains, thus making transfer of research advances more difficult. On the other hand, Graph Transformers without message-passing often perform poorly on smaller datasets, where inductive biases are more crucial. To bridge this gap, we propose the Graph Inductive bias Transformer (GRIT) -- a new Graph Transformer that incorporates graph inductive biases without using message passing. GRIT is based on several architectural changes that are each theoretically and empirically justified, including: learned relative positional encodings initialized with random walk probabilities, a flexible attention mechanism that updates node and node-pair representations, and injection of degree information in each layer. We prove that GRIT is expressive -- it can express shortest path distances and various graph propagation matrices. GRIT achieves state-of-the-art empirical performance across a variety of graph datasets, thus showing the power that Graph Transformers without message-passing can deliver.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2305.17589")

Code

Syntology Ran 6 of 12 code samples harvested from 2 repositories linked to this paper; 6 have no recorded run. Of those that ran: 6 ran with no contract checked.

By repository: official repository: 10 samples from 1 repository, 6 ran; community (archive-listed): 2 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

liamma/grit officialmentioned in papermentioned on GitHubpytorchMIT report
linusbao/MoSE mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

12 samples harvested; 6 ran; 0 honoured the contract we drafted; 6 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

6ran
6unverified

Licence: 0 of the 12 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

accuracy_SBM liamma/grit/grit/logger.py official repository ran MIT (permissive) · ecf14287d3465c48 · report
eval_spearmanr liamma/grit/grit/logger.py official repository ran fingerprinted MIT (permissive) · 9dc78001d467fc9d · report
get_final_pretrained_ckpt liamma/grit/grit/finetuning.py official repository ran MIT (permissive) · 1bb331bf70a78136 · report
get_log_deg liamma/grit/grit/layer/grit_layer.py official repository ran MIT (permissive) · b5c9e7acf599a98a · report
init_model_from_pretrained liamma/grit/grit/finetuning.py official repository ran MIT (permissive) · 9e4db46ba20af98e · report
subtoken_cross_entropy liamma/grit/grit/loss/subtoken_prediction_loss.py official repository ran MIT (permissive) · 47e492109e6d308f · report
adj_l1_losses liamma/grit/grit/loss/adj.py official repository unverified MIT (permissive) · dc82c18c9d42c1c1 · report
l1_losses liamma/grit/grit/loss/l1.py official repository unverified MIT (permissive) · d59c374db2cf64ae · report
load_pretrained_model_cfg liamma/grit/grit/finetuning.py official repository unverified MIT (permissive) · 91c1f5bb90bbe0f3 · report
multilabel_cross_entropy liamma/grit/grit/loss/multilabel_classification_loss.py official repository unverified MIT (permissive) · f1cbbbc857d8b871 · report
FeatureEncoder linusbao/MoSE/GRIT/grit/network/grit_model.py community (archive-listed) unverified MIT (permissive) · 932e8da6cc45ebfc · report
GritTransformer linusbao/MoSE/GRIT/grit/network/grit_model.py community (archive-listed) unverified MIT (permissive) · 8afca3460aa00ce7 · report

Tasks

Graph ClassificationGraph RegressionInductive BiasNode Classification

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Graph Classification CIFAR10 100k GRIT Accuracy (%) 76.468 #4 of 20 Archive leaderboard report
Graph Classification MNIST GRIT Accuracy 98.108 #11 of 13 Archive leaderboard report
Graph Classification Peptides-func GRIT AP 0.6988±0.0082 #14 of 44 Archive leaderboard report
Graph Regression PCQM4Mv2-LSC GRIT Validation MAE 0.0859 #11 of 20 Archive leaderboard report
Graph Regression Peptides-struct GRIT MAE 0.2460±0.0012 #10 of 39 Archive leaderboard report
Graph Regression ZINC GRIT MAE 0.059 #4 of 27 Archive leaderboard report
Graph Regression ZINC-500k GRIT MAE 0.059 #4 of 36 Archive leaderboard report
Graph Regression ZINC-full GRIT Test MAE 0.023 #6 of 19 Archive leaderboard report
Node Classification CLUSTER GRIT Accuracy 80.026 #1 of 12 Archive leaderboard report
Node Classification PATTERN GRIT Accuracy 87.196 #2 of 11 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutGraph TransformerLabel SmoothingLapEigenLaplacian PELayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections