Skip to main content
QUICK REVIEW

[Paper Review] Learning Two-Branch Neural Networks for Image-Text Matching Tasks

Liwei Wang, Yin Li|arXiv (Cornell University)|Apr 11, 2017
Multimodal Machine Learning ApplicationsComputer Science50 references19 citations
TL;DR

This paper proposes two two-branch neural network architectures—embedding and similarity networks—for image-text matching tasks. The embedding network learns a shared latent space with maximum-margin ranking and improved neighborhood sampling, while the similarity network directly regresses on similarity scores via element-wise product fusion. Both models achieve state-of-the-art performance on phrase localization (Flickr30K Entities) and bi-directional image-sentence retrieval (Flickr30K, MSCOCO).

ABSTRACT

Image-language matching tasks have recently attracted a lot of attention in the computer vision field. These tasks include image-sentence matching, i.e., given an image query, retrieving relevant sentences and vice versa, and region-phrase matching or visual grounding, i.e., matching a phrase to relevant regions. This paper investigates two-branch neural networks for learning the similarity between these two data modalities. We propose two network structures that produce different output representations. The first one, referred to as an embedding network, learns an explicit shared latent embedding space with a maximum-margin ranking loss and novel neighborhood constraints. Compared to standard triplet sampling, we perform improved neighborhood sampling that takes neighborhood information into consideration while constructing mini-batches. The second network structure, referred to as a similarity network, fuses the two branches via element-wise product and is trained with regression loss to directly predict a similarity score. Extensive experiments show that our networks achieve high accuracies for phrase localization on the Flickr30K Entities dataset and for bi-directional image-sentence retrieval on Flickr30K and MSCOCO datasets.

Motivation & Objective

  • To address the challenge of measuring semantic similarity between image and text modalities in cross-modal retrieval tasks.
  • To design a neural architecture that symmetrically maps image and text features into a shared space for joint learning.
  • To improve training efficiency and performance through novel neighborhood-aware triplet sampling in the embedding network.
  • To explore direct similarity prediction via element-wise fusion as an alternative to shared embedding learning.
  • To evaluate the feasibility of combining global image-sentence and local region-phrase matching for improved visual grounding.

Proposed method

  • The embedding network uses two separate branches for image and text features, each with fully connected ReLU layers followed by L2 normalization, to map inputs into a shared latent space.
  • Triplet ranking loss with maximum-margin objective is applied, where positive pairs (matching image-region and phrase) are pulled closer and negative pairs are pushed apart.
  • Improved mini-batch sampling strategy incorporates neighborhood information to enhance training stability and performance over standard triplet sampling.
  • The similarity network uses element-wise product of normalized image and text features, followed by additional fully connected layers, to directly predict a similarity score.
  • This network is trained with logistic regression loss using binary labels (+1 for positive pairs, -1 for negative pairs).
  • The models are evaluated on Flickr30K Entities (phrase localization), Flickr30K, and MSCOCO (image-sentence retrieval) using standard metrics like mAP and R@1.

Experimental results

Research questions

  • RQ1Can a two-branch neural network with shared latent space learning outperform existing methods in image-text matching tasks?
  • RQ2How does neighborhood-aware triplet sampling improve performance compared to standard sampling in the embedding network?
  • RQ3Can a direct similarity prediction network via element-wise fusion achieve competitive performance without explicit embedding space learning?
  • RQ4Why does the similarity network fail on image-sentence retrieval despite success on phrase localization?
  • RQ5Can combining global image-sentence and local region-phrase models yield significant improvements in visual grounding?

Key findings

  • The embedding network achieves state-of-the-art performance on phrase localization with a 76.4% mAP on the Flickr30K Entities dataset.
  • The similarity network achieves strong results on phrase localization (74.1% mAP) but fails on image-sentence retrieval, indicating task-specific limitations.
  • Improved neighborhood sampling in mini-batches leads to significant performance gains in the embedding network, even without changing the loss function.
  • The combined model using a weighted average of image-sentence and region-phrase scores shows only marginal improvement (e.g., 0.5% mAP gain), suggesting poor consistency across modalities.
  • The region-phrase model's scores are inconsistent when ranking across different images or multiple phrases in the same image, limiting its use as a general phrase detector.
  • Joint training of image-sentence and region-phrase networks did not yield good results, indicating challenges in end-to-end optimization of multi-granularity matching.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.