LAPSE:2025.0370v2
Published Article

LAPSE:2025.0370v2
Bayesian uncertainty quantification of graph neural networks using stochastic gradient Hamiltonian Monte Carlo
July 8, 2025. Originally submitted on June 27, 2025
Abstract
Graph neural networks (GNNs) have proven state-of-the-art performance in molecular property prediction tasks. However, a significant challenge with GNNs is the reliability of their predictions, particularly in critical domains where quantifying model confidence is essential. Therefore, assessing uncertainty in GNN predictions is crucial to improving their robustness. Existing uncertainty quantification methods, such as Deep ensembles and Monte Carlo Dropout, have been applied to GNNs with some success, but these methods are limited to approximate the full posterior distribution. In this work, we propose a novel approach for scalable uncertainty quantification in molecular property prediction using Stochastic Gradient Hamiltonian Monte Carlo (SGHMC). Additionally, we utilize a cyclical learning rate to facilitate sampling from multiple posterior modes which improves posterior exploration within a single training round. Moreover, we compare the proposed methods with Monte Carlo Dropout and Deep ensembles, focusing on error analysis, calibration, and sharpness, considering both epistemic and aleatoric uncertainties. Our experimental results demonstrate that the proposed parallel-SGHMC approach significantly outperforms Monte Carlo Dropout and Deep ensembles in terms of calibration and sharpness. Specifically, parallel-SGHMC reduces the sum of squared errors by 99.4% and 75%, respectively, when compared to Monte Carlo Dropout and Deep Ensembles. These findings suggest that parallel-SGHMC is a promising method for uncertainty quantification in GNN-based molecular property prediction.
Graph neural networks (GNNs) have proven state-of-the-art performance in molecular property prediction tasks. However, a significant challenge with GNNs is the reliability of their predictions, particularly in critical domains where quantifying model confidence is essential. Therefore, assessing uncertainty in GNN predictions is crucial to improving their robustness. Existing uncertainty quantification methods, such as Deep ensembles and Monte Carlo Dropout, have been applied to GNNs with some success, but these methods are limited to approximate the full posterior distribution. In this work, we propose a novel approach for scalable uncertainty quantification in molecular property prediction using Stochastic Gradient Hamiltonian Monte Carlo (SGHMC). Additionally, we utilize a cyclical learning rate to facilitate sampling from multiple posterior modes which improves posterior exploration within a single training round. Moreover, we compare the proposed methods with Monte Carlo Dropout and Deep ensembles, focusing on error analysis, calibration, and sharpness, considering both epistemic and aleatoric uncertainties. Our experimental results demonstrate that the proposed parallel-SGHMC approach significantly outperforms Monte Carlo Dropout and Deep ensembles in terms of calibration and sharpness. Specifically, parallel-SGHMC reduces the sum of squared errors by 99.4% and 75%, respectively, when compared to Monte Carlo Dropout and Deep Ensembles. These findings suggest that parallel-SGHMC is a promising method for uncertainty quantification in GNN-based molecular property prediction.
Record ID
Keywords
graph neural networks, property prediction, Uncertainty quantification
Suggested Citation
Gao Q, Miedema DC, Zhao Y, Weber JM, Tao Q, Schweidtmann AM. Bayesian uncertainty quantification of graph neural networks using stochastic gradient Hamiltonian Monte Carlo. Systems and Control Transactions 4:1360-1364 (2025) https://doi.org/10.69997/sct.111298
Author Affiliations
Gao Q: Process Intelligence Research Team, Department of Chemical Engineering, Delft University of Technology, Van der Maasweg 9, Delft 2629 HZ, The Netherlands
Miedema DC: Process Intelligence Research Team, Department of Chemical Engineering, Delft University of Technology, Van der Maasweg 9, Delft 2629 HZ, The Netherlands
Zhao Y: Department of Imaging Physics, Delft University of Technology, Delft, the Netherlands
Weber JM: Pattern Recognition and Bioinformatics, Department of Intelligent Systems, Delft University of Technology, Van Mourik Broekmanweg 6, 2628 XE Delft, The Netherlands
Tao Q: Department of Imaging Physics, Delft University of Technology, Delft, the Netherlands
Schweidtmann AM: Process Intelligence Research Team, Department of Chemical Engineering, Delft University of Technology, Van der Maasweg 9, Delft 2629 HZ, The Netherlands
Miedema DC: Process Intelligence Research Team, Department of Chemical Engineering, Delft University of Technology, Van der Maasweg 9, Delft 2629 HZ, The Netherlands
Zhao Y: Department of Imaging Physics, Delft University of Technology, Delft, the Netherlands
Weber JM: Pattern Recognition and Bioinformatics, Department of Intelligent Systems, Delft University of Technology, Van Mourik Broekmanweg 6, 2628 XE Delft, The Netherlands
Tao Q: Department of Imaging Physics, Delft University of Technology, Delft, the Netherlands
Schweidtmann AM: Process Intelligence Research Team, Department of Chemical Engineering, Delft University of Technology, Van der Maasweg 9, Delft 2629 HZ, The Netherlands
Journal Name
Systems and Control Transactions
Volume
4
First Page
1360
Last Page
1364
Year
2025
Publication Date
2025-07-01
Version Comments
Rendering Corrected in Fig 1
Other Meta
PII: 1360-1364-1243-SCT-4-2025, Publication Type: Journal Article
Record Map
Published Article

