HopFormer: Sparse Graph Transformers with Explicit Receptive Field Control

Sanggeon Yun, Raheeb Hassan, Ryozo Masukawa, Sungheon Jeong, Mohsen Imani
2/2/2026
cs.LG
transformer-attentiongnn

No confident code implementation found for this paper.

Abstract

Graph Transformers typically rely on explicit positional or structural encodings and dense global attention to incorporate graph topology. In this work, we show that neither is essential.

Show full abstract

We introduce HopFormer, a graph Transformer that injects structure exclusively through head-specific n-hop masked sparse attention, without the use of positional encodings or architectural modifications. This design provides explicit and interpretable control over receptive fields while enabling genuinely sparse attention whose computational cost scales linearly with mask sparsity. Through extensive experiments on both node-level and graph-level benchmarks, we demonstrate that our approach achieves competitive or superior performance across diverse graph structures. Our results further reveal that dense global attention is often unnecessary: on graphs with strong small-world properties, localized attention yields more stable and consistently high performance, while on graphs with weaker small-world effects, global attention offers diminishing returns. Together, these findings challenge prevailing assumptions in graph Transformer design and highlight sparsity-controlled attention as a principled and efficient alternative.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{yun2026hopformer,
  title  = {HopFormer: Sparse Graph Transformers with Explicit Receptive Field Control},
  author = {Sanggeon Yun and Raheeb Hassan and Ryozo Masukawa and Sungheon Jeong and Mohsen Imani},
  year   = {2026},
  eprint = {2602.02268},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.02268v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2602.02268.svg)](https://codeofpaper.com/paper/2602.02268)

Discussion