Optimal Transport Group Counterfactual Explanations

Enrique Valero-Leal, Bernd Bischl, Pedro Larrañaga, Concha Bielza, Giuseppe Casalicchio
1/28/2026
cs.LG

No official code found. Best implementation: Enrique-Val/ot-group-counterfactual (0 stars, GPL-3.0, last commit 2026-04-05).

Abstract

Group counterfactual explanations find a set of counterfactual instances to explain a group of input instances contrastively. However, existing methods either (i) optimize counterfactuals only for a fixed group and do not generalize to new group members, (ii) strictly rely on strong model assumptions (e.g., linearity) for tractability or/and (iii) poorly control the counterfactual group geometry distortion. We instead learn an explicit optimal transport map that sends any group instance to its counterfactual without re-optimization, minimizing the group's total transport cost. This enables generalization with fewer parameters, making it easier to interpret the common actionable recourse. For linear classifiers, we prove that functions representing group counterfactuals are derived via mathematical optimization, identifying the underlying convex optimization type (QP, QCQP, ...). Experiments show that they accurately generalize, preserve group geometry and incur only negligible additional transport cost compared to baseline methods. If model linearity cannot be exploited, our approach also significantly outperforms the baselines.

View on arXivView PDF

Code Implementations(1)

GPL-3.0

Optimal Transport Group Counterfactual Explanations

00PythonJul 21, 20256 months agoGPL-3.0

Similar Papers

Cite this paper

@article{valeroleal2026optimal,
  title  = {Optimal Transport Group Counterfactual Explanations},
  author = {Enrique Valero-Leal and Bernd Bischl and Pedro Larrañaga and Concha Bielza and Giuseppe Casalicchio},
  year   = {2026},
  eprint = {2601.20692},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2601.20692v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2601.20692.svg)](https://codeofpaper.com/paper/2601.20692)

Discussion