Counterfactual explanations (CEs) are powerful tools within the thriving field of explainable machine learning, consisting of finding a minimal perturbation to a given instance so that its output in a certain predictive model satisfies some desirable property. Since counterfactuals are computed from an empirical model trained on a dataset, it is not evident that the resulting counterfactual explanations satisfy the requirements of the ground-truth model, which may differ from the empirical one. In this paper, we address this issue and build robust counterfactuals, in the sense that they fulfill the desired property on the ground-truth model with a given probability. We propose a statistical test to obtain performance guarantees of our robust counterfactual explanations, not only under the empirical model, but also under the ground-truth model. We particularize to generalized linear models (GLMs), a broad family of models that includes both classification, such as the logistic regression model, and regression, such as the linear regression model. We show that, for GLMs, there is a strong connection between CEs with ground-truth model guarantees and parameter-robust CEs. Finding a robust counterfactual explanation in the GLM framework amounts to solving a second-order cone program, readily solvable by off-the-shelf solvers such as Gurobi.
No takes yet. Share an insight, caveat, or question.
Carrizosa et al. (2026) studied this question.
Synapse has enriched 5 related papers. Consider them for comparative context: