English

How Expressive Are Graph Neural Networks in the Presence of Node Identifiers?

Logic in Computer Science 2026-01-30 v1 Machine Learning

Abstract

Graph neural networks (GNNs) are a widely used class of machine learning models for graph-structured data, based on local aggregation over neighbors. GNNs have close connections to logic. In particular, their expressive power is linked to that of modal logics and bounded-variable logics with counting. In many practical scenarios, graphs processed by GNNs have node features that act as unique identifiers. In this work, we study how such identifiers affect the expressive power of GNNs. We initiate a study of the key-invariant expressive power of GNNs, inspired by the notion of order-invariant definability in finite model theory: which node queries that depend only on the underlying graph structure can GNNs express on graphs with unique node identifiers? We provide answers for various classes of GNNs with local max- or sum-aggregation.

Keywords

Cite

@article{arxiv.2601.21882,
  title  = {How Expressive Are Graph Neural Networks in the Presence of Node Identifiers?},
  author = {Arie Soeteman and Michael Benedikt and Martin Grohe and Balder ten Cate},
  journal= {arXiv preprint arXiv:2601.21882},
  year   = {2026}
}

Comments

35 pages