Generalizing Vision-Language Models with Dedicated Prompt Guidance

Xinyao Li, Yinjie Min, Hongbo Chen, Zhekai Du, Fengling Li, Jingjing Li

TL;DR

This paper introduces GuiDG, a novel framework for improving the domain generalization capabilities of Vision-Language Models (VLMs). By training specialized "expert" models for different source domains and then adaptively combining their knowledge using a Cross-Modal Attention mechanism, GuiDG achieves better performance on unseen domains compared to traditional methods that fine-tune a single universal model.

What Problem Does This Paper Address?

Large pre-trained Vision-Language Models (VLMs) like CLIP are powerful but struggle to generalize well to new, unseen domains after fine-tuning. The common practice of fine-tuning a single, universal model on all available source data often leads to overfitting to those specific domains, sacrificing the ability to perform well on data with different characteristics. This creates a trade-off between domain specificity and domain generalization. The paper aims to bridge this gap by developing a method that can adapt VLMs to new domains without losing their generalizability.

Methods

The proposed framework, GuiDG, operates in two main steps:

  1. Training Domain Experts: Instead of fine-tuning a single VLM, GuiDG first partitions the source data by domain. For each domain, it trains a parameter-efficient "expert" model using prompt tuning. This allows each expert to specialize in a particular domain's characteristics while keeping the core VLM largely frozen.
  2. Domain-Expert-Guided Fine-Tuning: In the second step, these domain experts are frozen. A novel Cross-Modal Attention (CMAttn) module is introduced. This module learns to dynamically assign weights to the outputs of each domain expert based on the input query. These weights are then used to guide the fine-tuning of the VLM's vision encoder, effectively aggregating the specialized knowledge from the experts. This adaptive integration helps the VLM generalize better to unseen target domains.

Datasets

The paper evaluates GuiDG on several standard domain generalization benchmarks:

  • OfficeHome: Includes 4 domains with 65 categories.
  • VLCS: Includes 4 domains with 5 classes.
  • PACS: Includes 4 art-style domains with 7 classes.
  • DomainNet: A large-scale dataset with 6 domains and 345 categories.
  • TerraIncognita: Includes 10 classes of animal pictures from 4 different locations.

Additionally, the authors introduce ImageNet-DG, a new benchmark constructed from ImageNet and its variants (ImageNet-A, ImageNet-R, ImageNet-S, ImageNet-V2). This dataset is designed to better evaluate few-shot domain generalization with modern VLMs, as existing benchmarks were found to be less challenging for these models.

Key Insights and Ideas

  • Theoretical Justification for Ensemble: The paper provides theoretical analysis showing that training multiple parameter-efficient expert models on partitioned source domains can lead to lower generalization risks than fine-tuning a single universal model. This provides a strong rationale for the "divide and conquer" approach.
  • Adaptive Expert Integration: The core innovation is the Cross-Modal Attention module, which learns to intelligently weigh the contributions of domain experts. This is more effective than simple averaging, as it can dynamically adapt to the compatibility of experts with the input.
  • Parameter Efficiency: By using prompt tuning for domain experts and a relatively small CMAttn module, GuiDG introduces a modest number of additional parameters (around 1M), making it efficient and compatible with large VLMs.
  • Few-Shot Generalization: GuiDG demonstrates significant improvements in few-shot settings, where limited training data often hinders generalization. The specialized experts help mitigate the performance drop in these scenarios.

Key Results

  • GuiDG consistently outperforms state-of-the-art domain generalization methods across standard benchmarks like OfficeHome, VLCS, PACS, and DomainNet.
  • On the newly proposed ImageNet-DG benchmark, GuiDG shows substantial improvements, with its 8-shot performance even surpassing baseline methods' 16-shot performance.
  • The method achieves new state-of-the-art results on several datasets, particularly in few-shot generalization scenarios.
  • Ablation studies confirm the effectiveness of both the domain expert training and the adaptive integration via CMAttn.

Limitations and Future Work

  • Theoretical Assumptions: The theoretical analysis relies on certain assumptions about hypothesis spaces and data distributions, which may not always hold in practice.
  • Domain Partitioning: The effectiveness of the method depends on the ability to partition source data into meaningful domains. For single-source DG tasks, the authors explore pseudo-domain creation, but this might not fully capture the benefits of distinct source domains.
  • Compatibility with Other Techniques: The paper mentions that GuiDG is compatible with other generalization techniques (like UEO, CLIPood, WiSE-FT) and suggests that combining them could further improve performance. This indicates a potential avenue for future research.

Summary updated

BibTeX
@inproceedings{li2026generalizing,
  author = {Xinyao Li and Yinjie Min and Hongbo Chen and Zhekai Du and Fengling Li and Jingjing Li},
  title = {{Generalizing Vision-Language Models with Dedicated Prompt Guidance}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i28.39492},
}
Figure