SimCalib: Graph Neural Network Calibration Based on Similarity between Nodes

Boshi Tang, Zhiyong Wu, Xixin Wu, Qiaochu Huang, Jun Chen, Shun Lei, Helen Meng

Introduction

In high-stakes domains such as medical diagnosis and autonomous navigation, the reliability of artificial intelligence is paramount. It is insufficient for a model to merely be accurate; it must also be trustworthy. A well-calibrated model ensures that its "confidence" scores align with its actual probability of being correct. For instance, if a model predicts a class with 90% confidence, it should ideally be correct 90% of the time.

Modern Graph Neural Networks (GNNs), however, are notoriously miscalibrated, frequently exhibiting extreme overconfidence. While standard post-hoc calibration techniques like Temperature Scaling exist for independent data points, they fail to account for the interconnected nature of graph data. SimCalib addresses this gap by introducing a novel post-hoc calibration framework that leverages node similarity—both global and local—to produce more reliable confidence estimates.

Methodology

SimCalib is a post-hoc method, meaning it calibrates a pre-trained GNN without altering its original predictions, thereby preserving the model's accuracy. It functions by generating a node-specific temperature ($T$) to scale the output logits. The framework integrates two primary mechanisms:

  1. Global Feature Similarity Propagation: Instead of raw input features, SimCalib utilizes intermediate features from the GNN. It computes "class prototypes"—the average feature vector for each class—and measures the Mahalanobis distance between a node and these prototypes. This allows the model to assess how a specific node fits within the global distribution of its predicted class.
  2. Local Representation Movement Similarity: This mechanism examines how nodes "move" within the feature space during the GNN's message-passing layers. It employs proxies for homophily (the tendency of similar nodes to connect) and relative degree to capture local structural influences.

The final calibrated prediction is a weighted combination of these global and local components, controlled by a hyperparameter $\omega$.

Experimental Setup

The authors evaluated SimCalib across 16 benchmarks, using 8 diverse graph datasets and two popular GNN backbones: Graph Convolutional Networks (GCN) and Graph Attention Networks (GAT). The datasets include:

  • Citation Networks: Cora, Citeseer, Pubmed, CoraFull.
  • Amazon Product Graphs: Computers, Photo.
  • Co-author Graphs: CS, Physics.

Key Insights

A core contribution of this work is a theoretical proof demonstrating that considering nodes with high correlation (similarity) effectively reduces Expected Calibration Error (ECE). By grouping similar nodes, the calibration process can better estimate the true likelihood of correctness.

Oversmoothing and Calibration

SimCalib is the first framework to explicitly link the "oversmoothing" phenomenon in GNNs—where features of different nodes become indistinguishable in deep layers—to calibration. The authors argue that the dynamics leading to oversmoothing also obscure the information necessary for accurate confidence estimation.

Data Efficiency

One of SimCalib's most significant advantages is its data efficiency. In scenarios with very few labeled nodes available for calibration, SimCalib maintains superior performance compared to existing baselines.

SimCalib demonstrates superior data efficiency, maintaining low ECE even at low label rates compared to other methods.

Results

SimCalib achieved state-of-the-art (SOTA) performance on 14 out of the 16 tested benchmarks. On average, it reduced the ECE by 10.4% compared to the previous leading method, GATS.

Comparison of Expected Calibration Error (ECE) across various datasets and backbones. SimCalib consistently achieves the lowest error (bolded).

Statistical analysis using the Wilcoxon signed-rank test confirmed that SimCalib’s improvements are statistically significant ($p = 7.63 \times 10^{-4}$), providing 99.9% confidence in its superiority.

Conclusion and Future Work

SimCalib provides a robust, theoretically grounded approach to GNN calibration. While highly effective, future work could focus on automating the selection of the balancing weight $\omega$ and extending the similarity-based framework to other graph tasks like link prediction or graph-level classification. Currently, the model approximates homophily using logit similarity; refining this approximation could further enhance calibration accuracy in complex graph structures.

Summary updated

BibTeX
@inproceedings{tang2024simcalib,
  author = {Boshi Tang and Zhiyong Wu and Xixin Wu and Qiaochu Huang and Jun Chen and Shun Lei and Helen Meng},
  title = {{SimCalib: Graph Neural Network Calibration Based on Similarity between Nodes}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i14.29450},
}
Figure