Abstract
Virtual screening aims to find desirable compounds from chemical libraries using computational methods. For machine learning in this domain, model outputs that can be interpreted as predictive probabilities are highly beneficial, as high prediction scores should ideally correspond to a high probability of correctness. This work presents a comprehensive study on the prediction performance and reliability of graph neural networks (GNNs) trained with recently proposed Bayesian learning algorithms. Our results demonstrate that Bayesian learning algorithms enable well-calibrated predictions across various GNN architectures and classification tasks. Furthermore, we show the implications of reliable predictions for virtual screening, where Bayesian learning can lead to a higher success rate in identifying hit compounds.
Introduction: The Challenge of Overconfidence
In computational drug discovery, virtual screening is used to identify potential drug candidates from vast chemical libraries. However, a significant hurdle is that standard deep learning models are often overconfident. A model might assign a 90% probability to a molecule's activity, but in practice, it may only be correct 60% of the time. This lack of reliability leads to expensive false positives in wet-lab assays, wasting critical resources. This study investigates how Bayesian learning can produce "well-calibrated" models—where confidence scores accurately reflect the likelihood of correctness.
Methods and Datasets
The researchers benchmarked five GNN architectures (GCN, GIN, GraphSAGE, GAT, and GatedGCN) using several approximate Bayesian inference methods:
- MAP (Maximum A Posteriori): The standard non-Bayesian baseline.
- Deep Ensembles: Training multiple models with different initializations.
- Monte Carlo Dropout (MC-DO): Sampling predictions using dropout at inference time.
- Bayes By Backprop (BBB): A variational inference approach.
- SGLD (Stochastic Gradient Langevin Dynamics): A gradient-based MCMC method.
- SWA/SWAG (Stochastic Weight Averaging / Gaussian): Methods that average weights during training to find more generalizable optima.
The study utilized four binary classification datasets from the MoleculeNet benchmark: BACE, BBBP, HIV, and Tox21. To simulate real-world challenges, the authors used scaffold-splitting to ensure test molecules were structurally distinct from the training set.
Results and Discussion
The "Overconfidence" Trap
Standard models (MAP) tend to push predictions toward extreme values (0 or 1). As illustrated in the histograms below, MAP models produce a "U-shaped" distribution where many incorrect predictions (False Positives and False Negatives) are made with high confidence. In contrast, SWAG "softens" these peaks, providing a more realistic distribution of confidence.
Quantitative Improvements in Reliability
The primary metric for reliability is Expected Calibration Error (ECE), which measures the gap between predicted confidence and actual accuracy. Bayesian methods, particularly SWA and SWAG, consistently provided the best balance of high predictive performance (AUROC) and low calibration error.
On the BBBP dataset, for example, the baseline model's ECE of 17.9% was reduced to 6.9% by SWAG. Notably, these improvements in reliability did not come at the cost of accuracy; on the same dataset, AUROC increased from 82.7% (Baseline) to 91.2% (SWAG).
Out-of-Distribution Performance
When simulating real-world screening on the ZINC database (containing molecules different from the training set), the MAP model continued to make many high-confidence predictions. SWAG was significantly more conservative, suggesting that Bayesian models are less likely to produce misleadingly confident results on out-of-distribution data.
Conclusion
Bayesian learning methods, specifically SWA and SWAG, significantly enhance the reliability and accuracy of GNNs for molecular property prediction. While some methods like Bayes By Backprop showed sensitivity to hyperparameters, the overall trend suggests that well-calibrated models are essential for reducing resource waste in drug discovery. Future work could leverage this improved uncertainty estimation in active learning frameworks to further optimize the experimental validation process.
Summary updated