The Double-Ellipsoid Geometry of CLIP

Meir Yossef Levi, Guy Gilboa

TL;DR

Researchers have discovered that CLIP’s latent space isn't just a simple hypersphere; it's actually structured as two separate, off-center "ellipsoid shells"—one for images and one for text. This "double-ellipsoid" geometry is a feature, not a bug, as it allows the model to manage semantic uncertainty and "conformity" by positioning common themes closer to the modality mean and rare themes further away.

What Problem Does This Paper Address?

Contrastive Language-Image Pre-Training (CLIP) is the backbone of modern multimodal AI, powering everything from DALL-E to open-vocabulary object detection. However, we still don't fully understand its internal "map"—the latent space where it embeds images and text.

Most researchers focus on the final, $L_2$-normalized embeddings that sit on a unit hypersphere. The authors of this paper argue that normalization is an "information-reducing process." By looking at the pre-normalized primary embeddings, they aim to solve mysteries like the "modality gap" (the persistent distance between image and text clusters) and the "narrow cone effect" (where embeddings only occupy a tiny slice of the available angular space). They specifically investigate how CLIP handles "false negatives"—cases where a model is told two similar things are different—and how semantic frequency shapes the embedding space.

Methods

The authors perform a deep statistical dive into the primary embeddings of CLIP (specifically ViT-B/32 and ViT-L/14). Their approach combines high-dimensional geometry theory with empirical data analysis:

  • Thin Shell Theory: They apply mathematical principles showing that in high dimensions, most of the "mass" of a distribution concentrates on a thin shell at a specific radius from the mean.
  • Conformity Metric: They introduce a new concept called "conformity," which measures how "common" or "typical" a sample is relative to the rest of the dataset. Mathematically, it's the average cosine similarity of an instance to all others.
  • Surrogate Estimation: They prove that this computationally expensive conformity measure can be perfectly estimated by simply calculating the cosine similarity to the modality mean vector.
  • vSLERP (Vertical SLERP): Leveraging their geometric findings, they propose a new interpolation method for semantic editing. Unlike standard Spherical Linear Interpolation (SLERP), vSLERP accounts for the ellipsoid's offset from the origin, allowing for more stable object manipulation in generative tasks.

Datasets

The study primarily uses MS-COCO (Microsoft Common Objects in Context) for its statistical validation and loss behavior experiments. To visualize the semantic meaning of "conformity," they also utilize:

  • ImageNet-a: Natural adversarial examples.
  • ImageNet-R: Renditions of objects (sketches, origami, etc.).

Key Insights and Ideas

  • The Double-Ellipsoid: Image and text embeddings reside on separate, tilted, and off-center ellipsoid shells. This is visualized in the paper's conceptual sketch: Sketch of CLIP general geometry
  • Semantic Blurring: This off-center geometry is a clever way to handle uncertainty. Common, frequent themes (high conformity) are embedded closer to the mean vector. This "blurs" the model's response, making it less sensitive to the "false negatives" that naturally occur with frequent concepts. Rare, unique themes are pushed further from the mean, "sharpening" the model's response where uncertainty is lower.
  • The Modality Gap is Functional: The authors suggest the modality gap isn't a failure of alignment. Instead, having separate, shifted ellipsoids allows CLIP to independently control the uncertainty for each modality while matching their overall "conformity distributions."
  • Magnitude is Meaningful: Even though CLIP is trained using cosine similarity (which ignores vector length), the pre-normalized magnitude contains rich semantic info. For example, the largest embeddings in MS-COCO often correspond to "exotic" or unusual captions (e.g., "I am not sure what this image is").
Figure 1. Sketch of CLIP general geometry: image and text are embedded on linearly separable ellipsoid shells, not centered at the origin. This allows to control uncertainty in contrastive learning, where as themes become more rare (lower uncertainty) they reside farther from the mean modality vector.

Key Results

  • Perfect Linear Separability: The authors found that image and text modalities are so distinct in the primary space that they can be separated with 100% accuracy using a linear classifier on just two specific features (Features 93 and 134). Linear separability of features
  • Conformity Correlation: The proposed surrogate for conformity (similarity to the mean) achieved a near-perfect Pearson correlation of 0.9998 on MS-COCO, validating it as a powerful tool for measuring how "typical" a sample is.
  • Loss Optimization: Experiments showed that shifting the embeddings toward the origin (as often suggested to "fix" the modality gap) actually increases the loss for misclassified samples. The current off-center geometry is mathematically optimal for balancing alignment and uniformity.
  • vSLERP Success: The new interpolation method allows for "optimization-free" semantic editing, preserving object identity better than standard SLERP during transitions (e.g., turning a lamp into a vase).
Figure 2. Normalized histograms of certain CLIP features. Image and text are clearly drawn from different statistics. On the right it is shown that even two features are sufficient to obtain full linear separability. The results of a linear SVM classifier are shown (blue dashed line, with 100% accuracy on MS-COCO).

Limitations and Future Work

The authors acknowledge that their findings are primarily empirical and based on existing CLIP architectures. While they provide a strong theoretical justification for why this geometry emerges, they don't explore how it might change with different loss functions or training scales.

Future work could involve using the "conformity" metric as a filtering tool for dataset curation or as a ranking metric for generative models (e.g., identifying which models produce more "diverse" vs. "common" images). There is also potential to use these geometric insights to improve zero-shot performance by better accounting for the ellipsoid tilt during inference.

Summary updated

Abstract

Contrastive Language-Image Pre-Training (CLIP) is highly instrumental in machine learning applications within a large variety of domains. We investigate the geometry of this embedding, which is still not well understood. We examine the raw unnormalized embedding and show that text and image reside on linearly separable ellipsoid shells, not centered at the origin. We explain the benefits of having this structure, allowing to better embed instances according to their uncertainty during contrastive training. Frequent concepts in the dataset yield more false negatives, inducing greater uncertainty. A new notion of conformity is introduced, which measures the average cosine similarity of an instance to any other instance within a representative data set. We show this measure can be accurately estimated by simply computing the cosine similarity to the modality mean vector. Furthermore, we find that CLIP's modality gap optimizes the matching of the conformity distributions of image and text.
BibTeX
@inproceedings{levi2025double,
  author = {Meir Yossef Levi and Guy Gilboa},
  title = {{The Double-Ellipsoid Geometry of CLIP}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=QGUju9B68Z},
}
Figure