Research map / Probabilistic and scientific modeling / Molecules and proteins
DiCoFlex: Model-Agnostic Diverse Counterfactuals with Flexible Control
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes DiCoFlex, a model-agnostic conditional normalizing flow (MAF) trained on KNN-selected labeled counterfactual candidates that generates multiple diverse counterfactuals in one forward pass with inference-time control over sparsity (L_p exponent) and actionability (feature masks).
Problem
Existing counterfactual explanation methods need constant access to the predictive model, costly per-instance optimization, and retraining to adapt to new user constraints such as sparsity and actionability.
Approach
Train a conditional normalizing flow p(x'|x,y',p,m) to approximate a distribution over K-nearest-neighbor training counterfactuals in the target class, using an L_p distance with exponent p and a feature mask m as conditioning variables so sparsity and actionability can be changed at inference without retraining.
Key results
- DiCoFlex achieves validity of 1.000 on all five datasets and the highest hypervolume on Lending Club (13.118) and Default (62.427) among multi-counterfactual methods.
- DiCoFlex (p=0.01) obtains the lowest LOF on Adult (1.812) and Bank (0.247), and lowest continuous epsilon-sparsity on Lending Club (0.737) and Adult (0.350).
- Generation takes about 0.12 seconds per batch in a single forward pass, while DiCE, ReViSE and TABCF each exceed 1000 seconds on average; masked actionability reduces mask-feature changes on Adult (e.g., Age 0.069 vs 0.833).
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Set sparsity parameter p=0.01 rather than p=2.0 (ablation) | DiCoFlex · Adult | continuous proximity: 0.581 -> 0.373 | Helped |
| Increase p from 0.01 to 1.0 (ablation) | DiCoFlex · Adult | hypervolume: 0.9023 -> 1.9491 | Helped |
| Increase p from 0.01 to 2.0 (ablation) | DiCoFlex · Adult | epsilon-sparsity: 0.441 -> 0.601 | Hurt |
| Apply actionability masks to selected attributes (ablation) | DiCoFlex · Adult masked features | sparsity of masked features: Capital Gain 0.148 -> 0.023; Capital Loss 0.097 -> 0.037; Age 0.833 -> 0.069; Race 0.170 -> 0.052; Sex 0.200 -> 0.045; N | Helped |
| Use MAF instead of NICE, RealNVP, or KDE (ablation) | DiCoFlex flow architecture · Adult | NLL: 26.6644 / 26.5827 / 30.5120 -> -43.2998 | Helped |
| Generate multiple counterfactuals in one forward pass rather than using optimization-based generation | DiCoFlex · 100 data points | runtime: 0.12±0.05 seconds; DiCE, ReViSE, and TABCF over 1000 seconds | Helped |
| Use DiCoFlex (p=2.0) rather than CCHVAE | Diverse counterfactual generation · Lending Club; Adult; Bank Marketing; Default; GMC | hypervolume: Lending Club: 7.448 -> 13.118; Adult: 1.571 -> 2.036; Bank Marketing: 0.309 -> 3.808; Default: 53.706 -> 62.427; GMC: 9. | Helped |
Surprising findings
- DiCoFlex with the smaller p=0.01 norm gives better plausibility (LOF) than the Euclidean variant, and on the GMC dataset it is worse on LOF than DiCE and CCHVAE.
- DiCoFlex does not win on categorical sparsity; CCHVAE and DiCE change categorical features less often than DiCoFlex (p=0.01).
Limitations
- Optimization-based baselines achieve better categorical sparsity in several cases; DiCoFlex trades off sparsity against diversity and plausibility.
- Counterfactual quality depends on the accuracy of labels in the training data used for KNN selection.
- Designed for tabular mixed-type data; extending to other modalities would need architectural changes; no explicit fairness constraints.
Experimental setup
Datasets: Adult Bank Marketing Default (Credit Default) Give Me Some Credit Lending Club
Benchmarks: Adult Bank Marketing Credit Default Give Me Some Credit Lending Club
Metrics: validity hypervolume LOF sparsity epsilon-sparsity proximity classifier probability runtime
Baselines: CCHVAE DiCE ReViSE Wachter TABCF
Builds on: MAF conditional normalizing flow DiCE CCHVAE
Closest papers by meaning
- Counterfactual reasoning: an analysis of in-context emergence (NeurIPS 2025 · similarity 0.89)
- CounterFlowNet: From Minimal Changes to Meaningful Counterfactual Explanations (NeurIPS 2026 · similarity 0.89)
- LeapFactual: Reliable Visual Counterfactual Explanation Using Conditional Flow Matching (NeurIPS 2025 · similarity 0.88)
- Faithful Model Explanations through Energy-Constrained Conformal Counterfactuals (AAAI 2024 · similarity 0.87)
- Robust Stochastic Graph Generator for Counterfactual Explanations (AAAI 2024 · similarity 0.87)
- Generating Likely Counterfactuals Using Sum-Product Networks (ICLR 2025 · similarity 0.87)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
