Homomorphism Counts as Structural Encodings for Graph Learning

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 \emph{graph inductive biases} to condition the model on graph structure. In this work, we propose \emph{motif structural encoding} (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.

Cite

Text

Bao et al. "Homomorphism Counts as Structural Encodings for Graph Learning." International Conference on Learning Representations, 2025.

Markdown

[Bao et al. "Homomorphism Counts as Structural Encodings for Graph Learning." International Conference on Learning Representations, 2025.](https://mlanthology.org/iclr/2025/bao2025iclr-homomorphism/)

BibTeX

@inproceedings{bao2025iclr-homomorphism,
  title     = {{Homomorphism Counts as Structural Encodings for Graph Learning}},
  author    = {Bao, Linus and Jin, Emily and Bronstein, Michael M. and Ceylan, Ismail Ilkan and Lanzinger, Matthias},
  booktitle = {International Conference on Learning Representations},
  year      = {2025},
  url       = {https://mlanthology.org/iclr/2025/bao2025iclr-homomorphism/}
}