ModalPrompt: Towards Efficient Multimodal Continual Instruction Tuning with Dual-Modality Guided Prompt

Fanhu Zeng, Fei Zhu, Haiyang Guo, Xu-Yao Zhang, Cheng-Lin LiuarXiv 2024

TL;DR

ModalPrompt is a novel prompt-learning framework designed to stop Large Multimodal Models (LMMs) from forgetting old tasks as they learn new ones sequentially. By leveraging frozen CLIP features to dynamically fuse and select task-specific prompts based on both image and text inputs, it achieves a +14.26% average performance boost over existing methods while delivering a 1.42× inference speedup without expanding computational complexity.

What Problem Does This Paper Address?

Large Multimodal Models (LMMs) excel at multi-tasking when trained on mixed datasets. However, in real-world deployments, models must learn new tasks sequentially—a paradigm known as Multimodal Continual Instruction Tuning (MCIT).

When fine-tuned on a new task, LMMs suffer from catastrophic forgetting, erasing previously acquired knowledge. Existing approaches typically tackle this by adding separate lightweight components (like LoRA adapters) for each new task. While effective at preserving old knowledge, this causes the model's size and inference time to scale linearly with the number of tasks ($O(T)$ complexity). As more tasks are added, the storage and computational costs become unsustainable. Furthermore, existing methods adapted from text-only language models fail to fully exploit visual features to guide task selection.

Methods

ModalPrompt introduces a parameter-efficient prompt-learning framework that keeps the core LMM frozen and manages complexity through Dual-Modality Guidance.

Figure 1: Diagram of model expansion method and our method. With natural attribute of multimodal guidance, we enhance MCIT with knowledge transfer and manage complexity against linear growth.

The framework operates in three main phases:

  1. Feature Extraction & Alignment: For every task, the model learns a small set of task-specific prompts. A lightweight projection layer maps these prompts into "prototype features" within a shared vision-language space. Concurrently, an off-the-shelf, frozen CLIP encoder extracts multimodal features from the current image and text inputs.
  2. Multi-Task Prompt Fusion (Training): To encourage knowledge transfer, the model computes the cosine similarity between the input features and the prompt prototype features. During training, the top-$k$ most similar prompts are fused together, allowing the model to share common sense across related tasks.
  3. Dual-Modality Prompt Selection (Inference): During evaluation, the model uses the same dual-modality similarity metric to select only the top-$k$ most relevant prompts as prefixes for the language model. This bounds the inference complexity to a constant $O(k)$ rather than $O(T)$, preventing computational bloat.
Detailed architecture of ModalPrompt showing prompt fusion, selection, and response generation.

Datasets

The authors evaluated their method using the CoIN benchmark, a comprehensive MCIT dataset suite. It consists of 8 diverse vision-language instruction datasets spanning visual question answering, reasoning, classification, and grounding:

  • ScienceQA (Science knowledge)
  • TextVQA (Text reading in images)
  • ImageNet (Image classification)
  • GQA (Visual reasoning)
  • VizWiz (VQA for the visually impaired)
  • RefCoco / REC (Visual grounding)
  • VQAv2 (General VQA)
  • OCRVQA (Text-based VQA)

Key Insights and Ideas

  • The Power of Two Modalities: Relying on text or image features alone for task routing underperforms. Dual-modality guidance is essential because visual context often provides critical clues about the nature of the task that text instructions omit.
  • Breaking the Linear Scaling Bottleneck: By framing prompt selection as a top-$k$ retrieval problem based on input similarity, ModalPrompt decouples inference latency from the total number of learned tasks.
  • Asymmetric Task Similarity: The similarity matrix reveals that knowledge transfer is directional. For instance, complex reasoning tasks (like GQA) generate prototype features that are highly similar to simpler tasks, but not vice versa, indicating a structural hierarchy in learned prompts.

Key Results

ModalPrompt was tested against state-of-the-art continual learning methods (including MoELoRA and CODA-Prompt) using LLaVA and Qwen-VL architectures.

  • Superior Accuracy: It achieved a +9.60% gain in final task accuracy (Last) and a +14.26% gain in average accuracy (Avg) across the sequential pipeline compared to baseline methods.
  • High Efficiency: ModalPrompt requires training only 0.27% of total parameters—just 5% of the parameters required by MoELoRA.
  • Faster Throughput: It demonstrated a 1.42× inference speedup over MoELoRA, while reducing training time by 0.35× and GPU memory consumption by 0.92×.
Figure 3: Impact of prompt/LoRA number. We imple- ment different number of prompts for each task and different number of MoE for LoRA.

Limitations and Future Work

While ModalPrompt excels at mitigating catastrophic forgetting (backward transfer), the authors note that it currently falls short of enhancing performance on completely unseen tasks (forward transfer). Future work will focus on designing mechanisms to promote forward transfer, scaling up the model size, and validating the framework on a broader variety of LMM architectures.

Summary updated

BibTeX
@misc{zeng2024modalprompt,
  author = {Fanhu Zeng and Fei Zhu and Haiyang Guo and Xu-Yao Zhang and Cheng-Lin Liu},
  title = {{ModalPrompt: Towards Efficient Multimodal Continual Instruction Tuning with Dual-Modality Guided Prompt}},
  year = {2024},
  eprint = {2410.05849},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.05849},
}
Figure