Source-linked AI summary

Multi-Objective Counterfactual Explanations

Susanne Dandl, Christoph Molnar, Martin Binder, Bernd Bischl

arXiv:2004.11165v2stat.MLcs.LG

TL;DR

Counterfactual methods must balance several competing goals, yet many approaches collapse them into a difficult-to-tune weighted sum. MOC instead performs multi-objective optimization to return diverse trade-offs, and experiments report dominance over compared methods alongside broader model and feature-space support.

  • Problem

    Existing counterfactual approaches often collapse multiple difficult-to-balance objectives into a weighted sum, risking an arbitrary single solution.

  • Method

    MOC formulates counterfactual search as multi-objective optimization over outcome proximity, instance proximity, sparsity, and plausibility, while maintaining feature-space diversity.

  • Results

    MOC dominated all DiCE counterfactuals across datasets and generally found more counterfactuals that were closer to training data and required fewer feature changes than other methods.

  • Takeaways & Limitations

    MOC provides diverse counterfactual trade-offs for post-hoc analysis and actionable responses while supporting model-agnostic use with classification, regression, and mixed feature spaces.

  • Takeaways & Limitations

    MOC was evaluated only on binary classification, and selecting counterfactuals for users’ a-priori unknown objective trade-offs remains open.

Abstract

from arXiv · show

