Semi Supervised Phrase Localization in a Bidirectional Caption-Image Retrieval Framework

Deepan Das, Noor Mohammed Ghouse, Shashank Verma, Yin Li · DOI

Abstract

We introduce a novel deep neural network architecture that links visual regions to corresponding textual segments including phrases and words. To accomplish this task, our architecture makes use of the rich semantic information available in a joint embedding space of multi-modal data. From this joint embedding space, we extract the associative localization maps that develop naturally, without explicitly providing supervision during training for the localization task. The joint space is learned using a bidirectional ranking objective that is optimized using a $N$-Pair loss formulation. This training mechanism demonstrates the idea that localization information is learned inherently while optimizing a Bidirectional Retrieval objective. The model's retrieval and localization performance is evaluated on MSCOCO and Flickr30K Entities datasets. This architecture outperforms the state of the art results in the semi-supervised phrase localization setting.

Introduction

Phrase localization is the task of identifying the specific region of an image that corresponds to a particular phrase or word in a caption. Traditionally, this requires "supervised learning," where humans painstakingly draw thousands of bounding boxes to tell the computer exactly where things are. This is expensive, slow, and doesn't scale well to the infinite variety of ways we describe the world.

The authors tackle the challenge of semi-supervised phrase localization. The goal is to build a model that can localize entities using only image-caption pairs (which are easy to find on the web) rather than explicit spatial annotations. The core difficulty is creating a "joint embedding space" where visual features and linguistic features align so precisely that the model "knows" where an object is just by trying to determine if a caption matches an image.

Methods

The proposed architecture consists of two main branches: an Image Branch using a pretrained VGG-19 network to extract spatial feature maps, and a Text Branch using GloVe word embeddings processed through an LSTM to capture the context of phrases.

The Joint Embedding Space

The key innovation lies in how these branches interact. The model calculates the dot product between every word/phrase vector and every spatial location in the image feature map. This creates an associative localization map. To train this without bounding boxes, the researchers use a proxy task: Bidirectional Retrieval. The model is trained to give a high similarity score to correct image-caption pairs and a low score to "impostors."

Optimization via $N$-Pair Loss

While many retrieval models use "Triplet Loss" (comparing one positive to one negative), this paper argues for $N$-Pair Loss. Instead of pushing away just one wrong caption at a time, $N$-Pair loss pushes away all incorrect captions in a batch simultaneously. This creates a much steeper gradient and forces the model to be far more discriminative, which directly translates to sharper, more accurate localization maps.

Figure 1: Qualitative results showing the model's ability to localize specific phrases like "a man" and "a heavy cart full of bricks" within a single scene.

Aggregation Strategy

To derive a single similarity score for an image-caption pair, the model employs a MaxImage operation. It finds the maximum activation for each word (the "best match" in the image) and then averages those maximums. This encourages the model to find at least one strong visual anchor for every word in the sentence.

Key Results and Insights

The model was evaluated on the Flickr30K Entities and MSCOCO datasets. Flickr30K is particularly valuable as it provides ground-truth links between phrases and regions for evaluation, though these were not used during training.

  • Localization as an Emergent Property: The research demonstrates that you don't need to tell a model where something is if you challenge it enough to tell you what it is looking at. Localization "develops naturally" when the retrieval objective is sufficiently difficult.
  • Impact of Loss Functions: The jump from Triplet Loss (14.93% accuracy) to $N$-Pair Loss (51.06% accuracy) on the Flickr30K pointing game is staggering. This suggests that the structure of negative samples is more critical than the architecture itself for semi-supervised tasks.
  • State-of-the-Art Performance: The model achieved 51.06% accuracy, outperforming previous semi-supervised methods. It successfully generates segmentation masks for complex, multi-word entities, distinguishing between different subjects and actions in the same scene.
Figure 2: Localization maps for a complex sentence involving multiple people and an escalator, demonstrating the model's handling of spatial relationships.

Discussion and Future Work

While the model is a "localization beast," its raw retrieval scores (Recall@K) were slightly lower than models specifically optimized for retrieval only. This suggests the MaxImage aggregator prioritizes spatial precision over global matching. Additionally, like many models trained on photography datasets, it exhibits a slight "center bias."

Future work may involve exploring more complex metrics to learn the latent semantic relationships between different visual components more deeply, potentially moving beyond simple dot products to capture more nuanced interactions between objects in a scene.

Summary updated

BibTeX
@misc{das2019semi,
  author = {Deepan Das and Noor Mohammed Ghouse and Shashank Verma and Yin Li},
  title = {{Semi Supervised Phrase Localization in a Bidirectional Caption-Image Retrieval Framework}},
  year = {2019},
  eprint = {1908.02950},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1908.02950},
}
Figure