CounterFlowNet: From Minimal Changes to Meaningful Counterfactual Explanations
Oleksii Furman, Patryk Marszałek, Jan Masłowski, Marek Śmieja, Maciej Zieba, Piotr Gaiński
NeurIPS page · Open on the map
Category: Causality, Privacy & Learning Theory › Counterfactual and Causal Reasoning for Data · Type: new method · Keywords: counterfactual explanations, generative flow networks, sparse edits, tabular data, constraint enforcement
Areas: Interpretability › Model Explanations › Model explanations
Summary
CounterFlowNet uses conditional Generative Flow Networks to generate sparse, high-quality counterfactual explanations for tabular data while respecting user constraints.
Explained to a 5-year-old
Imagine a computer program that makes decisions, like whether something is a cat or a dog. It can give us a picture of what we could change in the picture to make it think something else. The new method only changes a few things at a time, so the picture stays almost the same. It works with all kinds of data, even tables that have numbers and words mixed together. It also knows about rules we set, for example, some numbers cannot be changed.
Explained to a 5-year-old, longer
A computer program often looks at lots of information to decide what something is. Sometimes we want to know why it made a particular choice. We can ask it to show us a small change that would make it choose differently. The new idea helps the program think of many such changes at once. Each change only tweaks a few details, so the original stays almost unchanged. It can work with many types of data, like tables that have numbers, letters, and categories. The program also knows about rules we set, for example, some numbers cannot be changed. It can keep some features the same, like a fixed date or a constant value. It also respects relationships, like if one number goes up, another should go down. All these changes are chosen so they are close to the original, making them easy to understand. The method is trained to pick the best changes based on how good they look. This helps people trust the computer's decisions because they can see clear, simple reasons.
For a technical reader
The paper presents a generative framework that creates counterfactual explanations by iteratively modifying input features to alter a model’s prediction. It leverages conditional Generative Flow Networks to sample explanations that balance multiple desiderata such as validity, sparsity, proximity, and plausibility. A unified action space handles both continuous and categorical variables, and constraints like immutability or monotonicity are enforced at inference time through action masking. Evaluated on eight datasets with two protocols, the approach consistently outperforms existing methods in trade-offs among the quality metrics while fully respecting user constraints. The design enables practitioners to obtain interpretable, minimal edits for tabular models without retraining the underlying system.
Problem
Existing counterfactual explanation methods often fail to produce explanations that affect only a few features, work with heterogeneous tabular data, and respect user-defined constraints.
Method
The approach formulates counterfactual generation as a sequential modification process using conditional Generative Flow Networks, training to sample explanations that balance validity, sparsity, proximity, and plausibility. It employs a unified action space for continuous and categorical features and uses action masking to enforce constraints at inference time without retraining.
Results
The approach shows superior trade-offs among validity, sparsity, plausibility, and diversity while fully satisfying user constraints.
Contributions
It introduces a sequential generative framework for counterfactual explanations that yields highly sparse edits, supports heterogeneous tabular features, and allows constraint enforcement via action masking.
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction