cs.CVNov 23, 2026

TowerBridge: Bridging the Dual-Encoder Modality Gap via Weight-Space Programming

Authors: Hani Alomari, Md Atabuzzaman, Chris Thomas

Organizations: Department of Computer Science, Virginia Tech

Abstract

CLIP-style dual encoders map images and text through two separate towers into a shared embedding space, where the two modalities occupy distinct regions separated by a modality gap. Retrieval fails when wrong matches, or hard negatives, outrank the correct one, and the gap is the usual suspect. Yet removing it post hoc degrades retrieval on every CLIP checkpoint we test. We introduce a paired statistic that identifies directions where the two towers agree more on hard negatives than on matched pairs. Mildly attenuating these directions improves retrieval while largely preserving the gap. We arrive at this correction through weight-space programming: guided by the statistic, an LLM agent inspects both towers and writes closed-form weight edits without backpropagation. Free to edit any component, the agent improves COCO test retrieval on all 13 CLIP checkpoints and edits an output projection in 12 of the 13. We distill and refine its recurring correction into TowerBridge, a closed-form recipe motivated by a first-order analysis of the hard-negative margin. Computed in seconds from 25,000 labelled pairs, it requires no model-specific tuning and leaves the architecture and inference cost unchanged. TowerBridge improves COCO test retrieval by 16.8 RSUM and Flickr30k test retrieval by 6.6 on average across all 21 evaluated CLIP checkpoints, including 8 unseen by the agent, while limiting any drop in ImageNet zero-shot accuracy to 0.5 points. It also reduces hubness on all 21 checkpoints and improves retrieval on 4 of 5 dual encoders from other families.

Figures & tables

Explore similar work

CardsList
  1. Similarity Is Not Logic: Factored Inference for Dual-Encoder Vision-Language Models

    Jul 25, 2026Sultan Alshehri, Zhantao Yang, Han Zhang +1Vision-Language ModelsVLM Reasoning

  2. What CLIP Knows but Cannot Say: Recovering Negation from Frozen Intermediate Features

    Jul 25, 2026Chen-Yi Lu, Yueh-Shao Chen, Somali ChaterjiVision-Language ModelsVLM Adaptation

  3. Revisiting Compositionality in Dual-Encoder Vision-Language Models: The Role of Inference

    Apr 13, 2026Imanol Miranda, Ander Salaberria, Eneko Agirre +1Compositional Reasoning in VLMsVision-Language Models