Robust counterfactual explanations in classification and regression
Emilio Carrizosa, Antonio Navas-Orozco · European Journal of Operational Research · 2026
Counterfactual explanations are common tools to pursue explainability of Machine Learning models. They consist on finding a minimally perturbed data point from a given input for which the model’s output satisfies a certain condition. However, they are prone to instability to model changes and, in particular, shifts of the training data. In this paper, we address the challenge of building robust counterfactual explanations for Generalized Linear Models (GLMs). Robustness is understood as guaranteeing that the predicted outcome for the counterfactual decision remains sufficiently high when the nominal probability distribution (the empirical distribution for the given training sample) used to train the GLM is perturbed and replaced by a close -according to some dissimilarity- distribution with identical support. This problem is then expressed as a biobjective bilevel nonlinear optimization problem, to which a numerical method is proposed, consisting on iteratively solving MIPs derived from a combination of cutting planes and Gaussian Variable Neighbourhood Search (VNS) algorithms. Lastly, we conduct experiments on regression, classification and regression with counting data for three datasets, validating the strength of our approach.