Concept-based Visual Counterfactual Explanations with Diffusion Models

Yassine Oueslati, Daniil Kirilenko, Martin Gjoreski, Marc Langheinrich
5/5/2026
cs.AIcs.CV
diffusion-flow

No confident code implementation found for this paper.

Abstract

Visual counterfactual explanations aim to answer "what minimal change to this image would flip the model's prediction?", and are increasingly important as vision models are deployed in safety-critical domains (e.g., medicine). Existing diffusion-based methods can produce realistic edits, but they rely on external classifiers that must work reliably on noisy images, which makes them fragile and hard to deploy for robust explanations.

Show full abstract

We introduce C-VCE, a new diffusion framework that builds the classifier directly into the generative model via a concept bottleneck layer, so that counterfactuals are guided by human-interpretable features (concepts) instead of a separate noise robust classifier that works with pixel-level edits. Our model lets users to toggle on/off semantic concepts during sampling, then minimally adjusts relevant image regions, while preserving the rest of the image, respecting feature correlations. To keep edits small and controlled, we add a simple probabilistic regularizer that balances "change the prediction" against "stay close to the original", plus a gradient-based mask that confines modifications to the most relevant regions. On benchmarks such as CelebA, C-VCE matches or improves flip rates while producing counterfactuals that are visually closer to the input and less distorted than baselines that depend on separate noisy-image classifiers. These properties make C-VCE a practical tool for vision systems where users need concrete "what-if" images without having to trust an additional, noise-robust classifier. More broadly, our results suggest that exposing and controlling an internal concept layer is a promising way to make powerful generative models easier to understand and safer to use.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{oueslati2026conceptbased,
  title  = {Concept-based Visual Counterfactual Explanations with Diffusion Models},
  author = {Yassine Oueslati and Daniil Kirilenko and Martin Gjoreski and Marc Langheinrich},
  year   = {2026},
  eprint = {2607.22544},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.22544v1}
}

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

Discussion