Deeply Coupled Cross-Modal Prompt Learning

Xuejing Liu, Wei Tang, Jinghui Lu, Rui Zhao, Zhaojun Guo, Fei Tan

Abstract

Recent advancements in multimodal foundation models (e.g., CLIP) have excelled in zero-shot generalization. Prompt tuning involved in the knowledge transfer from foundation models to downstream tasks has gained significant attention recently. Existing prompt-tuning methods in cross-modal learning, however, either solely focus on language branch, or learn vision-language interaction in a shallow mechanism. In this context, we propose a Deeply coupled Cross-modal Prompt learning (DCP) method based on CLIP. DCP flexibly accommodates the interplay between vision and language with a Cross-Modal Prompt Attention (CMPA) mechanism, which enables the mutual exchange of respective representation through a well-connected multi-head attention module progressively and strongly. We then conduct comprehensive few-shot learning experiments on 11 image classification datasets and analyze the robustness to domain shift as well. Thorough experimental analysis evidently demonstrates the superb few-shot generalization and compelling domain adaption capacity of a well-executed DCP.

Introduction

Large-scale multimodal models like CLIP have revolutionized zero-shot learning, yet adapting these foundation models to specific downstream tasks remains a challenge. Traditional full fine-tuning is computationally prohibitive and risks "catastrophic forgetting," where the model loses its broad pre-trained knowledge.

Prompt tuning has emerged as an efficient alternative, learning a small set of "prompt" tokens to guide the model's frozen weights. However, existing methods are often limited in their interaction scope. For instance, CoOp focuses exclusively on the text branch, while MaPLe, though multimodal, utilizes a "shallow" or unidirectional interaction—often projecting text prompts into visual space via a simple linear layer. This paper introduces Deeply coupled Cross-modal Prompt learning (DCP) to bridge this gap by facilitating deep, mutual communication between vision and language branches during adaptation.

Methodology: Cross-Modal Prompt Attention

The core of DCP is the Cross-Modal Prompt Attention (CMPA) mechanism, designed to allow visual and textual prompts to interact deeply across multiple layers of the CLIP architecture.

The DCP architecture featuring the Cross-Modal Prompt Attention (CMPA) mechanism.

DCP employs three key strategies:

  1. Deep Prompting: Unlike input-only prompting, DCP inserts learnable prompts into every layer of both the vision and language encoders.
  2. Mutual Exchange: The CMPA module uses a multi-head attention mechanism where prompts from the previous layer serve as inputs to generate prompts for the subsequent layer. This ensures that visual prompts are contextually informed by text, and vice versa, in a simultaneous fashion.
  3. Parameter Efficiency: To maintain a lightweight footprint, CMPA modules share parameters across layers. This constraint not only reduces the parameter count but also focuses the interaction, often leading to better generalization.

Experimental Evaluation

The researchers evaluated DCP across 11 diverse image classification datasets, ranging from generic objects (ImageNet, Caltech101) to fine-grained categories (OxfordPets, StanfordCars, FGVCAircraft) and specialized domains like satellite imagery (EuroSAT) and action recognition (UCF101).

Few-Shot Performance

DCP consistently establishes a new state-of-the-art in few-shot learning. On average across 11 datasets, DCP outperformed the previous leading method, MaPLe, with accuracy gains ranging from +1.72% to +3.19% across 1, 2, 4, 8, and 16-shot settings.

Few-shot classification performance of DCP compared to other methods across 11 datasets.

The model shows particular strength in fine-grained classification tasks, such as Flowers102 and FGVCAircraft. This suggests that deep cross-modal coupling is essential for capturing the subtle features required to distinguish closely related categories.

Robustness and Domain Generalization

To test robustness to domain shift, DCP was trained on ImageNet and evaluated on variants like ImageNet-V2, -Sketch, -Adversarial, and -Rendition. The results indicate that DCP maintains competitive performance, proving that its deep coupling does not compromise the model's inherent out-of-distribution robustness.

Discussion and Conclusion

The success of DCP underscores that the interaction between vision and language should be both "deep" (multi-layer) and "broad" (mutually influential). While DCP excels in 16-shot scenarios, the authors noted that gains are more modest in 1-shot settings, likely due to the inherent difficulty of aligning modalities with extremely sparse data.

Future work may involve applying this deeply coupled approach to more complex multimodal tasks such as Visual Question Answering (VQA) or Image Retrieval, where the synergy between text and pixels is even more critical.

Code available at: https://github.com/GingL/CMPA

Summary updated

BibTeX
@inproceedings{liu2023deeply,
  author = {Xuejing Liu and Wei Tang and Jinghui Lu and Rui Zhao and Zhaojun Guo and Fei Tan},
  title = {{Deeply Coupled Cross-Modal Prompt Learning}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.504},
}
Figure