Table of Contents
Fetching ...

A Two-Stage Algorithm for Cost-Efficient Multi-instance Counterfactual Explanations

André Artelt, Andreas Gregoriades

TL;DR

This paper addresses explainability for groups of instances by introducing multi-instance counterfactual explanations that are cost-efficient. It formalizes the problem as a multi-objective optimization over a dataset $\mathcal{D}$, balancing a per-instance loss $\ell$ and a shared change cost $\theta$, and seeks Pareto-optimal solutions $\vec{\delta}_{\text{cf}}$. A two-stage, data-agnostic algorithm is proposed: Stage 1 groups instances by the direction of their individual counterfactuals using cosine similarity, enabling cheaper shared changes; Stage 2 solves for a group counterfactual with a $\mu+\lambda$ evolutionary algorithm under feature-wise bounds, combining costs and losses into $\theta(\vec{\delta}_{\text{cf}}) + C \sum_{\vec{x}_i \in \mathcal{D}} \ell(h(\vec{x}_i \oplus \vec{\delta}_{\text{cf}}), y_{\text{cf}})$. Experiments on IBM HR Attrition and Law datasets show superior correctness and reduced feature-change costs compared to baselines, with direction-based clustering offering additional gains. The work advances model-agnostic explainability by enabling scalable, actionable multi-instance explanations, though it relies on per-instance counterfactuals and could benefit from gradient-based approximations in the future.

Abstract

Counterfactual explanations constitute among the most popular methods for analyzing black-box systems since they can recommend cost-efficient and actionable changes to the input of a system to obtain the desired system output. While most of the existing counterfactual methods explain a single instance, several real-world problems, such as customer satisfaction, require the identification of a single counterfactual that can satisfy multiple instances (e.g. customers) simultaneously. To address this limitation, in this work, we propose a flexible two-stage algorithm for finding groups of instances and computing cost-efficient multi-instance counterfactual explanations. The paper presents the algorithm and its performance against popular alternatives through a comparative evaluation.

A Two-Stage Algorithm for Cost-Efficient Multi-instance Counterfactual Explanations

TL;DR

This paper addresses explainability for groups of instances by introducing multi-instance counterfactual explanations that are cost-efficient. It formalizes the problem as a multi-objective optimization over a dataset , balancing a per-instance loss and a shared change cost , and seeks Pareto-optimal solutions . A two-stage, data-agnostic algorithm is proposed: Stage 1 groups instances by the direction of their individual counterfactuals using cosine similarity, enabling cheaper shared changes; Stage 2 solves for a group counterfactual with a evolutionary algorithm under feature-wise bounds, combining costs and losses into . Experiments on IBM HR Attrition and Law datasets show superior correctness and reduced feature-change costs compared to baselines, with direction-based clustering offering additional gains. The work advances model-agnostic explainability by enabling scalable, actionable multi-instance explanations, though it relies on per-instance counterfactuals and could benefit from gradient-based approximations in the future.

Abstract

Counterfactual explanations constitute among the most popular methods for analyzing black-box systems since they can recommend cost-efficient and actionable changes to the input of a system to obtain the desired system output. While most of the existing counterfactual methods explain a single instance, several real-world problems, such as customer satisfaction, require the identification of a single counterfactual that can satisfy multiple instances (e.g. customers) simultaneously. To address this limitation, in this work, we propose a flexible two-stage algorithm for finding groups of instances and computing cost-efficient multi-instance counterfactual explanations. The paper presents the algorithm and its performance against popular alternatives through a comparative evaluation.
Paper Structure (10 sections, 1 theorem, 1 equation, 2 tables, 1 algorithm)

This paper contains 10 sections, 1 theorem, 1 equation, 2 tables, 1 algorithm.

Key Result

Lemma 1

Assume a linear binary classifier $h:\mathbb{R}^d \to \{0,1\}$ and $\mathop{\mathrm{{\theta}}}\limits(\cdot)=\lVert{\cdot}\rVert_p$. Furthermore, for a given set of instances $\vec{x}_i\in\mathbb{R}^d$ we denote their counterfactual explanation (Definition def:counterfactual) as ${\vec{\delta}_{\tex

Theorems & Definitions (3)

  • Definition 1: Counterfactual Explanation
  • Definition 2: Multi-instance Counterfactual Explanation
  • Lemma 1