The Correspondence Between Bounded Graph Neural Networks and Fragments of First-Order Logic
Bernardo Cuenca Grau, Eva Feng, Przemyslaw Andrzej Walega
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 propose GNN architectures that correspond precisely to prominent fragments of first-order logic (FO), including various modal logics as well as more expressive two-variable fragments. To establish these results, we apply methods from finite model theory of first-order and modal logics to the domain of graph representation learning. Our results provide a unifying framework for understanding the logical expressiveness of GNNs within FO.
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 papers3
- 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
- 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
Builds on6
- How Powerful are Spectral Graph Neural NetworksXiyuan Wang, Muhan ZhangICML 2022 · 309 citations
- A Theory of Link Prediction via Relational Weisfeiler-Leman on Knowledge GraphsXingyue Huang, Miguel Romero, Ismail Ilkan Ceylan, Pablo BarcelóNeurIPS 2023 · 38 citations
- Recurrent Graph Neural Networks and Their Connections to Bisimulation and LogicMaximilian Pflueger, David Tena Cucala, Egor V. KostylevAAAI 2024 · 20 citations
- Logical characterizations of recurrent graph neural networks with reals and floatsVeeti Ahvonen, Damian Heiman, Antti Kuusisto, Carsten LutzNeurIPS 2024 · 19 citations
- The Logical Expressiveness of Graph Neural NetworksPablo Barceló, Egor V. Kostylev, Mikaël Monet, Jorge Pérez et al.ICLR 2020 · 17 citations
Related papers
- Are Targeted Messages More Effective?Martin Grohe, Eran RosenbluthLICS 2024
- Towards a Complete Logical Framework for GNN ExpressivenessTuo XuICLR 2025
- Calibrate and Boost Logical Expressiveness of GNN Over Multi-Relational and Temporal GraphsYeyuan Chen, Dingmin WangNeurIPS 2023 · 2 citations
- Logical Characterizations of GNNs with Mean AggregationMoritz Schönherr, Carsten LutzAAAI 2026 · 7 citations
- Aggregate-Combine-Readout GNNs Can Express Logical Classifiers Beyond the Logic C2Stan P. Hauke, Przemyslaw Andrzej WalegaAAAI 2026 · 3 citations
