Multi-modal models are designed to create a "shared" representation space where, for instance, an image of a cat and the word "cat" map to the exact same location. However, in practice, they don't. Researchers have identified a persistent "modality gap" in multi-modal models like CLIP, where image and text embeddings occupy completely separate regions of the representation space.
This gap is not a flaw in the data, but a fundamental geometric byproduct of deep neural architectures and contrastive learning. Surprisingly, adjusting the size of this gap can actually improve a model's accuracy and fairness.
The Pervasive Modality Gap
Even in state-of-the-art models like OpenAI’s CLIP, image embeddings and text embeddings cluster into two distinct "islands" separated by a significant distance. The authors set out to answer why this gap exists, whether it is caused by data or architecture, and if its size impacts real-world performance.
Through empirical visualization using UMAP and PCA, the researchers mapped the embedding spaces of various models, including CLIP (natural images), VideoCLIP (video), ConVIRT (medical images), and CLASP (amino-acid sequences). The gap was found across every multi-modal architecture tested, proving the phenomenon is pervasive across specialized modalities.
Why Does the Gap Exist?
To isolate the cause, the researchers conducted ablation studies testing models with random weights and random noise inputs. They discovered two primary drivers for the modality gap: the "Cone Effect" at initialization and the repulsive nature of contrastive learning.
1. The "Cone Effect" at Birth
Deep neural networks act as high-dimensional funnels. Regardless of the input, the architecture tends to crush embeddings into a narrow cone. Because a multi-modal model uses two different "funnels" (one for images, one for text), they naturally point in different directions from the start.
The modality gap exists even before the model sees a single piece of data. Models with completely random weights already show a clear separation between image and text regions. The authors mathematically characterized this effect, proving that deep layers with non-linear activations (like ReLU) naturally shrink the angles between vectors.
2. Contrastive Learning is Repulsive
During training, the contrastive loss function—which relies on a "temperature" parameter—creates a repulsive structure. If the temperature is low, the model actually prefers to keep the modalities separated by a certain distance to minimize the loss, rather than merging them into a single overlapping cloud.
The Gap is a Feature, Not a Bug
Perhaps the most surprising finding is that "closing the gap" isn't always better. By manually shifting embeddings closer together or further apart, the researchers found that the distance between these two modality islands acts like a hidden hyperparameter that can be tuned for better results.
- Performance Gains: By manually adjusting the gap distance, the researchers improved CLIP’s zero-shot performance on downstream tasks. For example, on the CIFAR10 dataset, optimizing the gap boosted top-1 accuracy from 0.9013 to 0.9081.
- Fairness Improvements: Increasing the modality gap significantly reduced "denigration harms." Using the FairFace dataset, increasing the gap from 0.82 to 0.97 reduced the fraction of offensive misclassifications across all racial groups (e.g., reducing the bias for "White" subjects from 15.7% to 13.7%).
Looking Forward
While the paper provides a robust explanation for why the gap exists, finding a way to automatically tune this optimal gap distance during training remains an open challenge. Furthermore, since the study focuses heavily on dual-encoder models, future work could investigate if "unified" encoders (which process both modalities in a single stream) suffer from the same geometric constraints, or if alternative training objectives like generative modeling yield different geometric structures.
Summary updated