Graph Alignment for Benchmarking Graph Neural Networks and Learning Positional Encodings
Abstract
Lay Summary
Graphs — networks of connected points — describe everything from molecules to social networks to citation databases. Specialized AI models called Graph Neural Networks (GNNs) learn from such data, but comparing them is surprisingly hard: real-world tasks mix understanding the graph's shape with processing other information like atom types, so it's unclear whether one model beats another because of better structural insight or for unrelated reasons. The few benchmarks that test pure shape understanding only cover narrow slices of the many graph types found in practice. We turn an old combinatorial puzzle into a flexible benchmark: given two slightly corrupted copies of the same graph, can a GNN figure out which point in one corresponds to which point in the other? Starting from any real graph collection, we generate matching tasks with tunable difficulty and show there is a "sweet spot" where competing architectures separate most clearly, making the ranking statistically reliable. The representations GNNs learn while solving this puzzle prove broadly useful beyond the puzzle itself: they help transformers predict molecular properties more accurately, and compress graph structure so faithfully that the original connections can be reconstructed with 98% accuracy. We release an open-source package so the community can benchmark new architectures on their own graphs.