Papers › Subgraphormer: Unifying Subgraph GNNs and Graph Transformers via Graph Products

Subgraphormer: Unifying Subgraph GNNs and Graph Transformers via Graph Products

13 Feb 2024arXiv:2402.08450archive 2025-07-28

Guy Bar-Shalom, Beatrice Bevilacqua, Haggai Maron

In the realm of Graph Neural Networks (GNNs), two exciting research directions have recently emerged: Subgraph GNNs and Graph Transformers. In this paper, we propose an architecture that integrates both approaches, dubbed Subgraphormer, which combines the enhanced expressive power, message-passing mechanisms, and aggregation schemes from Subgraph GNNs with attention and positional encodings, arguably the most important components in Graph Transformers. Our method is based on an intriguing new connection we reveal between Subgraph GNNs and product graphs, suggesting that Subgraph GNNs can be formulated as Message Passing Neural Networks (MPNNs) operating on a product of the graph with itself. We use this formulation to design our architecture: first, we devise an attention mechanism based on the connectivity of the product graph. Following this, we propose a novel and efficient positional encoding scheme for Subgraph GNNs, which we derive as a positional encoding for the product graph. Our experimental results demonstrate significant performance improvements over both Subgraph GNNs and Graph Transformers on a wide range of datasets.

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="2402.08450")

Code

Syntology Ran 10 of 13 code samples harvested from 1 repository linked to this paper; 3 have no recorded run. Of those that ran: 1 ran · violated contract; 9 ran with no contract checked.

By repository: official repository: 13 samples from 1 repository, 10 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

barsguy/subgraphormer officialmentioned in papermentioned on GitHubpytorchMIT 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

13 samples harvested; 10 ran; 0 honoured the contract we drafted; 3 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.

1ran · violated contract
9ran
3unverified

Licence: 0 of the 13 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 barsguy/subgraphormer. “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.

exclude_indices_efficient barsguy/subgraphormer/utils/preprocess.py official repository ran MIT (permissive) · 0cff4ef795da61b0 · report
get_loss_func barsguy/subgraphormer/utils/training.py official repository ran MIT (permissive) · d0664f0de7749db7 · report
get_optim_func barsguy/subgraphormer/utils/training.py official repository ran MIT (permissive) · 642abf566264fd3f · report
get_sched_func barsguy/subgraphormer/utils/training.py official repository ran MIT (permissive) · 800b168632a34d74 · report
initialize_best_metrics barsguy/subgraphormer/utils/my_logging.py official repository ran MIT (permissive) · d06e25f9691220a7 · report
load_config barsguy/subgraphormer/utils/arguments.py official repository ran MIT (permissive) · bb2d04f8c8fcd377 · report
override_config_with_args barsguy/subgraphormer/utils/arguments.py official repository ran MIT (permissive) · 3bb8ae1624199e4e · report
sample_indices barsguy/subgraphormer/utils/preprocess.py official repository ran MIT (permissive) · 6580312c3a449688 · report
str2bool barsguy/subgraphormer/utils/arguments.py official repository ran · violated contract MIT (permissive) · 7c508037b40522af · report
update_best_metrics barsguy/subgraphormer/utils/my_logging.py official repository ran MIT (permissive) · 92a281b2818ac230 · report
get_zinc12k_dataloader barsguy/subgraphormer/utils/data.py official repository unverified MIT (permissive) · e151850124831c8f · report
get_zincfull_dataloader barsguy/subgraphormer/utils/data.py official repository unverified MIT (permissive) · e0d56ad529d1d5bd · report
subgraph_construction barsguy/subgraphormer/utils/preprocess.py official repository unverified MIT (permissive) · fbdb0d1a2936ebf7 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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