Learning Joint Representations of Videos and Sentences with Web Image Search

Mayu Otani, Yuta Nakashima, Esa Rahtu, Janne Heikkilä, Naokazu Yokoya

TL;DR

Researchers have developed a new way to retrieve videos using natural language by leveraging web image search to disambiguate complex queries. By mapping videos and sentences into a shared "embedding space" where visual context from the web acts as a bridge, the model significantly outperforms previous state-of-the-art methods in both video and sentence retrieval.

What Problem Does This Paper Address?

Searching for a specific video using a natural language query (e.g., "a person playing a keyboard") is a difficult "cross-modal" challenge. Traditionally, search engines rely on metadata like titles or tags, but these are often sparse, inaccurate, or only describe a fraction of the video content.

A more robust approach is to compare the visual content of the video directly with the text of the query. However, language is inherently ambiguous. Does "keyboard" refer to a musical instrument or a computer peripheral? Humans use context to decide, but machines often struggle. This paper addresses the "semantic gap" by using auxiliary information—specifically, web image search results—to provide the necessary visual context to ground and disambiguate textual queries.

Methods

The authors propose a multi-branch neural network architecture designed to learn joint representations (embeddings). The goal is to project both videos and sentences into the same high-dimensional vector space so that semantically similar items are physically close to one another.

1. Video Embedding

The model extracts frames from a video (at 1 fps) and passes them through a pre-trained Convolutional Neural Network (CNN), such as VGG-19 or GoogLeNet. These features are then processed through fully connected layers and mean-pooled to create a single vector representing the entire video.

2. Sentence and Web Image Embedding (The Novelty)

This is the core contribution. Instead of just processing the text, the model:

  • Queries a search engine: It sends the query sentence to Bing Image Search and retrieves the top-K images.
  • Dual-Branch Processing: One branch uses a Skip-thought RNN to encode the linguistic structure of the sentence. The second branch uses a CNN to encode the retrieved web images.
  • Fusion: The linguistic vector and the visual context vector from the web images are averaged to create a final "enhanced" sentence embedding.

3. Joint Training

The system is trained using a contrastive loss function. This mathematically "pulls" a video and its correct description together in the embedding space while "pushing" irrelevant pairs far apart.

Datasets

The researchers evaluated their model using the YouTube dataset, which contains:

  • 1,970 video clips.
  • Approximately 80,000 English descriptions.
  • The data was split into 1,200 videos for training, 100 for validation, and 670 for testing.

To enhance the sentences, they collected the top-5 image search results for every description in the dataset using the Bing API.

Key Insights and Ideas

  • Web Images as Semantic Anchors: The most striking idea is using the "wisdom of the web" to clarify text. If a query is "man playing keyboard," the retrieved images will likely show musical instruments, helping the model ignore videos of people typing at computers.
  • Beyond SVO Triplets: Previous models often simplified sentences into Subject-Verb-Object (SVO) triplets. This paper shows that using an RNN (Skip-thought) to capture the entire sentence—including adjectives and specific scenes—leads to much better embeddings.
  • Retrieval Embeddings for Generation: Interestingly, the authors found that embeddings trained purely for retrieval (finding an existing video) are "rich" enough to be used for generation (writing a new description for a video). This suggests the model is truly capturing the underlying semantics of the visual scene.

Key Results

The proposed model, particularly the version using GoogLeNet and the combined sentence/image embedding (GoogLeNet+ALL₂), showed a clear lead over previous benchmarks:

  • Video Retrieval: It achieved a Recall@1 of 7.67%, a massive improvement over the Skip-thought baseline (2.63%).
  • Sentence Retrieval: It achieved a Median Rank of 19, meaning the correct sentence was usually found within the top 20 results out of 3,500 candidates.
  • Ablation Success: The "ALL" models (text + web images) consistently outperformed "VS" (text only) or "VI" (images only) models, proving that the fusion of text and auxiliary visual data is the key to success.

Limitations and Future Work

While the results are impressive, the authors note a few areas for improvement:

  • Temporal Dynamics: The current model treats videos as a collection of frames and averages them. It doesn't explicitly model the order of actions (e.g., the difference between "opening a box" and "closing a box").
  • Search Engine Dependency: The model relies on an external image search engine. If the search engine returns poor or irrelevant results, it could potentially confuse the embedding process (though the authors noted the model is somewhat resilient to this).
  • Efficiency: Future work could involve investigating which specific types of sentences benefit most from image search to optimize when the auxiliary search is triggered.

Summary updated

BibTeX
@inproceedings{otani2016learning,
  author = {Mayu Otani and Yuta Nakashima and Esa Rahtu and Janne Heikkilä and Naokazu Yokoya},
  title = {{Learning Joint Representations of Videos and Sentences with Web Image Search}},
  booktitle = {Workshops @ ECCV},
  year = {2016},
  url = {https://openreview.net/forum?id=HyNM6FWd-r},
}
Figure