Logical characterizations of recurrent graph neural networks with reals and floats
Veeti Ahvonen, Damian Heiman, Antti Kuusisto, Carsten Lutz
Abstract
In pioneering work from 2019, Barceló 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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers7
- Logical Characterizations of GNNs with Mean AggregationMoritz Schönherr, Carsten LutzAAAI 2026 · 7 citations
- The Correspondence Between Bounded Graph Neural Networks and Fragments of First-Order LogicBernardo Cuenca Grau, Eva Feng, Przemyslaw Andrzej WalegaAAAI 2026 · 4 citations
- The Logical Expressiveness of Temporal GNNs via Two-Dimensional Product LogicsMarco Sälzer, Przemyslaw Andrzej Walega, Martin LangeNeurIPS 2025 · 3 citations
- Sound Logical Explanations for Mean Aggregation Graph Neural NetworksMatthew Morris, Ian HorrocksNeurIPS 2025 · 3 citations
- Aggregate-Combine-Readout GNNs Can Express Logical Classifiers Beyond the Logic C2Stan P. Hauke, Przemyslaw Andrzej WalegaAAAI 2026 · 3 citations
Builds on3
- Recurrent Graph Neural Networks and Their Connections to Bisimulation and LogicMaximilian Pflueger, David Tena Cucala, Egor V. KostylevAAAI 2024 · 20 citations
- The Logical Expressiveness of Graph Neural NetworksPablo Barceló, Egor V. Kostylev, Mikaël Monet, Jorge Pérez et al.ICLR 2020 · 17 citations
- The Descriptive Complexity of Graph Neural NetworksMartin GroheLICS 2023 · 7 citations
Related papers
- Expressive Power of Graph Transformers via LogicVeeti Ahvonen, Maurice Funk, Damian Heiman, Antti Kuusisto et al.AAAI 2026
- Are Targeted Messages More Effective?Martin Grohe, Eran RosenbluthLICS 2024
- Graph Neural Networks and Arithmetic CircuitsTimon Barlag, Vivian Holzapfel, Laura Strieker, Jonni Virtema et al.NeurIPS 2024 · 7 citations
- From Neural Networks to Logical Theories: The Correspondence between Fibring Modal Logics and Fibring Neural NetworksOuns El Harzli, Bernardo Cuenca Grau, Artur d'Avila Garcez, Ian Horrocks et al.ICLR 2026 · 1 citation
- Is uniform expressivity too restrictive? Towards efficient expressivity of GNNsSammy Khalife, Josué Tonelli-CuetoICLR 2025
