TransAgent: Transfer Vision-Language Foundation Models with Heterogeneous Agent Collaboration

Yiwei Guo, Shaobin Zhuang, Kunchang Li, Yu Qiao, Yali Wang

TL;DR

TransAgent is a novel framework that significantly boosts the performance of vision-language models like CLIP by "distilling" the collective wisdom of 11 specialized expert models into CLIP’s learnable prompts. It achieves state-of-the-art results on 11 benchmarks—including a massive 20% improvement on satellite imagery—all while maintaining the same fast inference speed as the original zero-shot CLIP model.

The Generalist Problem in Vision-Language Models

Vision-language foundation models (VLMs) like CLIP are the Swiss Army knives of AI. Because they are trained on massive, noisy datasets from the web, they possess broad general knowledge. However, this "generalist" nature becomes a liability when the models are faced with highly specific, out-of-distribution data, such as satellite imagery (e.g., EuroSAT) or specialized medical scans.

Researchers typically address this by fine-tuning the model or using "prompt learning." Yet, a single model's internal knowledge is inherently limited. Conversely, the AI community has developed dozens of "expert" models specialized in specific tasks: object detection (SAM), self-supervised vision (DINO), or advanced reasoning (GPT-3). The challenge is that these experts are "isolated agents." They feature heterogeneous architectures and output formats, making it incredibly difficult and computationally expensive to integrate them into a single, cohesive pipeline.

The TransAgent Framework

To solve this, researchers introduce TransAgent, a framework that treats these heterogeneous experts as "teachers" for a CLIP "student." The core innovation lies in harmonizing knowledge from 11 different agents across three distinct modalities.

Overview of the TransAgent framework
  1. Vision Agent Collaboration (VAC): Utilizes models like DINO, MAE, ViTDet, and SAM to provide detailed spatial and structural knowledge that CLIP’s global image features might otherwise miss.
  2. Language Agent Collaboration (LAC): Employs Large Language Models (LLMs) like GPT-3 and Vicuna, alongside BERT, to generate rich, descriptive text about categories (e.g., "What does a Pomeranian look like?") rather than relying on simple, isolated class names.
  3. Multi-modal Agent Collaboration (MAC): Leverages generative models (like Stable Diffusion and PixArt-α) and captioning models (like BLIP-2 and Shikra) to align visual and textual concepts through unified score vectors.

To manage this diverse crowd of experts, TransAgent uses a Mixture-of-Agents (MoA) gating mechanism. This smart weighting system learns which expert to trust for a specific dataset or task. Most importantly, this aggregated knowledge is distilled directly into CLIP’s learnable prompts during the training phase. Once training is complete, the 11 expert models can be "unloaded." The user is left with an enhanced CLIP model that achieves deployment efficiency with zero extra computational cost at runtime.

Key Insights and Innovations

  • Latent Features as a Universal Language: Instead of trying to combine the final, incompatible outputs of different models (e.g., a bounding box from one and a sentence from another), TransAgent distills knowledge at the latent representation level. This allows heterogeneous models to communicate in a unified feature space.
  • The "Ensemble-Free" Advantage: Traditional agent-based methods usually require running an ensemble of models during inference, which is slow and memory-intensive. TransAgent proves that you can bake the "wisdom of the crowd" into a single model's prompts, securing ensemble-level performance at single-model speeds.
  • Adaptive Expertise: The gating mechanism is dynamic. The model naturally learns to rely on different experts for different tasks—for example, leaning heavily on DINO for general object recognition, but switching to other experts for fine-grained textures.

Key Results

The researchers evaluated TransAgent on a diverse battery of 11 visual recognition datasets, ranging from general/fine-grained tasks (ImageNet, OxfordPets, StanfordCars) to specialized domains (DTD, EuroSAT, UCF101).

Comparison of TransAgent with state-of-the-art methods
  • State-of-the-Art Performance: TransAgent outperformed popular methods like CoOp, MaPLe, and PromptSRC across all 11 datasets. As shown in the comparison, it is the only method to achieve knowledge versatility, transfer flexibility, and deployment efficiency simultaneously.
  • Crushing Domain Shifts: On the EuroSAT dataset (satellite images), TransAgent outperformed CoOp by a staggering 20%. Under low-shot settings, it provided an average 10% boost over standard prompt learning methods.
  • Unmatched Efficiency: While a competing ensemble method (CaFo) took over 16 minutes to process the ImageNet test set, TransAgent finished in just 2 minutes and 35 seconds—nearly as fast as the original zero-shot CLIP (1m 06s).

Limitations and Future Work

While distillation is powerful, the authors acknowledge a potential risk: if an agent's knowledge is irrelevant or "noisy" for a specific task, it could theoretically harm CLIP's original representations. Furthermore, the current setup still relies on labeled data for the distillation process.

Moving forward, the team aims to explore ways to integrate this multi-agent knowledge with "directed focus," potentially allowing the model to adapt even when domain-specific labels are absent. They also plan to investigate more data-efficient ways to leverage these heavy-duty experts.

Summary updated

BibTeX
@inproceedings{guo2024transagent,
  author = {Yiwei Guo and Shaobin Zhuang and Kunchang Li and Yu Qiao and Yali Wang},
  title = {{TransAgent: Transfer Vision-Language Foundation Models with Heterogeneous Agent Collaboration}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=tnQbciDjVf},
}
Figure