Domain-Controlled Prompt Learning

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

Abstract

Large-scale vision-language models (VLMs) like CLIP exhibit impressive performance on natural images but often falter when applied to specialized domains such as remote sensing or medical imaging. This paper presents Domain-Controlled Prompt Learning (DCPL), a novel framework designed to bridge this gap. DCPL leverages domain-specific foundation models to guide the generation of prompts in both visual and linguistic branches. Furthermore, it introduces an adaptive noise-adding strategy to mitigate overfitting to base classes. Experimental results across eleven specialized datasets demonstrate that DCPL achieves state-of-the-art performance in few-shot generalization and cross-dataset transfer.

Introduction

The adaptation of pre-trained vision-language models to downstream tasks has seen significant progress through prompt learning techniques like CoOp and MaPLe. These methods optimize a small set of learnable vectors instead of full-model fine-tuning. However, they typically lack "domain-awareness," leading to suboptimal performance on specialized data where natural image priors do not fully apply. Moreover, these models often overfit to the specific classes seen during training, hindering their ability to generalize to novel classes within the same domain.

Methodology

The proposed Domain-Controlled Prompt Learning (DCPL) framework addresses these issues through two key components:

The DCPL architecture utilizes a domain-specific foundation model (LSDM) to generate domain biases for both text and image branches, complemented by a noise-adding strategy.
  1. Domain-Controlled Prompts via LSDM: DCPL incorporates a Large-Scale Specific Domain Foundation Model (LSDM)—such as LRSM for remote sensing—to serve as a domain expert. Features extracted by the LSDM are transformed via lightweight "control nets" into domain biases. These biases are then injected into the CLIP text encoder's context vectors and the visual encoder's feature space, effectively "steering" the generalist model toward domain-specific patterns.
  2. Noisy-Adding Strategy: Inspired by diffusion models, DCPL employs an adaptive Gaussian noise injection strategy during training. By adding noise to the domain-adaptive visual features, the model is encouraged to explore a broader feature space, preventing it from collapsing into narrow local minima associated with base classes. This "global domain oscillation" significantly enhances generalization to unseen novel classes.

Experimental Evaluation

DCPL was evaluated on two primary specialized domains:

  • Remote Sensing: Eight datasets including MLRSNet, RSICD, and NWPU.
  • Medical Imaging: Three datasets including BTMRI and CHMNIST.

The evaluation metrics focused on base-to-novel class generalization (16-shot), cross-dataset transfer, and overall domain robustness.

Results and Discussion

DCPL consistently outperformed previous state-of-the-art methods like MaPLe. In the remote sensing domain, DCPL achieved an average Harmonic Mean (HM) of 83.36%, representing a nearly 3% improvement over the previous SOTA.

Radar chart illustrating the performance of DCPL compared to CLIP, CoOp, and MaPLe across eight remote sensing datasets.

Key insights from the results include:

  • Multi-modal Bias: Injecting domain biases into both visual and language branches provides superior cross-modal alignment compared to text-only prompting.
  • Regularization via Noise: The noise-adding strategy proved more effective than standard dropout, contributing to a 1.87% performance gain in remote sensing tasks.
  • Model Scaling: Interestingly, using more complex visual backbones like ViTAE did not necessarily improve performance, suggesting a saturation point in the capacity of prompt-based domain adaptation.

Conclusion

Domain-Controlled Prompt Learning provides a robust mechanism for adapting general-purpose VLMs to specialized domains. By integrating domain-specific expertise and a novel noise-based regularization strategy, DCPL sets a new benchmark for few-shot generalization in fields like remote sensing and medical imaging. Future research will focus on reducing the computational footprint of the LSDM during inference.

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