Research map / Image generation / Fast diffusion sampling
DiG-IN: Diffusion Guidance for Investigating Networks - Uncovering Classifier Differences Neuron Visualisations and Visual Counterfactual Explanations
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.
Introduces DiG-IN, a training-free framework that optimizes the noise, conditioning and null-text of a Stable Diffusion latent diffusion model to generate images for classifier disagreement, visual counterfactual explanations, and neuron visualization.
Problem
Understanding and debugging image classifiers: finding systematic failure modes and spurious features, visualizing neurons, and producing realistic counterfactual explanations, where pixel-space optimization yields adversarial-looking samples and text prompts are too restrictive.
Approach
Treat the full DDIM sampling chain of a latent diffusion model as differentiable and optimize the initial latent, per-timestep conditionings and null-tokens against a classifier-derived loss (classifier disagreement, VCE, or neuron activation), so no prompt engineering or retraining is needed and the image stays on the natural image manifold.
Key results
- UVCEs were preferred over DVCE in 59.5% of user study cases, versus 18.1% for DVCE and 22.5% equal.
- User study realism rating (Q1) was 76.0% for UVCE versus 40.4% for DVCE.
- Classifier-disagreement images reproduce the known shape bias of adversarially robust ViT-S, with robust-model confidence near 0.8 while standard ViT-S confidence is near 0.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Use DiG-IN UVCEs instead of DVCEs | ImageNet visual counterfactual explanations · ImageNet VCE user study | realistic rating: 40.4% -> 76.0% | Helped |
| Use DiG-IN UVCEs instead of DVCEs | ImageNet visual counterfactual explanations · ImageNet VCE user study | meaningful target-class features rating: 63.7% -> 81.3% | Helped |
| Use DiG-IN UVCEs instead of DVCEs | ImageNet visual counterfactual explanations · ImageNet VCE user study | class-object-focused changes rating: 73.8% -> 89.1% | Helped |
| Use DiG-IN UVCEs instead of DVCEs | ImageNet visual counterfactual explanations · ImageNet VCE user study | preferred overall: 18.1 % -> 59.5% | Helped |
Surprising findings
- Zero-shot CLIP misclassifies composed-name images (e.g., waffles as 'waffle iron'), and real LAION-5B images retrieved with the same text queries reproduce these errors.
- Maximizing a neuron labeled spurious in prior work amplifies a semantic background concept (sand for fiddler crab), and the class confidence changes strongly with that neuron's activation.
Limitations
- Relies on a large pretrained Stable Diffusion model whose knowledge bounds what can be generated.
- Gradient checkpointing needed due to VRAM limits, making the optimization computationally heavy.
- Some failure cases and limitations are deferred to an appendix section not included here.
Experimental setup
Datasets: ImageNet LAION-5B Stanford Cars Food-101 CUB-200-2011 FFHQ
Benchmarks: ImageNet Stanford Cars Food-101 CUB-200-2011 FFHQ
Metrics: target class confidence user study ratings (realism, target features, changes class
Baselines: DVCE Feature attack
Builds on: Stable Diffusion DDIM Null-Text inversion Prompt-to-Prompt DVCE
Closest papers by meaning
- Diffusion Visual Counterfactual Explanations (NeurIPS 2022 · similarity 0.91)
- Rethinking Visual Counterfactual Explanations Through Region Constraint (ICLR 2025 · similarity 0.87)
- Counterfactual Explanations for Misclassified Images: How Human and Machine Explanations Differ (Abstract Reprint) (AAAI 2024 · similarity 0.87)
- V-CECE: Visual Counterfactual Explanations via Conceptual Edits (NeurIPS 2025 · similarity 0.86)
- Towards Fine-Grained Interpretability: Counterfactual Explanations for Misclassification with Saliency Partition (CVPR 2025 · similarity 0.85)
- Explaining in Diffusion: Explaining a Classifier with Diffusion Semantics (CVPR 2025 · similarity 0.85)
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.
