[Paper Review] Counterfactual Samples Synthesizing and Training for Robust Visual Question Answering
This paper proposes a model-agnostic Counterfactual Samples Synthesizing and Training (CSST) framework to improve visual question answering (VQA) models by enhancing their visual-explainable and question-sensitive capabilities. CSST generates counterfactual samples by masking critical visual objects or question words and trains models with both cross-entropy and contrastive losses, achieving state-of-the-art performance on out-of-distribution benchmarks like VQA-CP v2 and GQA-OOD.
Today's VQA models still tend to capture superficial linguistic correlations in the training set and fail to generalize to the test set with different QA distributions. To reduce these language biases, recent VQA works introduce an auxiliary question-only model to regularize the training of targeted VQA model, and achieve dominating performance on diagnostic benchmarks for out-of-distribution testing. However, due to complex model design, these ensemble-based methods are unable to equip themselves with two indispensable characteristics of an ideal VQA model: 1) Visual-explainable: The model should rely on the right visual regions when making decisions. 2) Question-sensitive: The model should be sensitive to the linguistic variations in questions. To this end, we propose a novel model-agnostic Counterfactual Samples Synthesizing and Training (CSST) strategy. After training with CSST, VQA models are forced to focus on all critical objects and words, which significantly improves both visual-explainable and question-sensitive abilities. Specifically, CSST is composed of two parts: Counterfactual Samples Synthesizing (CSS) and Counterfactual Samples Training (CST). CSS generates counterfactual samples by carefully masking critical objects in images or words in questions and assigning pseudo ground-truth answers. CST not only trains the VQA models with both complementary samples to predict respective ground-truth answers, but also urges the VQA models to further distinguish the original samples and superficially similar counterfactual ones. To facilitate the CST training, we propose two variants of supervised contrastive loss for VQA, and design an effective positive and negative sample selection mechanism based on CSS. Extensive experiments have shown the effectiveness of CSST. Particularly, by building on top of model LMH+SAR, we achieve record-breaking performance on all OOD benchmarks.
Motivation & Objective
- To address the persistent issue of language bias in VQA models that rely on superficial linguistic correlations in training data.
- To improve model robustness by enforcing visual-explainable and question-sensitive behaviors, ensuring predictions are grounded in correct visual and linguistic cues.
- To develop a model-agnostic training strategy that does not require architectural changes or ensemble-based designs.
- To enable VQA models to generalize effectively to out-of-distribution test sets with shifted question-answer distributions.
- To design a data augmentation and contrastive learning pipeline that forces models to distinguish between original and counterfactual samples.
Proposed method
- Counterfactual Samples Synthesizing (CSS) generates training samples by masking critical visual objects or key words in questions, assigning pseudo-ground-truth answers based on the modified input.
- Counterfactual Samples Training (CST) uses a dual objective: standard cross-entropy loss for ground-truth prediction and a contrastive loss to distinguish original from counterfactual samples.
- A novel positive-negative sample selection mechanism is designed based on CSS outputs to improve contrastive learning effectiveness.
- Two variants of supervised contrastive loss are proposed specifically for VQA to enhance feature discrimination between original and counterfactual inputs.
- The framework is applied post-training to existing VQA models without architectural changes, making it model-agnostic and broadly applicable.
- Grad-CAM and POS tagging are used to identify critical visual objects and words for masking during counterfactual generation.
Experimental results
Research questions
- RQ1Can counterfactual data augmentation improve the visual-explainable ability of VQA models by forcing attention on correct visual regions?
- RQ2Does training with counterfactual samples enhance the question-sensitive behavior of VQA models, especially under linguistic perturbations?
- RQ3Can a model-agnostic training strategy outperform ensemble-based methods in out-of-distribution VQA benchmarks?
- RQ4How effective is the proposed contrastive loss in distinguishing original from superficially similar counterfactual samples?
- RQ5What types of questions are most and least improved by the CSST framework, and why?
Key findings
- CSST achieves state-of-the-art performance on all evaluated out-of-distribution benchmarks, including VQA-CP v2, VQA-CP v1, and GQA-OOD.
- On VQA-CP v2, the LMH-CSST model achieves a new record accuracy of 76.8%, surpassing previous SOTA models.
- The Confidence Improvement (CI) metric shows that CSST models exhibit significantly higher confidence drops when critical words are removed, indicating stronger question-sensitivity.
- Ablation studies confirm that both CSS and CST components are essential, with CST contributing more to performance gains through contrastive learning.
- Failure analysis reveals that the method struggles most with 'Yes/No' and 'Number' questions, likely due to dataset bias and the ease of heuristic prediction.
- Qualitative analysis confirms that CSST improves Grad-CAM attention maps to align with critical visual objects and words, validating visual-explainability.
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.