Skip to main content
QUICK REVIEW

[Paper Review] T-VSE: Transformer-Based Visual Semantic Embedding

Muhammet Baştan, Arnau Ramisa|arXiv (Cornell University)|May 17, 2020
Topic ModelingComputer Science13 references4 citations
TL;DR

This paper proposes T-VSE, a transformer-based visual semantic embedding model that significantly outperforms traditional RNN and word-averaging methods on cross-modal image-text retrieval. Trained on a large-scale e-commerce dataset of 12.1 million product image-title pairs, T-VSE achieves state-of-the-art performance, with 38.1% R@1 and 96.3% R@100 for text-to-image retrieval, demonstrating that transformers can excel in vision-language tasks when trained on sufficiently large datasets with proper strategy.

ABSTRACT

Transformer models have recently achieved impressive performance on NLP tasks, owing to new algorithms for self-supervised pre-training on very large text corpora. In contrast, recent literature suggests that simple average word models outperform more complicated language models, e.g., RNNs and Transformers, on cross-modal image/text search tasks on standard benchmarks, like MS COCO. In this paper, we show that dataset scale and training strategy are critical and demonstrate that transformer-based cross-modal embeddings outperform word average and RNN-based embeddings by a large margin, when trained on a large dataset of e-commerce product image-title pairs.

Motivation & Objective

  • To investigate whether transformer-based models can outperform RNNs and word averaging in visual semantic embedding for cross-modal retrieval.
  • To evaluate the impact of dataset scale and training strategy on transformer performance in vision-language tasks.
  • To demonstrate that large-scale pre-training enables transformers to achieve superior performance in cross-modal retrieval, contrary to prior claims of poor performance.
  • To establish a strong baseline for vision-language representation learning using e-commerce data.

Proposed method

  • The model uses a two-stream neural network: a pre-trained DenseNet 169 for image encoding and a transformer-based text encoder (e.g., DistilBERT) for text encoding, both projecting to a 256-dimensional embedding space.
  • The model is trained using a symmetric triplet loss (max of hinges) with hard negative mining, where the margin is set to 0.2 to maximize similarity between positive pairs and minimize similarity between negative pairs.
  • Two-stage training is employed: first, the image encoder’s convolutional layers are frozen while the text encoder and embedding layers are trained from scratch for 2 epochs; then, the full model is fine-tuned for up to 50 epochs with a reduced initial learning rate.
  • Data augmentation includes resizing to 333×333, random crop to 227×227, and random horizontal flip during training, with center cropping at inference time.
  • The text encoder is initialized from a pre-trained DistilBERT model, but the model is fine-tuned end-to-end on the large-scale product dataset, with a vocabulary size of 30,000.
  • The model is trained on 11M (image, title) pairs from Amazon fashion products, with evaluation on a 1M test set using R@K metrics.

Experimental results

Research questions

  • RQ1Can transformer-based models achieve superior performance in visual semantic embedding compared to RNNs and word-averaging models when trained on a large-scale dataset?
  • RQ2Does the scale of the training data significantly impact the performance of transformer-based visual semantic embedding models?
  • RQ3Can self-supervised pre-training on large text corpora be effectively leveraged in vision-language tasks when combined with large-scale image-text data?
  • RQ4Why do previous studies report poor performance of BERT-like models in vision-language tasks, and can this be overcome with proper training and data scale?

Key findings

  • T-VSE with a 12-layer DistilBERT encoder achieves 38.1% R@1 and 96.3% R@100 for text-to-image retrieval, significantly outperforming AVG-VSE (12.7% R@1, 81.7% R@100) and RNN-VSE (12.7% R@1, 83.3% R@100).
  • Image-to-text retrieval performance is slightly better than text-to-image in T-VSE (40.5% R@1 vs. 38.1% R@1), likely due to the stronger text modeling capacity of the transformer.
  • Extending training from 30 to 50 epochs with a larger batch size of 400 improves T-VSE performance to 38.1% R@1 and 96.3% R@100 for text-to-image, indicating that deeper models benefit from longer training.
  • The performance gap between T-VSE and baseline models (AVG-VSE, RNN-VSE) is substantial, with T-VSE achieving over 30% R@1 in text-to-image retrieval, compared to less than 13% for baselines.
  • The results demonstrate that transformer models can outperform simpler models in cross-modal retrieval when trained on large-scale, high-quality image-text datasets, contrary to prior claims of poor performance.
  • The study shows that dataset scale and training strategy are critical—large-scale data and proper fine-tuning enable transformers to achieve state-of-the-art results in visual semantic embedding.

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.