Counterfactual explanations are one of the most popular methods to make predictions of black box machine learning models interpretable by providing explanations in the form of `what-if scenarios'. Most current approaches optimize a collapsed, weighted sum of multiple objectives, which are naturally difficult to balance a-priori. We propose the Multi-Objective Counterfactuals (MOC) method, which translates the counterfactual search into a multi-objective optimization problem. Our approach not only returns a diverse set of counterfactuals with different trade-offs between the proposed objectives, but also maintains diversity in feature space. This enables a more detailed post-hoc analysis to facilitate better understanding and also more options for actionable user responses to change the predicted outcome. Our approach is also model-agnostic and works for numerical and categorical input features. We show the usefulness of MOC in concrete cases and compare our approach with state-of-the-art methods for counterfactual explanations.

1 Introduction

Counterfactual explanations make black-box predictions more interpretable by showing how changing feature values could produce a desired outcome. They should remain close to the original data point while offering plausible, actionable alternatives.

  • Counterfactual explanations describe how different feature values could lead a model to produce a desired outcome.
  • Plausible counterfactuals change only a few features and remain close to the actual data point.
  • Counterfactuals can help people understand rejected decisions, assess objections, and identify ways to change future outcomes.
  • They also help modelers investigate pointwise robustness and pointwise bias.

2 Related Work

Prior counterfactual methods differ in model dependence and output scope, while related interpretability methods explain predictions through feature attribution rather than alternative data points.

  • Feature-attribution methods such as LIME and Shapley Values explain predictions by estimating each feature’s contribution.
  • Counterfactual explanations generate data points with desired predictions instead of attributing an existing prediction to features.
  • Model-agnostic counterfactual methods rely on general principles and typically require only access to a fitted model’s prediction function.
  • Model-specific approaches exploit internal model structure, and many are limited to differentiable models or return one counterfactual per run.

3 Contributions

MOC formulates counterfactual search as multi-objective optimization rather than collapsing objectives into a weighted sum. It returns diverse Pareto solutions while supporting mixed feature spaces and multiple prediction settings.

  • Weighted-sum approaches make multiple counterfactual objectives difficult to balance a-priori and can reduce solutions to one candidate.
  • MOC adds sparsity and plausibility objectives to mixed-feature distance, targeting fewer feature changes and closer proximity to observed data.
  • MOC returns a feature-space-diverse Pareto set representing different trade-offs among the proposed objectives.
  • MOC is model-agnostic and handles classification, regression, and mixed feature spaces.

4 Methodology

MOC defines counterfactual generation as a four-objective optimization problem balancing desired predictions, proximity, sparsity, and plausibility. NSGA-II adaptations and search modifications preserve diverse, actionable candidates across mixed feature spaces.

  • 4.1 Multi-Objective Counterfactuals: A counterfactual must approach the desired outcome, remain close to the original instance, change few features, and be plausible under the data distribution.
  • 4.1 Multi-Objective Counterfactuals: MOC minimizes outcome distance, Gower distance to the original instance, the number of changed features, and distance to observed data.
  • 4.1 Multi-Objective Counterfactuals: The Gower distance supports mixed numerical and categorical features, while the L0 norm explicitly counts feature changes.
  • 4.1 Multi-Objective Counterfactuals: The objectives can conflict because improving the desired outcome may require moving farther from the original instance or observed data.
  • 4.2 Optimization: MOC adapts NSGA-II with mixed-integer evolutionary strategies and crowding distances computed in both objective and feature spaces.
  • 4.3 Further Modifications: Initialization increases mutation probability for features whose ICE curves show greater prediction variability.
  • 4.3 Further Modifications: Actionability is supported by bounding numerical values and fixing user-designated non-actionable features to their original values.
  • 4.3 Further Modifications: A conditional mutator samples feature values from distributions learned from observed data to generate more plausible candidates.

5 Credit Data Application

MOC is applied to German credit-risk data to generate counterfactuals that move a rejected prediction into the desired good-risk interval. The visualization shows trade-offs, feature changes, predicted outcomes, and proximity to observed data.

  • The German credit dataset contains 522 complete observations and nine credit- and customer-related features.
  • The RBF support vector machine achieved 0.64 accuracy using nested 5-fold cross-validation and assigned x∗ a 0.41 probability of good credit risk.
  • MOC targeted the desired probability interval [0.5, 1], penalizing candidates predicted below 0.5.
  • MOC found 136 counterfactuals, of which 82 had predictions within the desired interval; duration changed universally and credit amount changed in 86%.
  • The response-surface visualization indicates that decreasing duration, or decreasing both duration and credit amount, reaches the desired outcome while counterfactuals occupy dense data regions.

6 Experimental Setup

The benchmark evaluates MOC against other counterfactual methods across heterogeneous OpenML binary-classification datasets and multiple model types. It measures counterfactual-set diversity and objective quality, while also testing initialization and mutation strategies against random search.

  • Benchmark design: The benchmark uses OpenML datasets with no missing values, at most 3500 observations, and no more than 40 features.
  • Benchmark design: Ten observed data points per dataset serve as x∗ and are excluded from training; models include logistic regression, random forest, xgboost, RBF SVM, and a one-hidden-layer neural network.
  • Evaluation: MOC’s coverage rate is summarized per dataset in Table 2, with nondominated-set sizes in parentheses and significance marked by an asterisk.
  • Comparisons: MOC is compared with DiCE, Recourse, Tweaking, and the What-If Tool baseline, with method applicability depending on model and feature types.
  • Evaluation: Only nondominated counterfactuals are evaluated using set size, objective values, and coverage rate, defined by how often MOC dominates another method’s counterfactuals.
  • Ablation: Initialization and mutation strategies are assessed through dominated hypervolume across generations against random search with population size 20 and 175 generations.

7 Results

MOC generally produced more useful nondominated counterfactuals than competing methods, while its initialization and mutation modifications improved dominated hypervolume performance.

  • MOC counterfactuals dominated all DiCE counterfactuals across datasets, while Tweaking was dominated except on kr-vs-kp and tic-tac-toe.
  • MOC found the most nondominated counterfactuals among the compared methods, meeting the target while changing the fewest features.
  • The benchmark comparison artificially penalized MOC.
  • Tweaking counterfactuals were often closer to x∗ but farther from observed data, changed more features, and frequently missed the desired outcome.
  • MOC modifications produced counterfactuals closer to x∗ and observed data but required more feature changes than unmodified MOC.
  • MOC with both modifications achieved the best dominated-HV performance across generations, and every MOC variant outperformed random search.

8 Conclusion and Outlook

The paper introduces MOC as a multi-objective approach for generating diverse counterfactual trade-offs and reports stronger benchmark performance than competing methods. Its evaluation remains limited to binary classification and selected objectives, while user selection among unknown trade-offs remains open.

  • MOC formalizes counterfactual search as multi-objective optimization and returns diverse counterfactuals with different objective trade-offs.
  • MOC is model-agnostic and supports classification, regression, and mixed feature spaces.
  • In benchmarking, MOC found more counterfactuals that were closer to training data and required fewer feature changes than other methods.
  • The ICE-variance initialization and conditional mutator improved performance in fewer evaluations and produced counterfactuals closer to the target and observed data.
  • MOC was evaluated only on binary classification using dominated hypervolume and individual objectives, leaving user selection among unknown trade-offs unresolved.

9 Electronic Submission

The paper provides code for MOC and for reproducing its experiments and results, with an open-source R library planned.

  • The complete algorithm and experiment-reproduction code are available on GitHub.
  • The implementation is based on the authors’ implementation of a prior method and is intended for an open-source R library using the iml package.

A Illustration of MOC’s Benefits

MOC illustrates how a diverse Pareto set can provide more actionable counterfactual options than methods returning fewer alternatives. Its benchmark setup uses tuned parameters, multiple model types, and datasets reserved from tuning.

  • Diabetes examples: MOC returned a larger set of counterfactuals than Recourse, offering more actionable user responses and closer proximity to observed data.For observation 741, MOC provided alternatives beyond Recourse’s repeated age and plasma changes.
  • Diabetes examples: MOC3 changed five features to become especially close to the nearest training data point.
  • Diabetes examples: Tweaking produced contradictory and implausible changes, whereas MOC suggested alternatives such as only decreasing plasma concentration.MOC1, MOC3, and MOC6 dominated Tweaking’s counterfactual.
  • Experimental setup: MOC was tuned with iterated F-racing across binary-classification instances using logistic regression, random forest, XGBoost, RBF SVM, and neural networks.The tuning configuration evaluated MOC runs on sampled model, data-point, and desired-outcome instances.
  • Experimental setup: The benchmark used tuned MOC configurations and separately tuned model hyperparameters with random search and five-fold cross-validation.Numerical features were scaled and categorical features one-hot encoded.

D Control Parameters of Counterfactual Methods

The comparison includes MOC variants and several baseline counterfactual methods, with method-specific implementation settings. Figures report objective values and nondominated-counterfactual counts, while the optimization comparison ranks dominated hypervolume over generations.

  • Comparison outputs: Figures 4 and 5 compare objective values and nondominated-counterfactual counts across MOC variants and baseline methods.Lower values are better except for the count objective.
  • Comparison outputs: Figure 6 compares dominated-hypervolume ranks across generations and benchmark datasets, with higher ranks indicating better performance.It distinguishes MOC modification variants from random search using population size 20 per generation.
Loading 2004.11165v2…