Self-Supervised Learning of Visual Features through Embedding Images into Text Topic Spaces

Lluis Gomez, Yash Patel, Marçal Rusiñol, Dimosthenis Karatzas, C.v. Jawahar · DOI

Abstract

Training deep convolutional neural networks (CNNs) for computer vision typically requires massive human-labeled datasets like ImageNet. This paper proposes a "free" alternative: a self-supervised framework that trains a neural network to predict the semantic topic of the text that accompanies an image in illustrated articles, such as those found on Wikipedia. By leveraging the natural link between pictures and the stories they illustrate, the model learns powerful visual features without a single manual label. Our results demonstrate that this semantic self-supervision outperforms several contemporary methods on standard benchmarks like PASCAL VOC.

Introduction

The success of deep learning in computer vision is largely built on massive, manually annotated datasets. However, labeling millions of images is expensive, time-consuming, and does not scale well to new domains. Consequently, researchers have turned to self-supervised learning, where models learn from "pretext tasks" that do not require human labels—such as predicting the relative position of image patches or the rotation of a photo. While clever, these tasks are often purely geometric. This paper addresses the gap in semantic self-supervision: using the vast amount of multi-modal data on the web to teach a model about the meaning of what it sees.

Methodology

The authors introduce TextTopicNet, a framework that uses topic modeling to bridge the gap between pixels and prose. The pipeline consists of two primary stages: processing textual context and training the visual model.

Overview of the TextTopicNet framework, illustrating the dual path of text topic modeling and image feature learning.

1. Topic Modeling (LDA)

First, the system processes a large corpus of illustrated articles. Ignoring the images initially, it runs Latent Dirichlet Allocation (LDA) on the text. LDA is a standard NLP technique that discovers latent "topics" in a collection of documents. Each article is then represented as a probability distribution over these topics (e.g., 20% "Biology," 50% "History," 30% "Geography").

2. CNN Training and the Pretext Task

A standard CNN (specifically a CaffeNet/AlexNet architecture) is trained to take an image from an article as input and predict that article's LDA topic vector. The CNN is not trying to identify specific objects; it is trying to predict the context in which the image appears. Because an image of a "wheel" is likely to appear in an article about "Cars" or "Engineering," the network is forced to learn discriminative visual features to succeed at the task. This process effectively embeds images into the same semantic topic space as the text.

Datasets and Evaluation

Training was performed on the ImageCLEF 2010 Wikipedia collection, which contains approximately 237,000 images and their corresponding articles. The authors filtered this to roughly 100,000 English-article-image pairs.

Training data examples: (a, b) Wikipedia articles for Antelopes and Horses; (c) a diverse set of images illustrating various topics.

Evaluation focused on three main areas:

  • PASCAL VOC 2007: Used for benchmarking image classification and object detection performance.
  • STL-10: Used to test classification performance on smaller images.
  • Wikipedia Dataset: Used for evaluating multi-modal retrieval (finding images using text queries and vice versa).

Key Insights

  • Text as Natural Supervision: Text is not just noise; it is a high-level semantic signal that exists for free. Even though the relationship is "noisy" (not every image in a "Biology" article is a cell), the statistical correlation is strong enough to train deep features.
  • Topics vs. Words: Predicting a compact topic vector (e.g., 40 dimensions) is more effective for training than trying to predict thousands of individual words. Topics provide a cleaner, more abstract supervisory signal.
  • Feature Complementarity: Features learned from text are distinct from those learned from other self-supervised signals like sound or motion. Combining them leads to better performance, suggesting that multi-modal learning captures unique aspects of the visual world.

Results and Performance

TextTopicNet achieved state-of-the-art results for self-supervised learning at the time of publication. On PASCAL VOC 2007 classification, it reached 48.5% mAP (mean Average Precision), outperforming methods based on sound (47.4%) and egomotion (31.1%). When used as a pre-training step for Fast R-CNN, the model reached 43.0% mAP on PASCAL VOC detection, proving the features are useful for localization, not just global classification. Furthermore, the model significantly outperformed traditional unsupervised methods like Canonical Correlation Analysis (CCA) in multi-modal retrieval tasks.

Limitations and Future Work

The authors acknowledge that the link between an image and its parent article can be weak; generic images like logos or maps can appear across many topics, providing a confusing signal. Additionally, LDA topics are broad; while the model learns that an image belongs to "Sports," it may not learn the fine-grained visual difference between a "tennis ball" and a "baseball" if they share a topic. Future work involves scaling this to millions of web articles to further close the gap with fully supervised models.

Summary updated

BibTeX
@misc{gomez2017self,
  author = {Lluis Gomez and Yash Patel and Marçal Rusiñol and Dimosthenis Karatzas and C.V. Jawahar},
  title = {{Self-Supervised Learning of Visual Features through Embedding Images into Text Topic Spaces}},
  year = {2017},
  eprint = {1705.08631},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1705.08631},
}
Figure