Improving Visual Grounding by Encouraging Consistent Gradient-based Explanations

Ziyan Yang, Kushal Kafle, Franck Dernoncourt, Vicente Ordóñez Román

TL;DR

This paper introduces Attention Mask Consistency (AMC), a novel training objective for vision-language models that encourages their internal "explanations" (gradient-based heatmaps) to align with human-provided region annotations. By directly optimizing these explanations, AMC significantly improves visual grounding performance, achieving state-of-the-art results on key benchmarks.

What Problem Does This Paper Address?

Vision-language models (VLMs) have become adept at tasks like image captioning and visual question answering. A related task, visual grounding, involves localizing specific objects or regions in an image based on a textual description. While VLMs can perform visual grounding, they often rely on external object detectors or indirect methods. The challenge is that while large amounts of image-text data are available for pretraining, high-quality data with precise region-level annotations for grounding is scarce. This paper aims to bridge this gap by leveraging existing gradient-based explanation mechanisms within VLMs and guiding them with limited region annotations to improve their grounding capabilities.

Methods

The core contribution is the Attention Mask Consistency (AMC) loss function. This loss operates on gradient-based explanation maps (specifically using GradCAM) generated by a VLM. The intuition is that these heatmaps highlight image regions that are most important for the model's decision-making (e.g., matching an image to a text description). AMC encourages these heatmaps to be consistent with human-provided region annotations (e.g., bounding boxes or masks).

Specifically, AMC aims to:

  • Maximize the energy of the heatmap within the annotated region.
  • Minimize the energy of the heatmap outside the annotated region.

This is achieved through a soft-margin loss that incorporates two components: $L_{mean}$ (ensuring the average heatmap value inside the region is higher than outside) and $L_{max}$ (ensuring the maximum heatmap value inside is higher than the maximum outside). The authors integrate AMC as an additional objective during the pretraining or fine-tuning of existing VLMs, such as ALBEF.

Datasets

The paper utilizes several datasets:

  • ALBEF-14M: Used for initial pretraining of the ALBEF model.
  • Visual Genome (VG): A crucial dataset providing region-level annotations (boxes, region descriptions, object attributes). This dataset is used for fine-tuning and for generating triplets of (Image, Text, Region Annotation).
  • Flickr30k Entities: A benchmark dataset for visual grounding and referring expression comprehension.
  • RefCOCO+: Another benchmark dataset for referring expression comprehension.
  • ReferIt: Used for evaluating referring expression resolution.

The authors also discuss creating "clean" versions of RefCOCO+ and ReferIt by removing images that overlap with the Visual Genome dataset to ensure fair comparison and assess generalization.

Key Insights and Ideas

  • Gradient-based explanations are a valuable, underutilized resource: Instead of treating gradient maps solely as post-hoc explanations, the authors demonstrate their utility as a direct training signal for improving model performance.
  • Limited region annotations can go a long way: AMC shows that even with a relatively small amount of region-level data, significant improvements in visual grounding can be achieved, outperforming methods that rely on more complex object detectors trained on extensive box data.
  • Soft margins are crucial for flexibility: The use of soft margins in the AMC loss allows for more robust grounding, acknowledging that human annotations might not be perfectly precise and that a phrase might refer to multiple regions.
  • AMC is model-agnostic and annotation-agnostic: The proposed loss can be applied to various vision-language models and can handle different types of region annotations (not just bounding boxes).

Key Results

  • State-of-the-art performance: The AMC-trained model achieved a state-of-the-art accuracy of 86.49% on the Flickr30k visual grounding benchmark, an improvement of 5.38% over the previous best model.
  • Strong performance on referring expression comprehension: The model achieved 80.34% accuracy on the easy split of RefCOCO+ and 64.55% on the difficult split.
  • Outperforms detector-based methods: AMC consistently outperformed methods that rely on object detectors trained on Visual Genome, even when those methods used more extensive box supervision.
  • Qualitative improvements: The generated heatmaps from AMC-trained models are visually more aligned with human annotations and provide more precise localization compared to baseline methods.

Limitations and Future Work

  • Dependence on gradient quality: The effectiveness of AMC relies on the quality and interpretability of the gradient-based explanations. If the gradients do not accurately reflect the model's decision-making process, AMC might not be as effective.
  • Computational cost: While AMC is described as easy to implement, it adds an additional loss term during training, which could increase computational requirements.
  • Future work: The authors suggest that AMC can be adopted by even larger vision-language models and can be extended to other tasks that benefit from interpretable explanations. They also highlight the potential for using AMC with more complex region annotations.

Summary updated

BibTeX
@inproceedings{yang2022improving,
  author = {Ziyan Yang and Kushal Kafle and Franck Dernoncourt and Vicente Ordóñez Román},
  title = {{Improving Visual Grounding by Encouraging Consistent Gradient-based Explanations}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
  url = {https://openreview.net/forum?id=Fts1Q1ViYEi},
}
Figure