Top-Down Visual Saliency Guided by Captions

Vasili Ramanishka, Abir Das, Jianming Zhang, Kate Saenko

Introduction

Modern neural captioning models, typically consisting of a CNN encoder and an LSTM decoder, have achieved impressive results in describing visual scenes. However, these models often function as "black boxes," making it difficult to discern whether a generated word like "dog" is based on actual visual evidence or linguistic patterns. This research, presented at CVPR 2017, introduces Caption-Guided Visual Saliency, a novel approach to interpret these models by identifying the specific image regions or video frames that drive word predictions.

Figure 4: Overview of caption-guided saliency for images and videos. The heatmaps demonstrate how the model attends to specific visual features for each word in the generated sentence, such as 'jacket' or 'slot machine'.

Methodology

The core innovation lies in extracting saliency from pre-trained models without altering their architecture or requiring explicit attention layers. The method is rooted in the principle of Information Gain.

The Information Gain Probe

To determine the saliency of a specific word at a given time step, the authors measure the "loss of information" when the input is restricted. They compare the model's output probability for a target word when it sees the entire input versus when it sees only a localized patch or frame. Using KL-divergence, the method identifies regions where the probability of the target word remains high; these regions are deemed highly salient.

Spatial and Temporal Saliency

The approach naturally extends to different modalities:

  • Images: The grid of CNN features is treated as a sequence, allowing the LSTM to scan and assign importance to specific spatial patches.
  • Videos: The method identifies both temporal saliency (which frames are most relevant) and spatial saliency (where within those frames the action occurs).
Figure 2: Detailed view of temporal and spatial saliency for a video sequence. The method identifies the specific frames and regions corresponding to the words 'woman', 'cutting', 'piece', and 'meat'.

Evaluation and Results

The researchers evaluated their method on benchmarks including Flickr30kEntities, MSVD, and MSR-VTT.

  • Spatial Accuracy: In the "pointing game" on Flickr30kEntities, the method achieved a mean accuracy of 0.501, outperforming the center-bias baseline (0.492).
  • Interpretability vs. Performance: The method significantly outperformed standard "soft attention" models in matching human-annotated bounding boxes (0.473 vs 0.387) while maintaining state-of-the-art captioning performance, such as a METEOR score of 31.0 on the MSVD dataset.

Discussion and Insights

The saliency maps provide a powerful tool for debugging. For instance, the authors observed that for the word "skating," models often focus on the snow rather than the skater, indicating a reliance on contextual cues. This suggests that while models are accurate, they may not always be "right" for the reasons we expect.

While the method is computationally more intensive than single-pass attention layers—requiring multiple forward passes to probe different regions—it offers a flexible, architecture-agnostic way to achieve interpretability in complex natural language tasks. Future work may involve using these insights to retrain models to focus on more relevant features or applying the approach to modern Transformer-based architectures.

Summary updated

BibTeX
@inproceedings{ramanishka2017top,
  author = {Vasili Ramanishka and Abir Das and Jianming Zhang and Kate Saenko},
  title = {{Top-Down Visual Saliency Guided by Captions}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2017},
  doi = {10.1109/cvpr.2017.334},
}
Figure