Research map / Probabilistic and scientific modeling / Molecules and proteins
LeapFactual: Reliable Visual Counterfactual Explanation Using Conditional Flow Matching
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 LeapFactual, a model-agnostic visual counterfactual explanation method that uses a conditional flow matching model in a VAE/GAN latent space to lift and land samples between class-agnostic and class-conditional representations, with an injection step for reliable counterfactuals near the true decision boundary.
Problem
Visual counterfactual explanations suffer from gradient vanishing, discontinuous latent spaces, and reliance on the learned classifier boundary matching the true boundary, yielding uninformative or out-of-distribution counterfactuals.
Approach
Introduces a CE-CFM objective that conditions an independent-coupling flow matching model on the classifier's predicted label, bridging flattened and structured latent spaces via lifting (removing class info) and landing (re-injecting a target class) transports, plus blending and injection steps so counterfactuals work even for non-differentiable classifiers.
Key results
- On Morpho-MNIST, LeapFactual_R reaches ACC 0.9906 and AUC 0.9999 versus 0.9422 ACC for the CGM-based method and 0.8277 for the Opt-based method.
- On Galaxy10 DECaLS, adding reliable CEs to the weak classifier's training data raises ACC from 0.8107 (20% baseline) to 0.8237 at 100% reliable CE fraction, while standard CEs reduce accuracy to about 0.797.
- On FFHQ with a CLIP proxy classifier, N_b=20 blending steps reach correctness ACC 0.993 with SSIM 0.525 and LPIPS 0.180.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Use LeapFactual instead of Opt-based counterfactual generation | Morpho-MNIST counterfactual generation · Morpho-MNIST | ACC: 0.8277±0.0071 -> 0.9868±0.0026 | Helped |
| Add information injection to LeapFactual (ablation) | LeapFactual · Morpho-MNIST | ACC: 0.9868±0.0026 -> 0.9906±0.0016 | Helped |
| Add information injection to LeapFactual (ablation) | LeapFactual · Morpho-MNIST | D(Area): 0.1665±0.0035 -> 0.2295±0.0056 | Hurt |
| Add standard counterfactual data to the training subset | Galaxy10 DECaLS weak classifier · Galaxy10 DECaLS test | ACC: 0.8107 ± 0.0041 -> 0.7975 ± 0.0016 (10%); 0.7968 ± 0.0017 (50%); 0.7967 ± 0.0022 (100%) | Hurt |
| Add reliable counterfactual data to the training subset | Galaxy10 DECaLS weak classifier · Galaxy10 DECaLS test | ACC: 0.8107 ± 0.0041 -> 0.8163 ± 0.0020 (10%); 0.8197 ± 0.0016 (50%); 0.8237 ± 0.0021 (100%) | Helped |
| Increase blending steps from N_b=5 to N_b=20 (ablation) | LeapFactual with StyleGAN3 · FFHQ, 1,024 samples | ACC: 0.706 -> 0.993 | Helped |
| Increase blending steps from N_b=100 to N_b=250 with gamma_b=0.1 (ablation) | LeapFactual · Galaxy10 DECaLS | ACC: 0.9718 -> 0.9832 | Helped |
| Increase injection steps from N_i=0 to N_i=25 (ablation) | Reliable LeapFactual · Galaxy10 DECaLS | ACC_r: 0.4738 ± 0.0034 -> 0.8171 ± 0.0028 | Helped |
| Increase injection steps from N_i=0 to N_i=35 (ablation) | Reliable LeapFactual · Galaxy10 DECaLS | SSIM: 0.8577 ± 0.0007 -> 0.7122 ± 0.0010 | Hurt |
| Replace LeakyReLU with ReLU in the VAE (ablation) | Opt-based counterfactual generation · Morpho-MNIST | counterfactual output | No clear effect |
Surprising findings
- Standard counterfactuals added to training data degrade model performance as their fraction grows, whereas reliable counterfactuals improve it.
Limitations
- Flow matching cost grows with high latent dimensionality, as in diffusion or normalizing-flow latents, reducing training efficiency.
- Uses independent-coupling I-CFM rather than OT-CFM; switching to OT-CFM is non-trivial given classifier-conditioned transport.
- Latent space entanglement and imbalanced datasets are left for future work.
Experimental setup
Datasets: Morpho-MNIST Galaxy10 DECaLS FFHQ
Benchmarks: Morpho-MNIST Galaxy10 DECaLS FFHQ smiling face classification
Metrics: ACC AUC absolute relative error of morphometrics SSIM PSNR LPIPS
Baselines: REVISE-style Opt-based counterfactual CGM-based conditional VAE counterfactual
Builds on: independent conditional flow matching (I-CFM) REVISE DCEVAE StyleGAN3
Closest papers by meaning
- CounterFlowNet: From Minimal Changes to Meaningful Counterfactual Explanations (NeurIPS 2026 · similarity 0.91)
- Counterfactual Explanations for Misclassified Images: How Human and Machine Explanations Differ (Abstract Reprint) (AAAI 2024 · similarity 0.89)
- Towards Unifying Evaluation of Counterfactual Explanations: Leveraging Large Language Models for Human-Centric Assessments (AAAI 2025 · similarity 0.89)
- DiCoFlex: Model-Agnostic Diverse Counterfactuals with Flexible Control (NeurIPS 2025 · similarity 0.88)
- Robust Stochastic Graph Generator for Counterfactual Explanations (AAAI 2024 · similarity 0.88)
- Rethinking Visual Counterfactual Explanations Through Region Constraint (ICLR 2025 · similarity 0.88)
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.
