Simple Path Structural Encoding for Graph Transformers

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Airale, Louis, Longa, Antonio, Rigon, Mattia, Passerini, Andrea, Passerone, Roberto
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866913868431753216
author Airale, Louis
Longa, Antonio
Rigon, Mattia
Passerini, Andrea
Passerone, Roberto
author_facet Airale, Louis
Longa, Antonio
Rigon, Mattia
Passerini, Andrea
Passerone, Roberto
contents Graph transformers extend global self-attention to graph-structured data, achieving notable success in graph learning. Recently, random walk structural encoding (RWSE) has been found to further enhance their predictive power by encoding both structural and positional information into the edge representation. However, RWSE cannot always distinguish between edges that belong to different local graph patterns, which reduces its ability to capture the full structural complexity of graphs. This work introduces Simple Path Structural Encoding (SPSE), a novel method that utilizes simple path counts for edge encoding. We show theoretically and experimentally that SPSE overcomes the limitations of RWSE, providing a richer representation of graph structures, particularly for capturing local cyclic patterns. To make SPSE computationally tractable, we propose an efficient approximate algorithm for simple path counting. SPSE demonstrates significant performance improvements over RWSE on various benchmarks, including molecular and long-range graph datasets, achieving statistically significant gains in discriminative tasks. These results pose SPSE as a powerful edge encoding alternative for enhancing the expressivity of graph transformers.
format Preprint
id arxiv_https___arxiv_org_abs_2502_09365
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Simple Path Structural Encoding for Graph Transformers
Airale, Louis
Longa, Antonio
Rigon, Mattia
Passerini, Andrea
Passerone, Roberto
Machine Learning
Artificial Intelligence
Graph transformers extend global self-attention to graph-structured data, achieving notable success in graph learning. Recently, random walk structural encoding (RWSE) has been found to further enhance their predictive power by encoding both structural and positional information into the edge representation. However, RWSE cannot always distinguish between edges that belong to different local graph patterns, which reduces its ability to capture the full structural complexity of graphs. This work introduces Simple Path Structural Encoding (SPSE), a novel method that utilizes simple path counts for edge encoding. We show theoretically and experimentally that SPSE overcomes the limitations of RWSE, providing a richer representation of graph structures, particularly for capturing local cyclic patterns. To make SPSE computationally tractable, we propose an efficient approximate algorithm for simple path counting. SPSE demonstrates significant performance improvements over RWSE on various benchmarks, including molecular and long-range graph datasets, achieving statistically significant gains in discriminative tasks. These results pose SPSE as a powerful edge encoding alternative for enhancing the expressivity of graph transformers.
title Simple Path Structural Encoding for Graph Transformers
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2502.09365