Multimodal Unsupervised Domain Generalization by Retrieving Across the Modality Gap

Christopher Liao, Christian So, Theodoros Tsiligkaridis, Brian Kulis

Introduction

Domain Generalization (DG) aims to train a model on one or more source domains so that it performs robustly on completely unseen target domains. Traditionally, this requires a massive amount of labeled data that matches the specific categories of the target task. However, acquiring the same label space as the target task is often prohibitively expensive in real-world applications.

To address this, researchers have introduced Multimodal Unsupervised Domain Generalization (MUDG). This framework fine-tunes vision models using massive, unlabeled, and task-agnostic datasets (like LAION-2B) instead of expensive, hand-labeled source data. By solving the "modality gap" in cross-modal retrieval and utilizing an adaptive text augmentation strategy, MUDG achieves state-of-the-art performance across 20 diverse datasets without requiring a single labeled source image.

The Problem: Moving to MUDG

While recent "unsupervised" methods (UDG) removed the need for labels, they still assumed the source data was specifically curated for the target task. MUDG tackles a more realistic and difficult setting: the source data is simply a massive, uncurated pool of unlabeled images from the internet.

Comparison of DG, UDG, and MUDG paradigms.

Transitioning to this massive, uncurated pool introduces two primary challenges:

  1. The Modality Gap: In joint embedding spaces like CLIP, text and images occupy different "neighborhoods." This makes it surprisingly difficult to use a text query to accurately retrieve the right images from a massive database.
  2. Data Diversity: Simply retrieving the "closest" images to a text query often yields near-identical photos. Training on these redundant images leads the model to overfit rather than generalize to new domains.

Methodology: Bridging the Modality Gap

The authors propose a three-stage pipeline to build a high-quality, pseudo-labeled training set from a massive unlabeled pool:

1. Paired k-means

Standard search indices (like IVF) cluster images based on image features. Because of the modality gap, text queries often land far from these image clusters, leading to poor search results. The authors theoretically prove this limitation and propose paired k-means. This simple clustering algorithm stores cluster centroids in the query (text) space instead of the image space, significantly boosting retrieval recall.

2. Adaptive Text Augmentation

To ensure the retrieved data is diverse, the system avoids searching for generic terms like "a photo of a cat." Instead, it uses varied descriptors (e.g., "a cat with pointy ears"). Crucially, the authors introduce a novel unsupervised heuristic to select augmentations that preserve the "variance" between classes. This ensures the model doesn't get confused by descriptors that are too generic or overly specific to one sub-group.

3. Refined Training Pipeline

To finalize the training set, the authors introduce two key refinements:

  • Rank-based Pseudo-labeling: In high-dimensional spaces, some points become "hubs" that attract unrelated images. To combat this, images are labeled based on their similarity rank rather than raw distance.
  • Clustering-based Selection: The retrieved images are clustered, and representative samples are selected to ensure the final training set is balanced and free of redundant duplicates.

Datasets and Evaluation

The framework utilizes LAION-2B-en (a subset of the massive LAION-5B dataset) as its task-agnostic source pool. The method was rigorously evaluated on 20 diverse datasets, spanning:

  • General Object Recognition: ImageNet (and variants V2, Sketch, A, R), Caltech-101.
  • Fine-grained Classification: Oxford-Pets, Stanford-Cars, Flowers-102, Food-101, FGVC Aircraft.
  • Specialized Tasks: SUN-397 (scenes), DTD (textures), EuroSAT (satellite), UCF-101 (actions).
  • Domain Generalization Benchmarks: Office Home, Terra Incognita, DomainNet, PACS, and VLCS.

Key Results and Insights

  • Consistent Gains: MUDG consistently outperformed standard Zero-Shot (ZS) CLIP and previous state-of-the-art "name-only transfer" methods (like SuS-X) across all 20 datasets.
  • ImageNet Performance: On ImageNet-1K, the method significantly improved accuracy over the base CLIP model.
  • Efficiency: Despite querying a 2-billion image source pool, the retrieval process takes only seconds. The final fine-tuning is performed on a small, curated subset (typically <100K images), making the approach highly accessible to researchers without massive compute clusters.
  • Centroids Belong in Query Space: A major takeaway is that simply moving the "buckets" of a search index to where the queries live (text space) drastically improves the quality of retrieved data.

Limitations and Future Work

While highly effective, MUDG relies on the target concepts being present in the source dataset and aligned within the initial CLIP model. It struggles with "out-of-vocabulary" concepts, such as specialized medical imagery or synthetic radar data. Furthermore, on very simple datasets where Zero-Shot accuracy is already near 100% (like VLCS), the method provides marginal improvements.

Future directions include exploring how this retrieval-based fine-tuning could be applied to even larger foundation models, or used to "specialize" general models for niche industrial applications without the need for manual data labeling.

Summary updated

BibTeX
@inproceedings{liao2025multimodal,
  author = {Christopher Liao and Christian So and Theodoros Tsiligkaridis and Brian Kulis},
  title = {{Multimodal Unsupervised Domain Generalization by Retrieving Across the Modality Gap}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=bqoHdVMIbt},
}
Figure