Flexible Counterfactual Explanations with Generative Models

Stig Hellemans, Andres Algaba, Sam Verboven, Vincent Ginis
2/24/2025
cs.LGcs.AIstat.ME

No official code found. Best implementation: stighellemans/fcegan (1 star, MIT, last commit 2025-02-03).

Abstract

Counterfactual explanations provide actionable insights to achieve desired outcomes by suggesting minimal changes to input features. However, existing methods rely on fixed sets of mutable features, which makes counterfactual explanations inflexible for users with heterogeneous real-world constraints. Here, we introduce Flexible Counterfactual Explanations, a framework incorporating counterfactual templates, which allows users to dynamically specify mutable features at inference time. In our implementation, we use Generative Adversarial Networks (FCEGAN), which align explanations with user-defined constraints without requiring model retraining or additional optimization. Furthermore, FCEGAN is designed for black-box scenarios, leveraging historical prediction datasets to generate explanations without direct access to model internals. Experiments across economic and healthcare datasets demonstrate that FCEGAN significantly improves counterfactual explanations' validity compared to traditional benchmark methods. By integrating user-driven flexibility and black-box compatibility, counterfactual templates support personalized explanations tailored to user constraints.

View on arXivView PDF

Code Implementations(1)

MIT

Flexible Counterfactual Explanations (FCEGAN): A framework for generating counterfactual explanations with user-defined mutable features at inference time, leveraging GANs for black-box compatibility and improved validity. πŸš€

10PythonFeb 1, 20251 years agoMIT

Similar Papers

Cite this paper

@article{hellemans2025flexible,
  title  = {Flexible Counterfactual Explanations with Generative Models},
  author = {Stig Hellemans and Andres Algaba and Sam Verboven and Vincent Ginis},
  year   = {2025},
  eprint = {2502.17613},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.17613v1}
}

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/2502.17613.svg)](https://codeofpaper.com/paper/2502.17613)

Discussion