24
0

The Correspondence Between Bounded Graph Neural Networks and Fragments of First-Order Logic

Abstract

Graph Neural Networks (GNNs) address two key challenges in applying deep learning to graph-structured data: they handle varying size input graphs and ensure invariance under graph isomorphism. While GNNs have demonstrated broad applicability, understanding their expressive power remains an important question. In this paper, we show that bounded GNN architectures correspond to specific fragments of first-order logic (FO), including modal logic (ML), graded modal logic (GML), modal logic with the universal modality (ML(A)), the two-variable fragment (FO2) and its extension with counting quantifiers (C2). To establish these results, we apply methods and tools from finite model theory of first-order and modal logics to the domain of graph representation learning. This provides a unifying framework for understanding the logical expressiveness of GNNs within FO.

View on arXiv
@article{grau2025_2505.08021,
  title={ The Correspondence Between Bounded Graph Neural Networks and Fragments of First-Order Logic },
  author={ Bernardo Cuenca Grau and Przemysław A. Wałęga },
  journal={arXiv preprint arXiv:2505.08021},
  year={ 2025 }
}
Comments on this paper