Which Part of the Modality Gap Carries Bias?

Models like CLIP map images and text into one shared vector space, so that a photo and its caption land near each other. Yet image vectors and text vectors never fully mix: they sit in two separate clusters, an offset known as the modality gap. Two well-supported results disagree about what to do with that offset. One line of work closes the gap because doing so nearly doubles how well the space groups images and text by meaning. Another line widens it because a wider gap reduced offensive misclassifications of faces. Both papers treat the gap as a single number. This proposal treats it as a direction. We split the gap vector into the part that lies along demographic directions (race, gender) and the part orthogonal to them. We then test whether societal bias rides on the first part while useful semantic structure rides on the second.

If that split holds, there is no forced tradeoff. One could close the gap everywhere except along demographic directions and keep the clustering benefit without the bias cost. If it fails, and harm tracks only the gap's overall size or is reproduced by simply softening the model's similarity scores, that is a useful negative result. It would mean the reported harm reduction from widening the gap is a flattening artifact rather than a geometric effect. The measurement uses directional bias amplification, which asks separately whether demographics distort task predictions and whether task context drives demographic guesses. That distinction matters here because the two disagreeing papers never measured it.

Core Claim

Write $g = \bar{v} - \bar{t}$ for the gap vector, the difference between the mean image embedding $\bar{v}$ and the mean text embedding $\bar{t}$. Let $D$ be a low-dimensional demographic subspace estimated from group centroids of face images and identity prompts. We decompose $g = g_D + g_\perp$, where $g_D$ is the projection of $g$ onto $D$ and $g_\perp$ is the remainder. We then edit text embeddings $t$ as

$$t' = \frac{t + \lambda\, g_\perp + \mu\, g_D}{\| t + \lambda\, g_\perp + \mu\, g_D \|},$$

where $\lambda$ and $\mu$ independently control how far the gap is closed in the non-demographic and demographic components. Renormalizing keeps every vector at unit length. This avoids the norm shrinkage that WRING Out The Bias proves makes projection debiasing inflate unconsidered biases.

The hypothesis is a factorization:

  1. Semantic clustering quality should depend mainly on $\lambda$.
  2. Context-driven demographic inference (task-to-attribute bias) and denigration harm should depend mainly on $\mu$.

The new method, selective gap closure, sets $\lambda$ large and $\mu \approx 0$. We implement it two ways. The training-free version is the edit above. The training-time version adds a penalty on the demographic component of the image–text centroid difference to the ModGap objective.

How this relates to prior work

Two papers supply the tension that motivates this work.

  • Mind the Gap shows the gap arises from a cone effect at initialization and from the repulsive dynamics of contrastive training. It reports that shifting embeddings to widen the gap from 0.82 to 0.97 lowered FairFace denigration harm, for example from 15.7% to 13.7% for White subjects. It shifts along the full gap vector and does not ask which component matters.
  • Closing the Modality Gap Aligns Group-Wise Semantics trains with a loss that pulls true pairs together in Euclidean distance and spreads pair centroids uniformly. This cuts the gap from 0.47 to 0.03 and raises MSCOCO V-Measure from about 13.0 to 23.63 with stable retrieval. It never measures bias.

Our proposal reuses both of their manipulations as arms of one factorial experiment.

Two papers supply the measurement.

  • Directional Bias Amplification separates attribute-to-task bias (gender changes object predictions) from task-to-attribute bias (objects drive gender guesses). It found that MSCOCO gender bias is mostly task-to-attribute, and that masking people increases it. It studies classifier heads, not embedding geometry.
  • Quantifying Societal Bias Amplification in Image Captioning measures demographic leakage through caption context. We use that idea to probe downstream generation.

Two papers constrain the design.

  • Racial and Gender Stereotypes Encoded Into CLIP Representations shows CLIP ViT-B/32 attaches traits such as "smart" or "mean" unevenly across FairFace groups, with heatmaps landing on skin and hair. This is why we expect image-side demographic directions to be strong, and why $g_D$ may be non-trivial.
  • WRING rotates individual embeddings toward a neutral point within a concept subspace. It acts per vector after the fact and is silent about the gap. Our edit acts on the shared offset between modalities.

One paper warns about a likely failure mode. Men Also Do Laundry shows that fixing single attributes can raise combination bias (14.5 to 17.2 under Data Repair). We therefore report its multi-attribute metric for every arm.

Research Program

Step 1: Is there a demographic component at all? We estimate $D$ from FairFace using race and gender centroid differences of image embeddings, cross-checked against identity-prompt text embeddings. We report $\|g_D\|/\|g\|$ for OpenAI CLIP ViT-B/32 and for a ModGap-fine-tuned counterpart.

  • If this ratio is near the value expected for a random subspace of the same dimension, the mechanism has little to act on.
  • We would report that and stop the intervention arm.

