Conformal Inductive Graph Neural Networks

Soroush H. Zargarbashi, Aleksandar Bojchevski

TL;DR

Standard Conformal Prediction (CP) fails on evolving graphs because new nodes and edges trigger "message passing" that shifts the distribution of model outputs, breaking the mathematical guarantees of uncertainty. This paper introduces NodeEx and EdgeEx CP, novel frameworks that restore these guarantees for inductive Graph Neural Networks (GNNs) by dynamically re-calibrating scores based on the current graph state.

The Problem: Distribution Shifts in Evolving Graphs

Graph Neural Networks are notoriously difficult to trust because their "softmax" outputs are often uncalibrated—meaning a 90% confidence score doesn't actually mean the model is right 90% of the time. Conformal Prediction (CP) is a popular "black-box" wrapper that fixes this by producing prediction sets (e.g., "The label is either 'Physics' or 'Biology'") that are guaranteed to contain the true label with a user-defined probability (like 95%).

However, CP relies on exchangeability: the idea that your calibration data and your test data are interchangeable. In a static graph (transductive setting), this works. But in the real world, graphs grow. When a new node arrives, it sends messages to its neighbors, changing their embeddings and their resulting scores. This "implicit distribution shift" breaks exchangeability. Previous attempts to fix this for inductive GNNs either lacked rigorous guarantees or failed miserably on sparse, real-world networks.

Distribution shift over time and the performance of NodeEx CP vs. Naive CP.

Proposed Methods: NodeEx and EdgeEx CP

The authors propose two main approaches based on how the graph evolves:

  1. NodeEx CP (Node-Exchangeable): This assumes that any permutation of node arrival is equally likely. The key innovation is to compute conformity scores conditional on the subgraph at the specific timestep of prediction. Because the shift caused by new nodes affects the calibration set and the test set symmetrically, re-calculating the quantile threshold at each step restores the coverage guarantee.
  2. EdgeEx CP (Edge-Exchangeable): Since node-exchangeable models often assume dense graphs (which real-world networks are not), the authors extend their theory to edge-exchangeable sequences. They prove that these sequences can be treated as weighted node-exchangeable sequences. By applying Weighted Conformal Prediction—specifically using weights proportional to the reciprocal of a node's degree ($1/deg(v)$)—they recover the coverage guarantee even for sparse graphs.

Crucially, they prove that these guarantees hold regardless of when you make the prediction—whether immediately upon a node's arrival or at any point in the future as the graph continues to grow.

Key Insights and Results

The researchers evaluated their methods across nine diverse datasets (including citation networks, co-authorship graphs, and large-scale networks like Reddit2) using four different GNN architectures.

  • Symmetry is the Savior: The "aha!" moment is realizing that while message passing shifts scores, it does so in a way that preserves the relative ranking of calibration and test nodes, provided the underlying graph process is exchangeable.
  • Sparse Graph Support: Most theoretical work on exchangeable graphs assumes "dense" limits (where edges grow quadratically). By pivoting to edge-exchangeability, the authors make CP practical for the sparse, "power-law" graphs common in social networks and web data.
  • Reliable Coverage & Efficiency: In experiments, NodeEx and EdgeEx CP consistently stayed within a fraction of a percent of the target 90% coverage. In contrast, "Naive CP" (which ignores graph shift) saw its error rate climb significantly as the graph evolved. Furthermore, the proposed methods produced smaller prediction sets than baselines, meaning they are more precise while maintaining safety guarantees. They also achieved a higher "singleton hit ratio" (predicting exactly one correct label).

Limitations and Future Work

While a significant step forward, the method provides "marginal" coverage (holds on average across many nodes) rather than conditional coverage for a specific node. Additionally, dynamically re-computing scores as the graph grows introduces computational overhead ($O(n \times t)$), though this remains manageable for many real-time applications. Finally, the guarantee assumes the evaluation time isn't chosen by an adversary who knows the prediction sets in advance.

Summary updated

BibTeX
@inproceedings{zargarbashi2024conformal,
  author = {Soroush H. Zargarbashi and Aleksandar Bojchevski},
  title = {{Conformal Inductive Graph Neural Networks}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=homn1jOKI5},
}
Figure