Homomorphism Counts as Structural Encodings for Graph Learning
Linus Bao, Emily Jin, Michael M. Bronstein, Ismail Ilkan Ceylan, Matthias Lanzinger
Abstract
Graph Transformers are popular neural networks that extend the well-known Transformer architecture to the graph domain. These architectures operate by applying self-attention on graph nodes and incorporating graph structure through the use of positional encodings (e.g., Laplacian positional encoding) or structural encodings (e.g., random-walk structural encoding). The quality of such encodings is critical, since they provide the necessary to condition the model on graph structure. In this work, we propose (MoSE) as a flexible and powerful structural encoding framework based on counting graph homomorphisms. Theoretically, we compare the expressive power of MoSE to random-walk structural encoding and relate both encodings to the expressive power of standard message passing neural networks. Empirically, we observe that MoSE outperforms other well-known positional and structural encodings across a range of architectures, and it achieves state-of-the-art performance on a widely studied molecular property prediction dataset.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers4
- Sketch-Augmented Features Improve Learning Long-Range Dependencies in Graph Neural NetworksRyien Hosseini, Filippo Simini, Venkatram Vishwanath, Rebecca Willett et al.NeurIPS 2025 · 1 citation
- On The Expressive Power of GNN DerivativesYam Eitan, Moshe Eliasof, Yoav Gelberg, Fabrizio Frasca et al.ICLR 2026 · 1 citation
- Message Passing on the Edge: Towards Scalable and Expressive GNNsPablo Barcelo, Fabian Jogl, Alexander Kozachinskiy, Matthias Lanzinger et al.ICML 2026
- DISSOLVR: An Interpretable and Fast Framework for Aqueous and Organic Solubility PredictionVansh Ramani, Har A Arora, Dhairya Kuchhal, Sayan Ranu et al.ICML 2026
Builds on26
- Open Graph Benchmark: Datasets for Machine Learning on GraphsWeihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong et al.NeurIPS 2020 · 3,935 citations
- Do Transformers Really Perform Badly for Graph Representation?Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng et al.NeurIPS 2021 · 1,632 citations
- Recipe for a General, Powerful, Scalable Graph TransformerLadislav Rampásek, Michael Galkin, Vijay Prakash Dwivedi, Anh Tuan Luu et al.NeurIPS 2022 · 1,216 citations
- Rethinking Graph Transformers with Spectral AttentionDevin Kreuzer, Dominique Beaini, William L. Hamilton, Vincent Létourneau et al.NeurIPS 2021 · 854 citations
- Graph Neural Networks with Learnable Structural and Positional RepresentationsVijay Prakash Dwivedi, Anh Tuan Luu, Thomas Laurent, Yoshua Bengio et al.ICLR 2022 · 464 citations
Related papers
- Simple Path Structural Encoding for Graph TransformersLouis Airale, Antonio Longa, Mattia Rigon, Andrea Passerini et al.ICML 2025
- From Theory to Practice: Rethinking Green and Martin Kernels for Unleashing Graph TransformersYoon Hyeok Lee, Jaemin Park, Taejin Paik, Doyun Kim et al.ICML 2025
- Structure-Aware Transformer for Graph Representation LearningDexiong Chen, Leslie O'Bray, Karsten M. BorgwardtICML 2022 · 349 citations
- On the Stability of Expressive Positional Encodings for GraphsYinan Huang, William Lu, Joshua Robinson, Yu Yang et al.ICLR 2024 · 32 citations
- Transformers over Directed Acyclic GraphsYuankai Luo, Veronika Thost, Lei ShiNeurIPS 2023 · 43 citations