LAPSE:2025.0370v2
This Record
External Link

https://doi.org/10.69997/sct.111298
Article DOI
Download
Meta
Links to Related Works
References Cited
- Schweidtmann AM, Rittig JG, Konig A, Grohe M, Mitsos A, Dahmen M. Graph neural networks for prediction of fuel ignition quality. Energy & Fuels 34:11395-11407 (2020) https://doi.org/10.1021/acs.energyfuels.0c01533
- Wieder O, Kohlbacher S, Kuenemann M, Garon A, Ducrot P, Seidel T, Langer T. A compact review of molecular property prediction with graph neural networks. Drug Discov Today: Technol 37:1-12 (2020) https://doi.org/10.1016/j.ddtec.2020.11.009
- Rittig JG, Mitsos A. Thermodynamics-consistent graph neural networks. Chem Sci 15(44):18504-18512 (2024) https://doi.org/10.1039/D4SC04554H
- Abdar M, Pourpanah F, Hussain S, Rezazadegan D, Liu L, Ghavamzadeh M, et al. A review of uncertainty quantification in deep learning: techniques, applications and challenges. Inf Fusion 76:243-297 (2021) https://doi.org/10.1016/j.inffus.2021.05.008
- Gal Y, Ghahramani Z. Dropout as a Bayesian approximation: representing model uncertainty in deep learning. Int Conf Mach Learn 1050-1059 (2016)
- Lakshminarayanan B, Pritzel A, Blundell C. Simple and scalable predictive uncertainty estimation using deep ensembles. Adv Neural Inf Process Syst 30 (2017)
- Wang F, Liu Y, Liu K, Wang Y, Medya S, Yu PS. Uncertainty in graph neural networks: a survey. arXiv preprint (2024)
- Chen T, Fox E, Guestrin C. Stochastic gradient Hamiltonian Monte Carlo. Proc 31st Int Conf Mach Learn, PMLR 32(2):1683-1691 (2014)
- Zhao Y, Yang C, Schweidtmann A, Tao Q. Efficient Bayesian uncertainty estimation for nnU-Net. Int Conf Med Image Comput Comput Assist Interv 535-544 (2022) https://doi.org/10.1007/978-3-031-16452-1_51
- Busk J, Jørgensen PB, Bhowmik A, Schmidt MN, Winther O, Vegge T. Calibrated uncertainty for molecular property prediction using ensembles of message passing neural networks. Mach Learn Sci Technol 3(1):015012 (2021) https://doi.org/10.1088/2632-2153/ac3eb3
- Neal RM. MCMC using Hamiltonian dynamics. In: Handbook of Markov Chain Monte Carlo. Chapman and Hall/CRC 113-162 (2011) https://doi.org/10.1201/b10905
- Ramakrishnan R, Dral PO, Rupp M, von Lilienfeld OA. Quantum chemistry structures and properties of 134 kilo molecules. Sci Data 1:1-7 (2014) https://doi.org/10.1038/sdata.2014.22
- Heid E, Greenman KP, Chung Y, Li SC, Graff DE, Vermeire FH, et al. Chemprop: a machine learning package for chemical property prediction. J Chem Inf Model 64:9-17 (2023) https://doi.org/10.1021/acs.jcim.3c01250

