CLOOB: Modern Hopfield Networks with InfoLOOB Outperform CLIP

Andreas Fürst, Elisabeth Rumetshofer, Viet Tran, Hubert Ramsauer, Fei Tang, Johannes Lehner, David P. Kreil, Michael Kopp, Günter Klambauer, Angela Bitto-Nemling, Sepp Hochreiter

TL;DR

This paper introduces CLOOB, a novel contrastive learning method that combines modern Hopfield networks with the InfoLOOB objective. CLOOB significantly outperforms CLIP in zero-shot transfer learning by better capturing covariance structures in multimodal data and avoiding the saturation issues of CLIP's InfoNCE objective.

What Problem Does This Paper Address?

Current state-of-the-art models like CLIP achieve impressive zero-shot transfer learning capabilities by training on massive image-text datasets. However, CLIP suffers from an "explaining away" problem, where it tends to focus on only a few features while neglecting others. This is attributed to an insufficient extraction of covariance structures within the multimodal data. The authors propose to address this by leveraging modern Hopfield networks to enrich the embeddings with richer covariance information. Additionally, they identify that Hopfield networks can exacerbate the saturation issue in CLIP's InfoNCE objective, leading to hampered learning.

Methods

The core of CLOOB lies in two novel components:

  • Modern Hopfield Networks: These are continuous, differentiable associative memory networks that can store and retrieve samples with high capacity. By using retrieved embeddings from these networks, CLOOB aims to amplify co-occurrences and covariance structures present in the original data, thereby mitigating the "explaining away" problem.
  • InfoLOOB Objective: This is a contrastive learning objective that replaces CLIP's InfoNCE. Unlike InfoNCE, which can saturate due to its "alignment score" and "uniformity penalty" terms, InfoLOOB uses a "Leave One Out" approach that avoids saturation. This allows for continued learning and better uniformity, even with high alignment scores.

CLOOB integrates these two components: Hopfield networks enrich the embeddings, and InfoLOOB provides a stable learning objective for these enriched embeddings.

Datasets

The authors train their models on two large-scale image-text datasets:

  • Conceptual Captions (CC): Contains 2.9 million image-text pairs with rich textual descriptions.
  • YFCC100M (a subset): A larger dataset of 15 million image-text pairs, but with less rich and sometimes vacuous textual descriptions.

For evaluation, they use seven downstream image classification datasets: Birdsnap, Country211, Flowers102, GTSRB, UCF101, Stanford Cars, and ImageNet (including ImageNetV2).

Key Insights and Ideas

  • Hopfield Networks for Covariance Enrichment: The paper demonstrates that modern Hopfield networks can effectively amplify covariance structures in multimodal data. This is crucial for overcoming the "explaining away" limitation of models like CLIP.
  • InfoLOOB's Saturation Avoidance: The InfoLOOB objective is shown to be a more stable and effective alternative to InfoNCE, particularly when combined with Hopfield networks. It prevents learning from stalling due to saturated gradients.
  • Synergistic Effect: The combination of modern Hopfield networks and the InfoLOOB objective creates a strong synergistic effect, leading to superior performance compared to using either component alone or standard CLIP.
  • Overfitting Mitigation: While InfoLOOB alone can lead to overfitting (as seen in Figure 4), the inclusion of Hopfield networks helps to balance this, keeping the model in effective learning regimes.

Key Results

CLOOB consistently outperforms CLIP in zero-shot transfer learning tasks across various architectures and datasets.

  • Conceptual Captions Pre-training: CLOOB consistently outperforms CLIP on the majority of tasks, with statistically significant improvements.
  • YFCC Pre-training: CLOOB outperforms CLIP on all 7 tasks for linear probing and 7 out of 8 tasks for zero-shot classification using ResNet-50 encoders. With larger ResNet encoders, CLOOB outperforms CLIP on all tasks.
  • Image-Text Retrieval: CLOOB significantly outperforms CLIP in both image-to-text and text-to-image retrieval tasks on the CC validation set.
  • Ablation Studies: The studies confirm the benefits of both modern Hopfield networks and the InfoLOOB objective, showing a strong synergistic effect when combined.

Limitations and Future Work

  • Limitations: The paper acknowledges that their method is currently limited to natural images and short text prompts. While they hypothesize its usefulness for other data modalities, this has not been assessed. They also note the potential for negative societal impacts, such as over-reliance on AI systems and biases inherited from training data.
  • Future Work: The authors suggest that CLOOB's architecture could be extended to other domains. Further exploration of the theoretical properties of InfoLOOB and its application in different contrastive learning settings is also implied.

Summary updated

BibTeX
@inproceedings{furst2022cloob,
  author = {Andreas Fürst and Elisabeth Rumetshofer and Viet Tran and Hubert Ramsauer and Fei Tang and Johannes Lehner and David P. Kreil and Michael Kopp and Günter Klambauer and Angela Bitto-Nemling and Sepp Hochreiter},
  title = {{CLOOB: Modern Hopfield Networks with InfoLOOB Outperform CLIP}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=qw674L9PfQE},
}
Figure