Closing the Modality Gap Aligns Group-Wise Semantics

Eleonora Grassucci, Giordano Cicchetti, Emanuele Frasca, Aurelio Uncini, Danilo Comminiello

Executive Summary

While CLIP-based models are excellent at retrieving specific items across modalities, they often fail to group similar concepts together because of a structural "modality gap." This paper introduces a novel loss function that physically closes this gap, demonstrating that while a zero-gap doesn't strictly "fix" retrieval, it is the key to unlocking high-performance semantic clustering and group-wise organization in multimodal latent spaces.

The Modality Gap Problem

In multimodal learning, models like CLIP aim to project different types of data (like images and text) into a single shared "latent space." Ideally, an image of a cat and the word "cat" should land in the exact same spot.

However, researchers have observed a persistent modality gap: even when the model correctly identifies that an image and text match, the image embeddings tend to cluster in one region of the space while text embeddings cluster in another. They are "aligned" in terms of relative ranking (retrieval), but separated by a physical distance.

The authors argue that the research community has been divided on whether this gap actually matters. If your only goal is retrieval (finding the right caption for an image), the gap is mostly harmless because retrieval relies on relative rankings. But if your goal is group-wise semantics (clustering all "animal" concepts together regardless of modality), the gap is a major hurdle. It fragments the latent space, making absolute distances unreliable for semantic grouping.

Impact of the modality gap on retrieval vs. clustering

Proposed Method: ModGap

The authors propose a new training objective, ModGap, which combines the standard contrastive loss (InfoNCE) with two novel components designed to collapse the modality gap:

  1. Align True Pairs ($\mathcal{L}_{ATP}$): Unlike standard contrastive losses that focus on cosine similarity (angles), this loss minimizes the actual Euclidean distance between matching pairs. It physically pulls the modalities together.
  2. Centroid Uniformity ($\mathcal{L}_{CU}$): Simply pulling pairs together can cause "representation collapse," where everything squashes into a single point. To prevent this, the authors enforce uniformity. Crucially, they apply this to the centroids of matching pairs rather than individual samples. This ensures that different semantic concepts (e.g., "cats" vs. "cars") stay far apart on the hypersphere while the modalities within those concepts stay tightly fused.

This approach is "plug-and-play," requiring no architectural changes and scaling easily from two modalities (image-text) to $n$ modalities (video-audio-text).

Key Insights and Ideas

  • Rank vs. Distance: The "aha moment" is the formal proof that retrieval is rank-based and thus "gap-insensitive," while clustering is distance-based and "gap-sensitive." Enlarging the gap inflates the "within-class scatter," making clusters messy and overlapping.
  • Semantic Stripes: In standard CLIP, matching pairs form "semantic stripes"—they are parallel but separated. Closing the gap merges these stripes into coherent semantic "blobs."
Visualizing the latent space: Initialization, CLIP, and Our Method
  • The Local Minimum Problem: The authors show that standard InfoNCE loss actually prefers a state where a gap exists (often around 60 degrees). Their proposed loss shifts the global minimum to a zero-gap state.
  • Preserving Expressiveness: Closing the gap doesn't mean losing the unique features of a modality. The authors prove through "linear probing" that the individual encoders remain just as discriminative even when their outputs are physically moved closer to other modalities.

Datasets and Key Results

The researchers evaluated their method across four diverse datasets (CIFAR10, AV-MNIST, MSCOCO, and MSR-VTT) to test scalability and modality variety. The results show a massive boost in group-wise tasks with minimal impact on retrieval:

  • Clustering Breakthrough: On the MSCOCO dataset, the proposed method improved the V-Measure (a clustering metric) from ~13.0 to 23.63, nearly doubling the performance of standard CLIP.
  • Trimodal Success: On MSR-VTT (Video-Audio-Text), the method achieved a V-Measure of 32.1, significantly outperforming both standard CLIP (23.3) and other recent "gap-reducing" methods.
  • Retrieval Stability: While the gap was reduced from 0.47 to 0.03 (nearly zero), retrieval performance (R@1) remained stable or saw slight improvements, debunking the idea that the gap is necessary for good retrieval.
  • Zero-Shot Generalization: When trained on MSCOCO and tested on OpenImage-V7, the model maintained its superior clustering and gap-closure properties, proving the method learns a robust structural alignment.

Limitations and Future Work

The authors acknowledge a few areas for further exploration. The method shows the most significant gains on balanced datasets; in highly imbalanced scenarios (like CIFAR10, where there are thousands of images but only 10 unique text labels), the improvements are more modest. Additionally, in cases where semantic alignment is naturally weak or ambiguous, closing the gap might be more challenging. Finally, while they tested up to three modalities, future work could explore even more complex combinations (e.g., depth maps, thermal imaging, or IMU data) to see if the "centroid uniformity" principle holds up.

Summary updated

BibTeX
@inproceedings{grassucci2026closing,
  author = {Eleonora Grassucci and Giordano Cicchetti and Emanuele Frasca and Aurelio Uncini and Danilo Comminiello},
  title = {{Closing the Modality Gap Aligns Group-Wise Semantics}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=RHPqr2egJO},
}
Figure