Abstract
The concern of overconfident mis-predictions under distributional shift demands extensive reliability research on Graph Neural Networks used in critical tasks in drug discovery. Here we first introduce CardioTox, a real-world benchmark on drug cardio-toxicity to facilitate such efforts. Our exploratory study shows overconfident mis-predictions are often distant from training data. That leads us to develop distance-aware GNNs: GNN-SNGP. Through evaluation on CardioTox and three established benchmarks, we demonstrate GNN-SNGP's effectiveness in increasing distance-awareness, reducing overconfident mis-predictions and making better calibrated predictions without sacrificing accuracy performance. Our ablation study further reveals the representation learned by GNN-SNGP improves distance-preservation over its base architecture and is one major factor for improvements.
Introduction
In the high-stakes domain of drug discovery, Graph Neural Networks (GNNs) are frequently deployed for liability screening, such as predicting potential cardiotoxicity. However, standard GNNs suffer from a dangerous flaw: overconfidence under distributional shift. Because drug discovery inherently involves exploring novel chemical space, test molecules are often structurally distinct from training data. Standard models tend to produce "Overconfident False Negatives" (OFNs), incorrectly labeling toxic compounds as safe with high certainty. Research indicates that 60% of these overconfident errors occur on molecules far from the training distribution, highlighting a critical need for "distance-aware" models.
Methods: GNN-SNGP and CardioTox
To address these reliability concerns, we propose GNN-SNGP, a distance-aware architecture that ensures model uncertainty increases as test molecules become more structurally distinct from the training set.
GNN-SNGP Architecture
The model modifies a standard Message Passing Neural Network (MPNN) using the Spectral-normalized Neural Gaussian Process (SNGP) framework:
- Spectral Normalization (SN): Applied to hidden layers to preserve the distance between molecules from the input space to the latent representation. This prevents "feature collapse," where distinct inputs are mapped to the same internal point.
- Neural Gaussian Process (GP) Layer: The final dense layer is replaced with a GP layer (approximated via Random Fourier Features). This layer provides a variance estimate that naturally grows as inputs move away from the training data.
The CardioTox Benchmark
We introduce CardioTox, a curated dataset of over 9,000 molecules with labels for hERG inhibition. To measure performance under real-world distributional shifts, we established three test splits: Test-IID (similar to training), Test-OOD1 (NCATS data, 84% novel), and Test-OOD2 (FDA data, 82% novel).
Key Results
GNN-SNGP was evaluated against CardioTox and established benchmarks like molHIV, BBBP, and BACE.
Improved Calibration and Safety
On the Test-OOD2 set, GNN-SNGP reduced the Expected Calibration Error (ECE) from 0.082 to 0.044, nearly doubling the reliability of probability scores. Crucially, the model significantly reduced the percentage of dangerous OFNs. Ensembling GNN-SNGP models further improved these metrics, in some cases eliminating OFNs entirely.
No Accuracy Trade-off
Unlike many robustness techniques that degrade performance, GNN-SNGP maintained or improved AUROC across almost all benchmarks. This suggests that distance-preserving features are inherently more robust for generalization.
Conclusion
The synergy between Spectral Normalization and Gaussian Processes is vital for reliable GNNs. SN ensures that novel inputs remain in distinct regions of the latent space, allowing the GP layer to correctly flag them as uncertain. While GNN-SNGP represents a significant advancement, future work will explore balancing information preservation with dimension reduction and extending these techniques to more complex architectures like Graph Attention Networks.
Summary updated