NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

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

Hani Alomari, Md Atabuzzaman, Chris ThomasarXiv 2026

Imagine you’re trying to organize a massive library where books are in one wing and photos are in another. You’ve built a high-tech search system (like CLIP) to find the photo that matches a book’s description. But there’s a weird quirk: the system keeps suggesting the same few "popular" photos for almost every book, even when they don't match.

In the world of AI, this is known as hubness, and it’s often blamed on the modality gap—the fact that image and text embeddings live in two separate "neighborhoods" in the model's mind. The common wisdom? "Close the gap!"

This paper, TowerBridge, argues that closing the gap is actually a mistake. Instead, you just need to "shrink" the specific directions where the model gets confused.

TL;DR

Instead of forcing images and text to occupy the exact same space, TowerBridge identifies specific mathematical directions where models consistently favor wrong matches. By mildly shrinking these directions using a simple, closed-form weight edit—discovered by an LLM agent—the researchers significantly boosted retrieval performance across dozens of models without any expensive retraining.

What Problem Does This Paper Address?

Dual-encoder models like CLIP are the backbone of modern image search. They map images and text into a shared space so we can calculate how similar they are. However, these models suffer from two main issues:

  1. The Modality Gap: Image and text embeddings are physically separated in the vector space.
  2. Hard Negatives & Hubness: Certain images (hubs) get high similarity scores for many unrelated captions, causing the "correct" match to be ranked lower.

Previous attempts to fix this usually involved "closing the gap" by shifting the embeddings closer together. But the authors found a surprising result: completely removing the gap actually makes retrieval worse. The challenge was finding a way to fix the errors (the "hard negatives") without destroying the useful structure the model had already learned.

Methods

The authors took a unique approach called Weight-Space Programming. Instead of traditional fine-tuning (which uses backpropagation and lots of GPU hours), they used an LLM agent named Astra to act as a "model surgeon."

  1. The Paired Statistic (D): They developed a mathematical tool that identifies directions in the embedding space where the model's image and text towers agree more on wrong matches than on correct ones.
  2. LLM-Guided Surgery: Astra inspected the model's weights and used the statistic D to write short Python programs that edit the model's weights directly.
  3. The TowerBridge Recipe: They distilled Astra’s best moves into a simple, two-round "recipe" that anyone can apply to a CLIP model in seconds:
  4. Round 1: Identify the directions favoring hard negatives and shrink them by 10%.
  5. Round 2: Re-calculate which images are now the "hardest" negatives and apply a smaller 5% shrink.
The TowerBridge workflow: from identifying bad directions to the final refined model.

Datasets

The researchers evaluated their method on a wide variety of benchmarks:

  • COCO & Flickr30k: The gold standards for image-text retrieval.
  • ImageNet: Used as an "accuracy guard" to ensure the edits didn't break the model's ability to classify objects.
  • SugarCrepe: A benchmark for testing if the model actually understands the relationship between objects (e.g., "man biting dog" vs. "dog biting man").

Key Insights and Ideas

  • Shrink, Don't Remove: The most important "aha" moment was that the directions causing errors actually contain useful information. If you delete them, performance tanks. If you just "turn the volume down" (attenuate) by 10%, the correct matches suddenly pop to the top.
  • The Gap is a Feature, Not a Bug: The modality gap itself isn't the enemy. As shown in Figure 5, shrinking the gap slightly helps, but removing it entirely is disastrous.
  • Hubs are Predictable: Hubness (the "popular photo" problem) is concentrated in specific mathematical directions. By targeting these, they reduced the number of times a search "miss" landed on a hub from 28% to 19%.
Comparison showing how shrinking bad directions helps while removing them hurts.

Key Results

TowerBridge is remarkably effective for such a lightweight fix:

  • Universal Improvement: It improved retrieval on all 21 CLIP checkpoints tested, including models the agent had never seen before.
  • Big Gains: On the COCO dataset, it improved the RSUM (a combined recall metric) by an average of 16.8 points.
  • Zero Cost: Because it edits the weights of the existing output layers, there is zero additional cost during inference. The model isn't any bigger or slower; it's just smarter.
  • Visual Proof: In Figure 6, you can see how TowerBridge replaces a generic "hub" image (like a random clock) with the actual correct match for a specific caption.
Qualitative examples where TowerBridge fixes retrieval errors by replacing hubs with correct matches.

Limitations and Future Work

While TowerBridge is a powerful "patch," the authors note a few constraints:

  • Requires Labeled Data: You need about 25,000 labeled image-text pairs to calculate the statistic D (though these don't have to be the same ones the model was trained on).
  • Dual-Encoder Focus: The current recipe is specifically designed for CLIP-style dual encoders.
  • Future Directions: The authors suggest that this "weight-space programming" approach could be used to fix other model biases or even adapt models to entirely new domains (like medical imaging) without full retraining.

Summary updated

BibTeX
@misc{alomari2026towerbridge,
  author = {Hani Alomari and Md Atabuzzaman and Chris Thomas},
  title = {{TowerBridge: Bridging the Dual-Encoder Modality Gap via Weight-Space Programming}},
  year = {2026},
  eprint = {2611.31233},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.31233},
}
Figure