arXiv:2609.10224cs.CVSep 2026

Manuscript Offprint

arXiv:2609.10224

UOT-Gap: A Variational Principle for the Modality Gap in Vision-Language Models via Unbalanced Optimal Transport

Zonglin Yang, Huilan Ma, Xudan Zheng, Yuejun Xie

Zonglin Yang Ⓤ, Huilan Ma, Xudan Zheng, and Yuejun Xie

Guangdong Police College

3258244847@qq.com

1451727521@qq.com

3113434702@qq.com

18320142522@163.com

Abstract. Vision-language models such as CLIP embed images and text in a shared space, where modality-specific distributions often remain separated. Existing accounts connect this modality gap to initialization, contrastive dynamics, and information imbalance, while its distributional and pairwise contributions to retrieval remain unresolved. We introduce UOT-GAP, a training-free variational diagnostic that models frozen image and text embeddings with unbalanced entropic optimal transport (UOT). The UOT optimum separates transport, coupling complexity, and marginal mass variation; a complementary pair-aware residual compares observed image-caption pairs with the UOT soft matching. On Flickr8K and COCO-1K with frozen CLIP, OpenCLIP, and SigLIP encoders, caption degradation reduces Flickr8K Recall@1 from 0.559 to 0.003. Across six dataset-model conditions, the pair-aware residual tracks retrieval degradation with mean absolute Spearman 0.973, compared with 0.392 for the mean gap. The association remains stable across five random COCO-1K subsets at 0.954 ± 0.026, with a minimum of 0.943. UOT barycentric updates reduce the transport objective while degrading retrieval, distinguishing geometric objective descent from task improvement. These results establish UOT-GAP as a diagnostic for caption quality, modality alignment, and retrieval robustness.

Keywords: Vision-language models · Modality gap · Unbalanced optimal transport · Cross-modal retrieval

1 Introduction

Contrastive vision-language models (VLMs), such as CLIP [22] and SigLIP [27], map images and captions into a shared representation space. Their embeddings often form modality-specific clouds, producing the modality gap [17]. Previous studies connect this structure to initialization and contrastive optimization [17], gradient-flow dynamics and mismatched pairs [26], and information imbalance between images and captions [23]. A remaining diagnostic challenge is to identify

Z. Yang et al.

Figure

Fig. 1. Overview. UOT-GAP interprets the modality gap as the residual of an unbalanced transport problem. Distributional components diagnose marginal and coupling mismatch; the pair-aware residual diagnoses whether observed image-caption pairs are worse than the best soft UOT matching.

a variational quantity that separates distributional mismatch from broken image-caption correspondence.

We address this challenge with unbalanced entropic optimal transport (UOT). Balanced optimal transport enforces complete mass conservation, whereas VLM representations contain modality-specific factors: images may include visual content omitted by captions, and captions may express abstractions without localized visual counterparts. UOT assigns a penalty to mass deletion or creation and thereby represents this information asymmetry directly.

Given frozen image embeddings X={xi}i=1nX = \{x_i\}_{i=1}^n and text embeddings Y={yj}j=1mY = \{y_j\}_{j=1}^m on the unit sphere, empirical weights a,ba, b, and cosine cost Cij=1−⟨xi,yj⟩C_{ij} = 1 - \langle x_i, y_j \rangle, we solve

π⋆=argminπ≥0  ⟨C,π⟩+εKL(π∥ab⊤)+ρxKL(π1∥a)+ρyKL(π⊤1∥b).(1)\pi^{\star}=\underset{\pi\geq 0}{\mathrm{a r g m i n}}\;\langle C,\pi\rangle+\varepsilon\mathrm{K L}(\pi\|a b^{\top})+\rho_{x}\mathrm{K L}(\pi\mathbf{1}\|a)+\rho_{y}\mathrm{K L}(\pi^{\top}\mathbf{1}\|b). \tag{1}

The optimized objective yields transport, coupling, and marginal components. For paired retrieval datasets, we further define a pair-aware residual that compares the observed diagonal pairing cost with the UOT matching cost. A random caption permutation isolates the resulting distinction by preserving the text marginal distribution while disrupting pairwise retrieval.

Using only frozen embeddings, UOT-GAP can screen caption quality, monitor modality alignment during training, and audit retrieval robustness without encoder fine-tuning.

Our contributions are:

  1. We formulate the VLM modality gap as the residual of an unbalanced entropic optimal transport problem between frozen image and text embeddings, and introduce a pair-aware UOT residual that separates marginal distribution mismatch from broken image-caption alignment.

  2. We prove three results that justify the diagnostic: transport bounds the classical mean gap, missing modality-specific mass induces an unavoidable UOT cost or marginal penalty, and UOT barycenters provide a first-order descent direction for the UOT objective.

  3. We validate the diagnostic across Flickr8K, COCO-1K, synthetic controlled data, three frozen encoders, five random COCO subsets, caption degradation, hyperparameter sweeps, and post-hoc correction baselines, showing that the pair-aware residual tracks retrieval degradation more reliably than the classical mean gap.

References (26)