open access publication

Article, 2024

Generating collective counterfactual explanations in score-based classification via mathematical optimization

Expert Systems with Applications, ISSN 0957-4174, 1873-6793, Volume 238, Page 121954, 10.1016/j.eswa.2023.121954

Contributors

Carrizosa, Emilio 0000-0002-0832-8700 [1] RamĂ­rez-Ayerbe, Jasone 0000-0002-7715-3756 (Corresponding author) [1] Morales, Dolores Romero 0000-0001-7945-1469 [2]

Affiliations

  1. [1] University of Seville
  2. [NORA names: Spain; Europe, EU; OECD];
  3. [2] Copenhagen Business School
  4. [NORA names: CBS Copenhagen Business School; University; Denmark; Europe, EU; Nordic; OECD]

Abstract

Due to the increasing use of Machine Learning models in high stakes decision making settings, it has become increasingly important to have tools to understand how models arrive at decisions. Assuming an already trained Supervised Classification model, post-hoc explanations can be obtained via so-called counterfactual analysis: a counterfactual explanation of an instance indicates how this instance should be minimally modified so that the perturbed instance is classified in the desired class by the given Machine Learning classification model. Most of the Counterfactual Analysis literature focuses on the single-instance single-counterfactual setting, in which the analysis is done for one single instance to provide one single counterfactual explanation. Taking a stakeholder’s perspective, in this paper we introduce the so-called collective counterfactual explanations. By means of novel Mathematical Optimization models, we provide a counterfactual explanation for each instance in a group of interest, so that the total cost of the perturbations is minimized under some linking constraints. Making the process of constructing counterfactuals collective instead of individual enables us to detect the features that are critical to the entire dataset to have the individuals classified in the desired class. Our methodology allows for some instances to be treated individually, as in the single-instance single-counterfactual case, performing the collective counterfactual analysis for a fraction of records of the group of interest. This way, outliers are identified and handled appropriately. Under some assumptions on the classifier and the space in which counterfactuals are sought, finding collective counterfactual explanations is reduced to solving a convex quadratic linearly constrained mixed integer optimization problem, which, for datasets of moderate size, can be solved to optimality using existing solvers. The performance of our approach is illustrated on real-world datasets, demonstrating its usefulness.

Keywords

analysis, analysis literature, cases, class, classification, classification model, classifier, constraints, cost, counterfactual analysis, counterfactual explanations, counterfactuals, dataset, datasets of moderate size, decision, explanation, features, fraction, fraction of records, group, increased use, individuals, instances, integer optimization problem, learning classification models, learning models, literature, machine, machine learning classification models, machine learning models, mathematical optimization, mathematical optimization model, methodology, mixed integer optimization problem, model, moderate size, optimization, optimization model, optimization problem, outliers, performance, perspective, perturbation, perturbed instance, post-hoc, post-hoc explanations, problem, process, real-world datasets, records, sets, single-instance, size, solver, space, stakeholder perspectives, stakeholders, supervised classification model, training supervised classification models, use

Funders

  • Ministry of Economy, Industry and Competitiveness
  • European Commission

Data Provider: Digital Science