Introduction
Graph Neural Networks (GNNs) have demonstrated remarkable performance in modeling complex relational data. However, their deployment in high-stakes domains is often hindered by a tendency toward overconfidence, where models assign high probabilities to incorrect predictions without adequate uncertainty quantification. Conformal Prediction (CP) offers a framework to address this by providing statistical guarantees: for a user-defined error rate $\alpha$, CP generates a prediction set $C(x)$ that contains the true label with probability at least $1-\alpha$.
Despite these guarantees, traditional CP methods face two primary challenges in graph contexts: inefficiency and a post-hoc nature. Inefficient models may produce excessively large prediction sets to satisfy coverage requirements, rendering them impractical. Furthermore, applying CP after training prevents the model from learning to optimize for smaller, more precise prediction sets.
Methodology: RCP-GNN
To overcome these limitations, we present RCP-GNN (Rank-based Conformal Training for GNNs). This framework integrates conformal prediction directly into the GNN training objective, allowing the model to learn representations that minimize prediction set size while maintaining coverage guarantees.
Rank-Based Conformity Scores
Standard CP often relies on raw softmax probabilities, which are frequently miscalibrated in GNNs. RCP-GNN instead utilizes the rank of predicted probabilities. The relative ordering of labels is typically more stable than absolute scores, making rank-based scores more robust to typical GNN calibration errors.
Differentiable Conformal Training
A significant technical challenge is that sorting and ranking operations are non-differentiable. RCP-GNN employs a "smooth" sorting mechanism using sigmoid functions and a differentiable quantile function. This enables the definition of a Conformal Loss ($L_{cp}$) that can be optimized via backpropagation.
The training proceeds in two stages:
- Base Stage: A standard GNN $\mu_\theta$ is trained using a standard prediction loss.
- Conformal Stage: A correction model $\tilde{\mu}_\theta$ is trained to adjust predictions, minimizing the size of conformal sets while adhering to the coverage constraint.
Experimental Evaluation
The proposed framework was evaluated on eight benchmark datasets, including citation networks (Cora, CiteSeer, PubMed, DBLP), Amazon product graphs (Computers, Photos), and co-author networks (CS, Physics). These datasets range from approximately 3,000 to 34,000 nodes.
Results and Discussion
Experimental results demonstrate that RCP-GNN consistently achieves the target marginal coverage across all datasets. Crucially, it exhibits superior efficiency compared to state-of-the-art baselines.
Key findings include:
- Efficiency Gains: RCP-GNN reduced the average prediction set size by up to 11.28% compared to the CF-GNN baseline.
- Robustness: On datasets like Amazon-Photos, where other calibration methods often increased set sizes, RCP-GNN maintained high efficiency, validating the rank-based approach.
- Topology Awareness: By incorporating graph structure into the correction model, RCP-GNN effectively leverages local neighborhood information to refine uncertainty estimates.
Conclusion
RCP-GNN represents a significant step toward trustworthy GNNs by making conformal prediction a first-class citizen in the training process. By optimizing for rank-based efficiency, the model produces tighter, more useful prediction sets without sacrificing statistical validity. Future research will explore extending this framework to inductive settings and broader graph-based tasks such as link prediction.
Summary updated