Step 2: The factorial sweep. We sweep $(\lambda, \mu)$ over a grid. Both components are pushed in both directions, toward and away from closure. At each point we measure:

  • Utility: MSCOCO V-Measure, image–text R@1, and CIFAR-10 zero-shot accuracy.
  • Harm: FairFace denigration rate under the Mind the Gap protocol, and trait-association disparities on the six trait pairs of the CLIP stereotypes study.
  • Direction of bias: attribute-to-task and task-to-attribute amplification on MSCOCO. Here the task is zero-shot object prompts and the attribute is zero-shot gender prompts. We evaluate on both original images and person-masked images, so the masking paradox can be observed in embedding space.

We fit additive models of each metric on $\lambda$ and $\mu$ and report the fraction of variance each explains.

Step 3: The training-time version. We fine-tune CLIP on MSCOCO with the ModGap loss, with and without an added penalty $\|P_D(\bar{v}-\bar{t})\|^2$. Here $P_D$ projects onto the demographic subspace and $\bar{v}$, $\bar{t}$ are batch centroids. Data, steps, and hyperparameter search are matched. We then rerun Step 2's metrics. We also feed the resulting encoders into a CLIP-prefix captioner trained identically on MSCOCO and measure caption leakage.

Baselines

Unmodified CLIP ViT-B/32 (the do-nothing reference). This is the model studied in the CLIP stereotypes paper. It anchors every bias and utility number.

Uniform gap shift as in Mind the Gap. This is the strongest existing harm-reducing manipulation of geometry. It corresponds to $\lambda=\mu$ in our edit, swept over the same range. Its reported FairFace result is denigration falling from 15.7% to 13.7% for White subjects at gap 0.97. We first reproduce that number under our pipeline. Selective closure beats it only if, at equal or better V-Measure, it shows lower denigration and lower task-to-attribute amplification. Uniform shifting cannot do this by construction, because widening hurts clustering.

Full ModGap fine-tuning. This is the strongest method for the utility side. Its reported MSCOCO result is V-Measure 23.63 against about 13.0 for CLIP, with gap 0.47 to 0.03. We retrain it with the same data and budget as our penalized variant. Our variant must stay within a small V-Measure tolerance of it, fixed in advance at one point, while reducing bias.

WRING applied after ModGap. This is the strongest post-hoc debiaser. No numerical result is available for it here: no reported result found on Lacuna for WRING on FairFace or Spawrious beyond near-zero change in unconsidered bias. We run it with the same demographic subspace $D$, so both methods see identical attribute information.

The ablation $\mu$ only and $\lambda$ only. This is the ablation that isolates the key ingredient. It also checks whether a random subspace of matched dimension in place of $D$ gives the same effect. If it does, the demographic decomposition is doing nothing.

Why not just…?

Why not just raise the softmax temperature? Widening the gap may cut harm simply because image–text similarities become more uniform, so no trait wins decisively. This is the most serious threat, and the proposal is built to test it. We sweep temperature alone on unmodified CLIP and match arms on the entropy of their trait-prediction distributions. If temperature matched on entropy reproduces the denigration and task-to-attribute reductions of the gap shift, then the geometric story is wrong, and we will report it as the main finding. Temperature cannot change V-Measure, which is a distance-based clustering score, so it cannot reproduce the utility half of the result.

Why not just apply WRING and ignore the gap? WRING neutralizes per-embedding demographic components but is untested on the offset between modalities and on combination bias. Gap 2 of the literature notes that its single-subspace assumption is exactly where single-attribute fixes backfire. If ModGap plus WRING matches selective closure on every metric, the cheaper composition wins. That outcome would still answer the open question of whether gap closure creates bias that a post-hoc rotation can undo.

Why not just balance the fine-tuning data? Feature-Wise Bias Amplification shows that optimization over-weights weak, unevenly distributed features even with balanced labels. Men Also Do Laundry shows that combination bias survives balancing. We nonetheless include a gender-balanced MSCOCO resampling arm for the ModGap fine-tune, so the claim is tested rather than assumed.

Why not just calibrate thresholds? Directional Bias Amplification reduced amplification from 0.040 to 0.001 on COCO this way. We apply it to every arm's zero-shot object classifier. Calibration does not touch clustering, trait similarities, or caption leakage, and the causal analysis of thresholding shows that thresholds themselves create disparities. So we report it as a complement, not a competitor.

Decisive Checks

The idea survives only if three things hold together:

  1. In the factorial sweep, $\mu$ explains most of the variance in task-to-attribute amplification and denigration while $\lambda$ explains most of the variance in V-Measure.
  2. A random subspace of matched dimension in place of $D$ abolishes that separation.
  3. Temperature matched on entropy fails to reproduce the harm reduction.

Secondary checks are:

  • The penalized ModGap model keeps V-Measure within one point of plain ModGap.
  • Its captioner shows lower leakage than the plain ModGap captioner.
  • Multi-attribute amplification on MSCOCO does not rise relative to unmodified CLIP.

A rise in multi-attribute amplification would mean the demographic subspace is too narrow and that bias has migrated into combinations, the pattern documented for Data Repair.