Logical Characterizations of Recurrent Graph Neural Networks with Reals and Floats

Veeti Ahvonen, Damian Heiman, Antti Kuusisto, Carsten Lutz
2/3/2026

No confident code implementation found for this paper.

Abstract

In pioneering work from 2019, Barcel\'o and coauthors identified logics that precisely match the expressive power of constant iteration-depth graph neural networks (GNNs) relative to properties definable in first-order logic. In this article, we give exact logical characterizations of recurrent GNNs in two scenarios: (1) in the setting with floating-point numbers and (2) with reals. For floats, the formalism matching recurrent GNNs is a rule-based modal logic with counting, while for reals we use a suitable infinitary modal logic, also with counting. These results give exact matches between logics and GNNs in the recurrent setting without relativising to a background logic in either case, but using some natural assumptions about floating-point arithmetic. Applying our characterizations, we also prove that, relative to graph properties definable in monadic second-order logic (MSO), our infinitary and rule-based logics are equally expressive. This implies that recurrent GNNs with reals and floats have the same expressive power over MSO-definable properties and shows that, for such properties, also recurrent GNNs with reals are characterized by a (finitary!) rule-based modal logic. In the general case, in contrast, the expressive power with floats is weaker than with reals. In addition to logic-oriented results, we also characterize recurrent GNNs, with both reals and floats, via distributed automata, drawing links to distributed computing models.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{ahvonen2026logical,
  title  = {Logical Characterizations of Recurrent Graph Neural Networks with Reals and Floats},
  author = {Veeti Ahvonen and Damian Heiman and Antti Kuusisto and Carsten Lutz},
  year   = {2026},
  eprint = {2405.14606},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2405.14606},
  url    = {https://arxiv.org/abs/2405.14606},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.14606.svg)](https://codeofpaper.com/paper/2405.14606)

Discussion