Table of Contents
Fetching ...

On the computation of counterfactual explanations -- A survey

André Artelt, Barbara Hammer

TL;DR

This survey analyzes how counterfactual explanations can be computed efficiently by exploiting model internals, moving beyond model-agnostic approaches. It provides a unifying optimization framework and derives tractable linear and convex quadratic programs for a wide range of models, including GLMs (logistic, softmax, linear, Poisson, exponential), Gaussian NB, QDA, LVQ, and tree-based models. Where non-convexities arise (e.g., GNb, QDA, localized LVQ), the paper discusses practical approximation strategies such as CCP, SDP relaxations, and dual formulations, and it outlines gradient-based and gradient-free options. The work also details implementation aspects (CEML, LVQ code, Python tooling) and offers concrete guidance for extending counterfactual computations to previously untreated models, contributing both theoretical formulations and actionable methods with real-world applicability.

Abstract

Due to the increasing use of machine learning in practice it becomes more and more important to be able to explain the prediction and behavior of machine learning models. An instance of explanations are counterfactual explanations which provide an intuitive and useful explanations of machine learning models. In this survey we review model-specific methods for efficiently computing counterfactual explanations of many different machine learning models and propose methods for models that have not been considered in literature so far.

On the computation of counterfactual explanations -- A survey

TL;DR

This survey analyzes how counterfactual explanations can be computed efficiently by exploiting model internals, moving beyond model-agnostic approaches. It provides a unifying optimization framework and derives tractable linear and convex quadratic programs for a wide range of models, including GLMs (logistic, softmax, linear, Poisson, exponential), Gaussian NB, QDA, LVQ, and tree-based models. Where non-convexities arise (e.g., GNb, QDA, localized LVQ), the paper discusses practical approximation strategies such as CCP, SDP relaxations, and dual formulations, and it outlines gradient-based and gradient-free options. The work also details implementation aspects (CEML, LVQ code, Python tooling) and offers concrete guidance for extending counterfactual computations to previously untreated models, contributing both theoretical formulations and actionable methods with real-world applicability.

Abstract

Due to the increasing use of machine learning in practice it becomes more and more important to be able to explain the prediction and behavior of machine learning models. An instance of explanations are counterfactual explanations which provide an intuitive and useful explanations of machine learning models. In this survey we review model-specific methods for efficiently computing counterfactual explanations of many different machine learning models and propose methods for models that have not been considered in literature so far.

Paper Structure

This paper contains 38 sections, 117 equations, 1 algorithm.