Domain-Controlled Prompt Learning

Qinglong Cao, Zhengqin Xu, Yuntian Chen, Chao Ma, Xiaokang Yang

Large vision-language models (VLMs) like CLIP have changed the game for zero-shot image recognition. By learning from massive amounts of internet data, they develop a broad "common sense" about the natural world. However, when you ask CLIP to identify a specific type of brain tumor or a particular land-use category in a satellite image, that common sense often fails. The model tries to interpret these specialized domains through the lens of natural images, leading to suboptimal results.

A new paper, "Domain-Controlled Prompt Learning," introduces a framework called DCPL to bridge this gap, allowing VLMs to adapt to specialized domains without losing their generalization power.

TL;DR

DCPL adapts vision-language models to specialized domains (like medical or remote sensing) by injecting knowledge from domain-specific foundation models into both the visual and language branches. It further employs a novel "noisy-adding" strategy to prevent the model from overfitting to specific training classes, achieving state-of-the-art performance across 11 specialized datasets.

What Problem Does This Paper Address?

Standard prompt learning methods (like CoOp or MaPLe) focus on fine-tuning how a model "describes" or "looks at" images within the same general domain. However, they lack domain awareness.

When transitioning from natural images (cats, cars, sunsets) to specialized domains like Remote Sensing Images (RSIs) or Medical Imaging, the visual patterns are fundamentally different. A standard CLIP model might misinterpret a specialized feature because it’s trying to map it to a natural image pattern it saw during pre-training. Furthermore, these models suffer from a "base-to-novel" generalization gap: they get very good at the specific categories they were trained on (base) but lose the ability to recognize new, unseen categories (novel) within that same specialized domain.

Methods

The authors propose a two-pronged approach to solve this: Domain-Controlled Prompting and a Noisy-Adding Strategy.

Figure 2: Overview of our proposed Domain-Controlled Prompt Learning (DCPL) framework. Introducing the large-scale specific domain foundation model (LSDM) to provide domain foundation knowledge, DCPL provides domain-adaptive prompts to respectively control the visual and language branch in a directly incorporating manner. Additionally, a noisy-adding strategy is further proposed to help the model escape the suboptimal solution in a global domain oscillation manner.

1. Domain-Controlled Prompting

Instead of relying solely on CLIP, DCPL introduces a Large-scale Specific Domain foundation Model (LSDM). For remote sensing, they use models like LRSM; for medical images, they use MedSAM.

  • Knowledge Transfer: The LSDM extracts domain-specific features from the input image.
  • Control-Nets: Lightweight neural networks (Control-Nets) transform these features into "domain biases."
  • Dual-Branch Injection: These biases are directly incorporated into both the Language branch (modifying the learnable context vectors) and the Visual branch (modifying the image features). This ensures the model "thinks" and "sees" in the correct domain context.

2. Noisy-Adding Strategy

To fight overfitting, the authors look to diffusion models for inspiration. Instead of standard dropout (which is local), they add adaptive random Gaussian noise to the visual features. This "global domain oscillation" helps the model escape local minima (suboptimal solutions) during training, forcing it to explore a wider solution space that generalizes better to novel classes.

Datasets

The framework was rigorously tested on two main specialized areas:

  • Remote Sensing (8 datasets): MLRSNet, PatternNet, RSSCN7, AID, RSICD, UCM, WHURS19, and NWPU.
  • Medical Imaging (3 datasets): BTMRI (Brain Tumor MRI), CHMNIST (Colorectal Histology), and CCBTM (Crystal Clean Brain Tumors).

Evaluation focused on base-to-novel generalization, cross-dataset transfer, and domain generalization, using the Harmonic Mean (HM) of base and novel class accuracies as the primary metric.

Key Insights and Ideas

  • Domain Awareness is Essential: Simply tuning prompts isn't enough when the underlying data distribution shifts radically. By using a domain-specific "teacher" (the LSDM), the model gains the necessary context to interpret specialized pixels correctly.
  • Visual Control Matters More than Language: Ablation studies (Table 5 in the paper) showed that while controlling both branches is best, controlling the visual branch provided a significantly higher performance boost (+3.63% HM) compared to the language branch alone (+1.57% HM).
  • Global Noise vs. Local Sampling: The noisy-adding strategy consistently outperformed traditional techniques like dropout or mutation. By "shaking" the entire feature space, the model becomes more robust to the specific quirks of the training set.

Key Results

DCPL achieved new state-of-the-art results across the board.

Figure 1: Using RSIs as examples. Our method achieves state-of-the-art performance on 8 different RSIs datasets in harmonic mean (HM) for novel class generalization task.
  • Remote Sensing: On average across 8 datasets, DCPL improved the Harmonic Mean by 2.94% over the previous leader, MaPLe. On the RSICD dataset specifically, the gain was a massive 6.56%.
  • Medical Imaging: The method showed a 3.63% improvement in HM over previous methods, with a particularly strong showing in recognizing novel (unseen) medical categories (+4.35%).
  • Robustness: The noisy-adding strategy provided a consistent lift across almost all datasets, proving to be a generalized solution for the overfitting problem in prompt learning.
Ablation study showing the performance gain from the noise-adding strategy across different datasets.

Limitations and Future Work

The authors noted an interesting "upper limit" phenomenon: using a deeper, more complex architecture for the domain foundation model (like ViTAE) didn't always yield better results than a simpler ViT. This suggests that the way knowledge is transferred might be more important than the raw capacity of the teacher model.

Future work could explore more sophisticated ways to align these disparate foundation models or investigate if this "domain-control" approach can be extended to other modalities, such as specialized audio or sensor data.

Summary updated

BibTeX
@inproceedings{cao2024domain,
  author = {Qinglong Cao and Zhengqin Xu and Yuntian Chen and Chao Ma and Xiaokang Yang},
  title = {{Domain-Controlled Prompt Learning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i2.27853},
}
Figure