Fundamental Limits in Formal Verification of Message-Passing Neural Networks

Marco Sälzer, Martin Lange · DOI

Abstract

Output reachability and adversarial robustness are among the most relevant safety properties of neural networks. We show that in the context of Message Passing Neural Networks (MPNN), a common Graph Neural Network (GNN) model, formal verification is impossible. In particular, we show that output reachability of graph-classifier MPNN, working over graphs of unbounded size, non-trivial degree and sufficiently expressive node labels, cannot be verified formally: there is no algorithm that answers correctly (with yes or no), given an MPNN, whether there exists some valid input to the MPNN such that the corresponding output satisfies a given specification. However, we also show that output reachability and adversarial robustness of node-classifier MPNN can be verified formally when a limit on the degree of input graphs is given a priori. We discuss the implications of these results, for the purpose of obtaining a complete picture of the principle possibility to formally verify GNN, depending on the expressiveness of the involved GNN models and input-output specifications.

Introduction

As Graph Neural Networks (GNNs) are increasingly deployed in safety-critical applications—such as analyzing chemical structures or managing traffic flows—we need formal guarantees that they will behave correctly. Specifically, researchers want to verify Output Reachability Properties (ORP)—determining if a network can ever produce a specific "bad" output—and Adversarial Robustness Properties (ARP)—ensuring a small change to the input graph does not flip the prediction.

While formal verification is well-studied for standard feed-forward neural networks, GNNs present a unique challenge: their inputs are graphs of varying sizes and complex structures. This research establishes the fundamental theoretical boundaries of what can and cannot be verified for the popular Message-Passing Neural Network (MPNN) model.

The Verification Landscape

The core contribution of this work is mapping the "landscape" of GNN verification. By analyzing different combinations of input specifications (e.g., bounded vs. unbounded graph degree) and output specifications (e.g., node-level vs. graph-level classification), we identify the exact threshold where verification transitions from being mathematically possible (decidable) to impossible (undecidable).

The landscape of MPNN verification, showing the transition from decidable (green) to undecidable (red) regions based on input and output specifications.

As shown in Figure 1, the complexity of the input specification is the primary driver of undecidability. When moving from neighborhood-restricted inputs ($\Phi_{neigh}$) to completely unbounded graphs ($\Phi_{unb}$), the problem becomes intractable for graph-level tasks.

The Impossibility of Graph-Level Verification

The paper proves that formal verification of graph-classifier MPNNs working over graphs of unbounded size and non-trivial degree is undecidable (Theorem 1). To prove this, the authors use a reduction from Post’s Correspondence Problem (PCP), a classic undecidable problem in computer science.

A visual representation of the graph construction used to reduce Post’s Correspondence Problem (PCP) to the MPNN verification problem.

By constructing a specific graph structure (illustrated in Figure 3) that encodes the strings of a PCP instance, the authors show that if a verifier could determine the output reachability of an MPNN on such a graph, it would effectively solve the PCP. Since the PCP is known to be undecidable, a general verifier for graph-level MPNNs cannot exist. This result extends to Adversarial Robustness (Corollary 1), providing the first formal proof that general adversarial robustness for graph classifiers is uncomputable.

The Possibility of Node-Level Verification

Conversely, the research identifies a "safe zone" for verification. Formal verification of node-classifier MPNNs is decidable as long as the maximum degree of the input graphs is known and fixed beforehand (Theorem 2).

This possibility arises from the Tree-Model Property. For node-classification tasks, an MPNN only "sees" a local neighborhood of a fixed depth. On a graph with a bounded degree, this neighborhood can be represented as a finite tree. This allows the problem to be reduced to verifying a standard feed-forward neural network, which is a known, solvable problem. This decidability also extends to node-level adversarial robustness (Corollary 2).

Conclusion

This work establishes that the very features that make GNNs powerful—the ability to handle graphs of any size and complex node labels—are exactly what make them impossible to verify formally in the general case. While node-level verification remains possible under degree constraints, graph-level safety guarantees for unbounded inputs are theoretically out of reach. These results serve as a guide for developers, highlighting the need to either bound graph parameters or accept that certain safety properties of GNNs will remain "black boxes" that defy formal proof.

Summary updated

BibTeX
@inproceedings{salzer2023fundamental,
  author = {Marco Sälzer and Martin Lange},
  title = {{Fundamental Limits in Formal Verification of Message-Passing Neural Networks}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=WlbG820mRH-},
}
Figure