[Paper Review] Question-Conditioned Counterfactual Image Generation for VQA
This paper proposes a question-conditioned counterfactual image generation framework for Visual Question Answering (VQA) that produces minimally edited, realistic images where the VQA model predicts a different answer. Using a LingUNet architecture conditioned on image, question, and ground-truth answer, the method employs adversarial, L2, and cross-entropy losses to generate semantically relevant edits—particularly effective for color-related questions, reducing VQA accuracy from 64.33% to 57.64% and dropping to 34.02% on 'what color' questions.
While Visual Question Answering (VQA) models continue to push the state-of-the-art forward, they largely remain black-boxes - failing to provide insight into how or why an answer is generated. In this ongoing work, we propose addressing this shortcoming by learning to generate counterfactual images for a VQA model - i.e. given a question-image pair, we wish to generate a new image such that i) the VQA model outputs a different answer, ii) the new image is minimally different from the original, and iii) the new image is realistic. Our hope is that providing such counterfactual examples allows users to investigate and understand the VQA model's internal mechanisms.
Motivation & Objective
- Address the black-box nature of VQA models by generating counterfactual images that explain model decisions.
- Provide discriminative, human-interpretable explanations by showing how small image changes lead to different answers.
- Ensure generated counterfactual images are minimally different from the original and visually realistic.
- Condition image edits precisely on the question to ensure relevance and semantic consistency.
- Enable users to investigate which visual features most influence the VQA model’s predictions through controlled perturbations.
Proposed method
- Use a LingUNet architecture to generate counterfactual images conditioned on input image, question, and ground-truth answer.
- Condition the generator using the VQA model’s language encoding and final answer logits, concatenated and projected via a fully connected layer.
- Train with three losses: negated cross-entropy to change the VQA model’s prediction away from the original answer, L2 loss to minimize pixel-level differences, and a GAN discriminator to enforce realism.
- Apply gradient clipping and soft labels during training to stabilize GAN training and avoid adversarial artifacts.
- Warm-start the generator using only L2 loss before introducing language conditioning and full loss optimization.
- Fine-tune the discriminator to prevent artifacts such as 'deep dream' effects and ensure perceptual quality.
Experimental results
Research questions
- RQ1Can we generate counterfactual images that cause a VQA model to output a different answer while preserving visual realism?
- RQ2How effectively can the model generate edits that are semantically relevant to the input question and original answer?
- RQ3To what extent do the generated edits align with human perception of semantic change?
- RQ4How does the model’s performance vary across different question types, especially 'what color' versus other semantic categories?
- RQ5Can the model localize edits to relevant image regions, or does it over-edit irrelevant objects?
Key findings
- VQA model accuracy on the validation set dropped from 64.33% to 57.64% when evaluated on generated counterfactual images, indicating effective semantic change.
- For 'what color' questions, accuracy dropped significantly from 72.64% to 34.02%, demonstrating strong performance in generating relevant color-based counterfactuals.
- The model successfully changes answer predictions for color-related questions, with both VQA systems and human annotators perceiving the new color as different.
- For non-color questions, the model often fails to change the VQA prediction meaningfully or makes edits imperceptible to humans, leading to disagreement in annotations.
- Over-editing of irrelevant image regions (e.g., changing shirt color in Fig. 2c) was observed, indicating a lack of spatial localization in edits.
- Checkerboard artifacts were present in some outputs, though overall realism was maintained after extensive discriminator fine-tuning to avoid adversarial artifacts.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.