Improving Weakly Supervised Visual Grounding by Contrastive Knowledge Distillation

Liwei Wang, Jing Huang, Yin Li, Kun Xu, Zhengyuan Yang, Dong Yu

Abstract

Visual grounding—the task of linking textual phrases to specific regions in an image—traditionally requires expensive bounding-box annotations or computationally intensive object detectors during inference. This paper introduces a contrastive knowledge distillation framework that leverages a generic object detector as a "teacher" during training to provide soft pseudo-labels. By distilling this knowledge into a student model, the framework enables accurate phrase grounding without requiring a detector at test time. The resulting model achieves state-of-the-art performance on weakly supervised benchmarks while significantly reducing inference latency and computational overhead.

Introduction

Visual grounding is a cornerstone of multi-modal AI, enabling systems to understand spatial context in natural language queries. However, the gold standard of fully supervised learning is bottlenecked by the high cost of manual bounding-box labeling. Weakly supervised grounding attempts to learn these links using only image-sentence pairs but faces a "concurrency" problem: distinguishing a target object from its surrounding context when they always appear together in training data.

Overview of the training and inference phases. During training, soft labels from a detector guide the grounding model. At inference, the model predicts boxes directly without the detector.

While recent methods have integrated pre-trained detectors to resolve this ambiguity, they often mandate running these heavy models during every prediction, making them too slow for real-world deployment. This paper addresses this efficiency gap by moving the heavy lifting to the training phase.

Methodology

The proposed framework employs a two-pronged approach centered on Contrastive Knowledge Distillation:

1. The Teacher-Student Scaffold

During training, a generic object detector (such as Faster R-CNN) acts as a teacher. Rather than using rigid "hard" labels, the model utilizes "soft labels" generated by matching detector predictions to sentence phrases. To bridge semantic gaps—such as mapping the detector class "person" to the phrase "boy"—the authors utilize WordNet as a lexical bridge, ensuring more accurate knowledge transfer.

2. Two-Level Contrastive Learning

The model is optimized through two complementary objectives:

  • Region-Phrase Level ($L_{RP}$): This loss distills knowledge from the detector's soft labels, teaching the model to match specific image regions to corresponding phrases.
  • Image-Sentence Level ($L_{IS}$): Using Noise-Contrastive Estimation (NCE), the model ensures global alignment between the image and the sentence, helping it distinguish matching pairs from random noise.
Detailed architecture of the contrastive knowledge distillation framework, showing the interaction between the visual backbone, phrase model, and the two levels of contrastive loss.

3. Detector-Free Inference

By learning a direct scoring function between image regions and phrases during training, the object detector can be discarded at test time. The model calculates the best match directly from image features and text embeddings, allowing for a streamlined and significantly faster inference process.

Key Results and Insights

The model was evaluated on the Flickr30K Entities and ReferItGame benchmarks, using various backbones (VGG16, ResNet101) to demonstrate flexibility.

  • State-of-the-Art Performance: The method achieved 53.10% accuracy on Flickr30K Entities and 38.39% on ReferItGame, surpassing previous weakly supervised methods that required detectors at test time.
  • Efficiency Gains: By offloading detection to the training phase, the authors reduced computational costs (FLOPs) during inference by 50% to 70%.
  • Complementary Strengths: The authors observed that distillation is particularly effective at identifying the physical extent of an object, while NCE is better at distinguishing specific attributes like color or texture.

Conclusion

This framework demonstrates that knowledge distillation from generic detectors can effectively bridge the gap between weak and full supervision. While the model currently depends on the detector's pre-defined vocabulary, future work will explore scaling to open-set detectors and extending the logic to video grounding and complex multi-modal reasoning tasks.

Summary updated

BibTeX
@inproceedings{wang2021improving,
  author = {Liwei Wang and Jing Huang and Yin Li and Kun Xu and Zhengyuan Yang and Dong Yu},
  title = {{Improving Weakly Supervised Visual Grounding by Contrastive Knowledge Distillation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.01387},
}
Figure