Optimal Transport Group Counterfactual Explanations
Enrique Valero-Leal, Bernd Bischl, Pedro Larrañaga, Concha Bielza, Giuseppe Casalicchio
TL;DR
This paper reframes group counterfactual explanations as optimal transport (OT) maps to achieve consistent, generalizable recourse for groups of instances. By modeling counterfactuals as a function \hat{g} or a Kantorovich plan, the approach reduces parameter count, controls group geometry via bi-Lipschitz constraints, and enables density-preserving transformations with convex optimization in many setups. The authors develop several parameterizations (affine, PSD affine, diagonal, Gaussian, Gaussian mixtures) and derive closed-form/SDP formulations where applicable, showing favorable transport costs, distortion behavior, and validity on numerous datasets. Empirical results demonstrate robust performance, with dense and sparse OT maps delivering strong generalization, interpretability through surrogate models, and advantages in multiobjective optimization over pointwise baselines. The work advances scalable, interpretable, and fair group recourse by leveraging OT theory for counterfactual explanations.
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.
