Improving Counterfactual Truthfulness for Molecular Property Prediction through Uncertainty Quantification
Jonas Teufel, Annika Leinweber, Pascal Friederich
TL;DR
The paper tackles boosting the trustworthiness of counterfactual explanations for molecular property prediction by leveraging uncertainty quantification to filter high-uncertainty counterfactual candidates. It defines counterfactual truthfulness in regression via non-overlapping ground-truth error intervals and introduces UER-AUC as a threshold-agnostic measure of uncertainty-based error reduction. Through extensive experiments on deterministic and real-world molecular datasets, it demonstrates that ensembles, mean-variance estimation, and their combination substantially reduce predictive error and enhance counterfactual truthfulness, with pronounced gains under distributional shifts. The findings highlight uncertainty estimation as a practical and effective component for improving XAI in chemistry and materials science, suggesting simple ensemble approaches already yield meaningful improvements and that further gains can arise from combining UQ with counterfactual generation or extending to other explanation modalities.
Abstract
Explainable AI (xAI) interventions aim to improve interpretability for complex black-box models, not only to improve user trust but also as a means to extract scientific insights from high-performing predictive systems. In molecular property prediction, counterfactual explanations offer a way to understand predictive behavior by highlighting which minimal perturbations in the input molecular structure cause the greatest deviation in the predicted property. However, such explanations only allow for meaningful scientific insights if they reflect the distribution of the true underlying property -- a feature we define as counterfactual truthfulness. To increase this truthfulness, we propose the integration of uncertainty estimation techniques to filter counterfactual candidates with high predicted uncertainty. Through computational experiments with synthetic and real-world datasets, we demonstrate that traditional uncertainty estimation methods, such as ensembles and mean-variance estimation, can already substantially reduce the average prediction error and increase counterfactual truthfulness, especially for out-of-distribution settings. Our results highlight the importance and potential impact of incorporating uncertainty estimation into explainability methods, especially considering the relatively high effectiveness of low-effort interventions like model ensembles.
