Table of Contents
Fetching ...

The Descriptive Complexity of Graph Neural Networks

Martin Grohe

TL;DR

The paper establishes a tight link between graph neural networks and descriptive complexity by showing that unary graph queries computable by polynomial-size, bounded-depth GNNs with rpl-approximable activations are precisely those definable in the guarded fragment $\textsf{GFO+C}$ with built-ins, placing these GNNs in $\textsf{TC}^0$ in the non-uniform regime. When random initialisation and global readout are allowed, the expressiveness matches bounded-depth Boolean circuits with threshold gates, i.e., $\textsf{TC}^0$; moreover, single GNNs with piecewise linear activations and rational weights define queries within uniform $\textsf{TC}^0$. The work develops a substantial logical toolkit for rational arithmetic inside FO+C and its guarded variants, demonstrates how to simulate FNNs and GNNs within those logics, and proves both uniform and non-uniform characterizations, including a non-uniform converse. These results illuminate fundamental limitations and capabilities of GNNs from a classical complexity perspective, and they open paths to further study of deeper GNN variants, other logics, and uniformity notions. Overall, the paper provides a rigorous foundation linking practical graph learning models to foundational complexity theories, with implications for understanding what GNNs can or cannot compute efficiently on graphs.

Abstract

We analyse the power of graph neural networks (GNNs) in terms of Boolean circuit complexity and descriptive complexity. We prove that the graph queries that can be computed by a polynomial-size bounded-depth family of GNNs are exactly those definable in the guarded fragment GFO+C of first-order logic with counting and with built-in relations. This puts GNNs in the circuit complexity class (non-uniform) $\text{TC}^0$. Remarkably, the GNN families may use arbitrary real weights and a wide class of activation functions that includes the standard ReLU, logistic "sigmoid", and hyperbolic tangent functions. If the GNNs are allowed to use random initialisation and global readout (both standard features of GNNs widely used in practice), they can compute exactly the same queries as bounded depth Boolean circuits with threshold gates, that is, exactly the queries in $\text{TC}^0$. Moreover, we show that queries computable by a single GNN with piecewise linear activations and rational weights are definable in GFO+C without built-in relations. Therefore, they are contained in uniform $\text{TC}^0$.

The Descriptive Complexity of Graph Neural Networks

TL;DR

The paper establishes a tight link between graph neural networks and descriptive complexity by showing that unary graph queries computable by polynomial-size, bounded-depth GNNs with rpl-approximable activations are precisely those definable in the guarded fragment with built-ins, placing these GNNs in in the non-uniform regime. When random initialisation and global readout are allowed, the expressiveness matches bounded-depth Boolean circuits with threshold gates, i.e., ; moreover, single GNNs with piecewise linear activations and rational weights define queries within uniform . The work develops a substantial logical toolkit for rational arithmetic inside FO+C and its guarded variants, demonstrates how to simulate FNNs and GNNs within those logics, and proves both uniform and non-uniform characterizations, including a non-uniform converse. These results illuminate fundamental limitations and capabilities of GNNs from a classical complexity perspective, and they open paths to further study of deeper GNN variants, other logics, and uniformity notions. Overall, the paper provides a rigorous foundation linking practical graph learning models to foundational complexity theories, with implications for understanding what GNNs can or cannot compute efficiently on graphs.

Abstract

We analyse the power of graph neural networks (GNNs) in terms of Boolean circuit complexity and descriptive complexity. We prove that the graph queries that can be computed by a polynomial-size bounded-depth family of GNNs are exactly those definable in the guarded fragment GFO+C of first-order logic with counting and with built-in relations. This puts GNNs in the circuit complexity class (non-uniform) . Remarkably, the GNN families may use arbitrary real weights and a wide class of activation functions that includes the standard ReLU, logistic "sigmoid", and hyperbolic tangent functions. If the GNNs are allowed to use random initialisation and global readout (both standard features of GNNs widely used in practice), they can compute exactly the same queries as bounded depth Boolean circuits with threshold gates, that is, exactly the queries in . Moreover, we show that queries computable by a single GNN with piecewise linear activations and rational weights are definable in GFO+C without built-in relations. Therefore, they are contained in uniform .
Paper Structure (26 sections, 66 theorems, 86 equations)

This paper contains 26 sections, 66 theorems, 86 equations.

Key Result

Theorem 1.1

Let ${{\mathcal{Q}}}$ be a unary query on labelled graphs. Then the following are equivalent.

Theorems & Definitions (84)

  • Theorem 1.1
  • corollary 1.2
  • Theorem 1.3
  • Theorem 1.4
  • Example 2.1
  • Example 2.2
  • Example 2.3
  • Lemma 2.4: BarringtonIS90ChandraSV84,Hesse01
  • Remark 2.5
  • Lemma 2.6
  • ...and 74 more