Distribution Free Prediction Sets for Node Classification

Jase Clarkson

TL;DR

Researchers have developed Neighbourhood Adaptive Prediction Sets (NAPS), a new method to provide rigorous uncertainty guarantees for Graph Neural Networks (GNNs). By localizing the calibration process to a node's immediate graph neighborhood, NAPS produces smaller, more accurate prediction sets than standard methods, making GNNs more reliable for real-world deployment.

The Confidence Problem in Graph Neural Networks

Graph Neural Networks (GNNs) are incredibly powerful for tasks like social network analysis or drug discovery, but they suffer from a "confidence" problem. Most GNNs output a single prediction without a reliable measure of how certain they are about that prediction.

A popular framework for fixing this in standard machine learning is Conformal Prediction. It generates a set of possible labels (e.g., "This node is either a 'User' or an 'Admin'") that is guaranteed to contain the true label with a user-defined probability, such as 90%. However, standard conformal prediction relies on a mathematical assumption called exchangeability—the idea that your data points are essentially interchangeable and independent.

Graphs inherently break this rule. In a graph, nodes are connected and dependent on one another; a node's identity is often tied to its neighbors. Applying standard conformal prediction to graphs usually results in "over-conservative" sets that are too large to be practically useful.

Methods: Localizing Calibration with NAPS

To address this, the authors introduce NAPS (Neighbourhood Adaptive Prediction Sets). The core idea is to leverage homophily—the tendency of similar nodes to be connected to one another.

Instead of using the entire dataset to calibrate the model's "error bar" (as seen in standard Adaptive Prediction Sets, or APS), NAPS looks only at a node’s local neighborhood.

Comparison of calibration node selection between standard APS (global) and NAPS (local neighborhood).

The paper proposes three versions of this localized weighting:

  1. NAPS (Unweighted): Uses all nodes within a $K$-hop neighborhood equally for calibration.
  2. NAPS-H (Hyperbolic): Gives more weight to immediate neighbors and less to those further away using a $1/k$ decay.
  3. NAPS-G (Geometric): Uses an even steeper weight decay of $2^{-k}$.

By focusing on the neighborhood, the method accounts for the local structure of the graph, effectively "localizing" the calibration to where the data is most similar to the point being tested.

Key Insights and Ideas

  • Homophily as a Calibration Tool: The critical insight is that in a homophilous graph, a model's error patterns are likely similar within a neighborhood. If the model struggles to distinguish between two classes in one part of the graph, it likely struggles similarly for nearby nodes.
  • The Coverage Gap: The paper uses recent theoretical work to bound the "coverage gap"—the difference between the target confidence (e.g., 90%) and the actual performance. They show that NAPS minimizes this gap by choosing calibration points that are "topologically similar" to the test point.
  • Efficiency: Unlike Bayesian methods that require complex sampling, NAPS acts as a lightweight "wrapper" that can be applied to any pre-trained GNN with almost zero additional computational cost.

Key Results

The method was evaluated on three standard large-scale node classification benchmarks (Flickr, Reddit2, and Amazon Computers) across several GNN architectures like GraphSAGE and ShaDow-GCN. NAPS consistently outperformed the "naive" global baseline (APS).

Coverage and Set Size comparison across different neighborhood sizes.
  • Tighter Sets: As shown in the results, while the baseline produced prediction sets with an average size of ~2.0 nodes, NAPS reduced this to ~1.6 nodes while maintaining the same 90% coverage guarantee. Smaller sets are significantly more informative for end-users.
  • Better Calibration: NAPS showed significantly lower Size-Stratified Coverage Violation (SSCV). This means the 90% guarantee held up better regardless of whether the node was "easy" or "hard" to classify.
  • Robustness: Even on datasets with relatively weak homophily, NAPS still provided better-calibrated results than the global baseline, proving that local information is almost always better than global averages in graph settings.

Limitations and Future Work

While highly effective, NAPS has a few limitations:

  • Inductive Only: The current method is designed for inductive learning (where the model is tested on new nodes or graphs it didn't see during training). It is not yet adapted for the transductive setting, where the graph structure is fixed and known during training.
  • Low-Density Graphs: NAPS relies on having enough neighbors to perform calibration. In very sparse graphs, the sample size might be too small to get an accurate estimate, leading to sets that are too wide.
  • Heterophilic Graphs: The paper focuses on homophilous graphs. Future work is needed to see if this logic can be adapted for "heterophilic" graphs, where connected nodes are intentionally different (e.g., a dating network or a buyer-seller graph).

Summary updated

BibTeX
@inproceedings{clarkson2023distribution,
  author = {Jase Clarkson},
  title = {{Distribution Free Prediction Sets for Node Classification}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=1e80ooimrm},
}
Figure