A Logic for Reasoning About Aggregate-Combine Graph Neural Networks
Pierre Nunn, Marco Sälzer, François Schwarzentruber, Nicolas Troquard
TL;DR
The paper defines $K^{\#}$, a modal-logic framework that integrates counting modalities within linear inequalities to precisely capture Aggregate-Combine GNNs (AC-GNNs). It proves a bidirectional correspondence: every $K^{\#}$ formula has an equivalent AC-GNN and every AC-GNN in the studied class has an equivalent $K^{\#}$ formula, enabling formal reasoning about GNNs via logic. It establishes that satisfiability for $K^{\#}$ is PSPACE-complete and shows that essential reasoning tasks about GNNs (e.g., checking equivalence, containment, or non-emptiness of intersections with a formula) can be solved in PSPACE. These results pave the way for applying standard logical methods to GNN querying, equivalence checking, and abductive explanations, with potential for developing verification tools. The work also discusses potential extensions to broader GNN classes and graph settings, aiming to broaden the practical impact of logical reasoning in graph neural models.
Abstract
We propose a modal logic in which counting modalities appear in linear inequalities. We show that each formula can be transformed into an equivalent graph neural network (GNN). We also show that a broad class of GNNs can be transformed efficiently into a formula, thus significantly improving upon the literature about the logical expressiveness of GNNs. We also show that the satisfiability problem is PSPACE-complete. These results bring together the promise of using standard logical methods for reasoning about GNNs and their properties, particularly in applications such as GNN querying, equivalence checking, etc. We prove that such natural problems can be solved in polynomial space.
