Image-text models such as CLIP place pictures and captions in one shared embedding space, yet the two never actually meet. Image embeddings sit in one region and caption embeddings in another, offset by a roughly constant vector. This offset is the modality gap. Two lines of work disagree about what it is. One treats it as an optimization accident and removes it, which helps semantic clustering. The other finds that the gap carries useful information: removing it after training hurts zero-shot accuracy, because the model uses it to control how confident its image-text matching scores are. This proposal tests a specific reconciliation. The gap is the model's improvised way of giving each caption its own confidence setting. If we hand the model that setting explicitly, as a learned per-caption temperature and offset on its matching scores, the gap should become removable at no cost.
In everyday terms, temperature is the knob that controls how peaked or spread out a softmax distribution is. A caption like "a dog" says little about the image it describes, so the model should be unsure which of many dog images it matches. A caption like "a striped tabby asleep on a red sofa" should be matched sharply. A single global temperature cannot express this difference. Our claim is that CLIP-style models recover per-caption control through geometry, by stretching embeddings along a few gap directions. The experiments test whether that geometric workaround can be swapped for an explicit randomness-control mechanism, so that one model gets both the clustering benefits of a closed gap and the zero-shot quality of an open one.
Core Claim
The harm caused by closing the modality gap is mediated by the entropy of the output scores, not by destroyed neighborhood structure. Concretely, let $\tilde u_i$ and $\tilde v_t$ be the image and text embeddings after removing the gap (mean-centering each modality, then renormalizing). We restore per-caption control with
$$ \ell(i,t) = \frac{\langle \tilde u_i, \tilde v_t\rangle + \beta_t}{\tau_t}. $$
Here $\ell(i,t)$ is the matching logit between image $i$ and caption $t$. The quantities $\tau_t>0$ and $\beta_t$ are a temperature and an offset predicted from the caption alone by a small head on the frozen text embedding. If the claim holds, this affine head should recover most of the zero-shot loss caused by gap removal. The embeddings themselves stay gap-free and keep their clustering gains.
The claim is falsifiable, and it is a real wager. Two Effects, One Trigger gives two findings across 98 models. First, the gap regulates output entropy along a very small subspace, often about two dimensions, and grows when captions omit visual information. Second, post-hoc closure degrades downstream performance, which the authors attribute to damaged local geometry. Their first finding motivates our hypothesis. Their second is the competing explanation we must beat. If the per-caption head recovers little, their geometric account is right and ours is wrong.
Relation to Prior Work
Three papers motivate the hypothesis by tying the gap to temperature. Explaining and Mitigating the Modality Gap uses an analysis of training dynamics to show that the decaying learnable temperature in the contrastive loss traps the gap. It then closes the gap with temperature scheduling, reparameterization, and modality swapping. Its temperature is a single global training-time scalar. Ours is per-caption and serves as a replacement for geometry rather than a lever on it. Mind the Gap traces the gap to cone-shaped embeddings at initialization and shows that tuning the gap distance changes CIFAR-10 zero-shot accuracy and FairFace denigration harms. We read that as evidence that the gap behaves like a confidence hyperparameter. "Two Effects, One Trigger" names that hyperparameter's role, entropy regulation, but never tests whether an explicit entropy control can stand in for it.
One paper supplies the method. To Cool or not to Cool? TempNet derives per-sample temperature as a Lagrange multiplier of a robust-optimization objective. It trains a head with under 1% of the base model's parameters on frozen features, including for CLIP pretraining on CC3M and CC12M. It never measures the gap or attribute-level bias. We reuse its architecture and ask a question it did not ask: does per-sample temperature make the geometric gap unnecessary?
One paper constrains the design and supplies the payoff. Closing the Modality Gap Aligns Group-Wise Semantics proves that retrieval is rank-based and largely insensitive to the gap, while clustering is distance-based and sensitive to it. Its ModGap losses collapse the gap and raise clustering quality. This tells us which evaluations can show an effect. A per-caption $\tau_t,\beta_t$ cannot change text-to-image retrieval rankings, because it shifts and rescales every image's score for a given caption equally. It can change image-to-text retrieval and zero-shot classification, which rank captions against each other. We restrict our claims accordingly.
Research Program
The work has three stages, ordered from cheap to expensive.
Stage 1: post-hoc diagnostic. We take a range of off-the-shelf CLIP-family models, remove the gap by mean-centering, and train only the $\tau_t,\beta_t$ head. The head is trained to match the original model's softmax over captions on held-out pairs, using a KL objective. This asks a pure question of information sufficiency: can a per-caption affine correction, applied to gap-free embeddings, reproduce what the gap was doing? We then evaluate the closed-gap embeddings with the head on zero-shot and retrieval tasks, and without it on clustering. We also check that the learned $\tau_t$ tracks caption informativeness. The prediction is that it is higher for short or object-only captions and correlates with the per-caption gap projection that "Two Effects, One Trigger" identified.
Stage 2: controlled causal test. We train small CLIP models on MAD, the Morpho-MNIST-based dataset from "Two Effects, One Trigger" that varies how many visual attributes captions mention. We compare three conditions: vanilla contrastive training, training with an explicit per-caption head, and training with the head plus a gap-closing loss. The prediction is that vanilla models' gap widens as captions get sparser, while models with the head keep a small gap across caption densities. The matching-object-attribute distance (MOAD) and relative modality gap (RMG) metrics from that paper are the readouts.
Stage 3: web scale. We repeat Stage 2 on CC3M, with CC12M caption thinning at 50% and 75% as the information-imbalance stressor. The goal is to check that the mechanism survives realistic data.
Baselines
The naive reference point is the unmodified model, with the gap intact and one global temperature. Next to it sits naive post-hoc closure, mean-centering with no compensation. This is the operation "Two Effects, One Trigger" reports as harmful, and the quantity we try to recover is the drop from the first to the second.
The strongest training-time competitors are temperature scheduling from Explaining and Mitigating the Modality Gap and ModGap from Closing the Modality Gap Aligns Group-Wise Semantics. Both close the gap during training and report gains rather than losses. On MSCOCO, temperature scheduling reduces the gap from 0.294 to 0.088 and raises image retrieval from 68.2% to 75.7% and text retrieval from 78.4% to 85.3%. ModGap reduces the gap from 0.47 to 0.03 and raises MSCOCO V-Measure from about 13.0 to 23.63, and MSR-VTT V-Measure from 23.3 to 32.1. These are the numbers to beat on clustering and retrieval.
TempNet on Flickr30K reports image retrieval R@1 of 46.17% against 44.36% for ISOGCLR. It is the per-sample-temperature competitor without gap closure. No reported result was found on Lacuna for RMG or MOAD values on MAD, so on that dataset we establish all baselines ourselves.
All training-time methods will be retrained from the same initialization on the same CC3M split, with the same number of steps and a matched hyperparameter sweep of equal size per method. The head will be capped at TempNet's parameter budget.
Two ablations isolate the key ingredient. The first replaces $\tau_t,\beta_t$ with a single global temperature and offset refit after closure. If this works as well, per-caption control is unnecessary and our account collapses into simple recalibration. The second keeps only $\tau_t$ or only $\beta_t$, to determine whether the gap acts more like a confidence scale or a per-caption prior.
Beating the field means two things on the same model. First, clustering V-Measure must reach at least ModGap's level. Second, zero-shot accuracy on CIFAR-10 and attribute-sensitive MAD queries must sit at or above the gap-intact model. ModGap and temperature scheduling must not achieve both.
Why not just…?
Why not just leave the gap alone? Retrieval barely cares about the gap, as the rank-versus-distance analysis shows. Clustering and group-wise semantics do care: V-Measure nearly doubles when the gap closes. A model forced to keep its gap gives up those gains. The question is whether that sacrifice is necessary, and Stage 1 answers it for existing models at almost no cost.
Why not just use temperature scheduling or ModGap, which already close the gap without visible harm? This is the most serious threat. These methods may already succeed by letting the model encode uncertainty some other way. If so, our head adds nothing. Their reported evaluations, however, are retrieval and clustering, which do not stress information imbalance. We will evaluate them on MAD and on thinned CC12M using MOAD and attribute-level zero-shot. If they show no attribute-level penalty relative to vanilla CLIP, we will report that the per-caption head is unnecessary and that the "Two Effects, One Trigger" harm is specific to post-hoc closure. That would still be a useful resolution of the tension.
Why not just refit one global temperature after closing the gap? A single scalar cannot express the claim that sparse captions deserve flatter score distributions than detailed ones. It is also the obvious cheap fix. It is run as an ablation under identical conditions. If it recovers as much as the per-caption head, we drop the per-caption claim.
Why not just shift embeddings partway, tuning the gap distance as Mind the Gap does? Partial shifting trades clustering against zero-shot quality along a single dial. Our proposal aims to break that trade-off. We will plot both metrics across shift magnitudes and check whether the head-equipped point lies above the resulting curve.
Proposed Experiments and Decisive Checks
The decisive check comes from Stage 1. Across the model collection, we compute the fraction of the zero-shot accuracy drop caused by post-hoc closure that the per-caption head recovers, on CIFAR-10, FairFace, and image-to-text MSCOCO and Flickr30K retrieval. We commit in advance to reading recovery of at least half the drop, with clustering gains retained, as support for the entropy account. Recovery below that, or recovery the global-scalar ablation matches, counts as support for the geometric account.
The second check comes from MAD. As caption density falls, the vanilla gap should grow, while the head-equipped model's gap stays flat and its learned $\tau_t$ rises instead. This is a direct sign that the explicit temperature has absorbed the gap's job.
The third check is fairness. "Mind the Gap" found that widening the gap from 0.82 to 0.97 lowered offensive FairFace misclassifications from 15.7% to 13.7%. A closed gap with the head must not undo that improvement. If it does, the gap carries information that a per-caption scalar cannot encode, and we will say so.
References
- Two Effects, One Trigger: On the Modality Gap, Object Bias, and Information Imbalance in Contrastive Vision-Language Models
- Explaining and Mitigating the Modality Gap in Contrastive Multimodal Learning
- Mind the Gap: Understanding the Modality Gap in Multi-modal Contrastive Representation Learning
- To Cool or not to Cool? Temperature Network Meets Large Foundation Models via DRO
- Closing the Modality Gap Aligns Group-Wise Semantics