ViG-Bias: Visually Grounded Bias Discovery and Mitigation

Badr-Eddine Marani, Mohamed Hanini, Nihitha Malayarukil, Stergios Christodoulidis, Maria Vakalopoulou, Enzo Ferrante

TL;DR

ViG-Bias (Visually Grounded Bias Discovery and Mitigation) is a simple yet powerful framework that uses visual explanations—like heatmaps—to pinpoint exactly where a model is looking when it makes a mistake. By masking images to focus only on these "suspicious" regions before passing them to Vision-Language Models (VLMs), the researchers significantly improved the ability to automatically identify and fix hidden spurious correlations in image classifiers.

What Problem Does This Paper Address?

Machine learning models are notorious for taking "shortcuts." A model might learn to identify a "waterbird" not by the bird's features, but simply because there is water in the background. These spurious correlations lead to biased systems that fail on "bias-conflicting" samples (e.g., a waterbird on land).

The challenge is that we often don't know what these biases are ahead of time. While recent methods use Vision-Language Models (like CLIP) to describe why a model is failing, these tools often look at the entire image. If the model is failing because of a small, localized feature, the VLM might get "distracted" by the rest of the image, leading to vague or incorrect descriptions of the bias.

Methods

The core idea of ViG-Bias is visual grounding. Instead of giving a VLM the original image, the authors propose a mapping function $h(x)$ that masks the image, keeping only the areas where the biased model is focusing its attention.

  1. Generate Visual Explanations: The authors use techniques like Grad-CAM to produce a heatmap showing which pixels most influenced the model's (incorrect) prediction.
  2. Apply a Mask: They threshold this heatmap to create a binary mask and apply it to the original image. This effectively "crops" the image to show only what the biased model was "thinking" about.
  3. Direct the VLM: This masked image is then fed into existing bias-discovery frameworks:
  4. ViG-DOMINO/FACTS: The masked images are converted into CLIP embeddings. Because the background is removed, the resulting clusters are much more likely to represent the actual spurious feature.
  5. ViG-B2T (Bias-to-Text): The masked image is sent to an image captioning model. This forces the model to generate keywords specifically about the suspicious region (e.g., "water" or "face") rather than the main object (e.g., "bird" or "hair").
The B2T framework enhanced with visual grounding. By masking the image before captioning, the system extracts more relevant keywords for debiasing.

Datasets

The authors evaluated their method on three standard benchmarks for spurious correlations:

  • CelebA: A dataset of celebrity faces where "blond hair" is spuriously correlated with "female."
  • Waterbirds: A dataset where "waterbirds" and "landbirds" are placed on "water" or "land" backgrounds.
  • NICO++: A large-scale benchmark designed specifically for domain generalization and identifying spurious attributes across various contexts.
Fig. 1: The four groups in the CelebA (left) and Waterbirds (right) datasets are based on combinations of the spurious attribute and the label. The groups highlighted in green have the most training samples, whereas the groups highlighted in red have the least training samples.

Key Insights and Ideas

  • The "Aha!" Moment: The authors quantitatively proved that when a biased model fails, its visual explanations (heatmaps) overlap significantly more with the spurious features than with the core features. As shown in Figure 2, in the CelebA dataset, the model's attention shifts from the hair (core feature) to the face (spurious feature) when it relies on bias.
  • Focusing the VLM: By removing the "correct" parts of the image, they prevent the VLM from being "polite." Instead of describing a "bird on the water," the VLM is forced to just see "water," which is exactly the keyword needed to identify the bias.
  • Plug-and-Play: ViG-Bias isn't a new standalone model; it's a preprocessing step that can be integrated into almost any existing discovery or mitigation pipeline.
Fig. 2: Visual explanation methods (e.g. GradCAM [18] for the spurious attribute blond) help with identifying spurious correlations. We use the Intersection-over-Union (IoU) metric to measure the percentage of overlap between a binary image representing the spurious feature and the image we get after applying a visual explanation method.

Key Results

The researchers found that adding visual grounding consistently boosted performance across the board:

  • Better Discovery: In the CelebA dataset, ViG-B2T improved the precision of discovered bias slices from 64.0% to 70.0%.
  • Effective Mitigation: When using these discovered keywords to retrain models (using GroupDRO), they saw massive jumps in Worst-Group Accuracy (WGA). On the Waterbirds dataset, WGA increased from 55.0% to 63.1% compared to the standard Bias-to-Text method.
  • Reduced Performance Gap: The method consistently narrowed the gap between average accuracy and the accuracy of the most disadvantaged subgroup, leading to fairer models.

Limitations and Future Work

  • Localized Biases Only: ViG-Bias relies on the assumption that the bias is something that can be "pointed to" in an image (like a background or a specific object). It may struggle with global biases, such as changes in overall lighting, image resolution, or digital noise.
  • Dependence on the Explainer: The quality of the discovery depends on the quality of the visual explanation method (e.g., Grad-CAM). If the explainer fails to capture the model's logic, the mask will be useless.
  • Future Directions: The authors suggest exploring how to integrate ViG-Bias with even more diverse discovery frameworks and investigating its utility in other modalities beyond static images.

Summary updated

Abstract

The proliferation of machine learning models in critical decision making processes has underscored the need for bias discovery and mitigation strategies. Identifying the reasons behind a biased system is not straightforward, since in many occasions they are associated with hidden spurious correlations which are not easy to spot. Standard approaches rely on bias audits performed by analyzing model performance in pre-defined subgroups of data samples, usually characterized by common attributes like gender or ethnicity when it comes to people, or other specific attributes defining semantically coherent groups of images. However, it is not always possible to know a-priori the specific attributes defining the failure modes of visual recognition systems. Recent approaches propose to discover these groups by leveraging large vision language models, which enable the extraction of cross-modal embeddings and the generation of textual descriptions to characterize the subgroups where a certain model is underperforming. In this work, we argue that incorporating visual explanations (e.g. heatmaps generated via GradCAM or other approaches) can boost the performance of such bias discovery and mitigation frameworks. To this end, we introduce Visually Grounded Bias Discovery and Mitigation (ViG-Bias), a simple yet effective technique which can be integrated to a variety of existing frameworks to improve both, discovery and mitigation performance. Our comprehensive evaluation shows that incorporating visual explanations enhances existing techniques like DOMINO, FACTS and Bias-to-Text, across several challenging datasets, including CelebA, Waterbirds, and NICO++.
BibTeX
@inproceedings{marani2024vig,
  author = {Badr-Eddine Marani and Mohamed Hanini and Nihitha Malayarukil and Stergios Christodoulidis and Maria Vakalopoulou and Enzo Ferrante},
  title = {{ViG-Bias: Visually Grounded Bias Discovery and Mitigation}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-73202-7\_24},
}
Figure