EPIC: Efficient Prompt Interaction for Text-Image Classification

Xinyao Yu, Hao Sun, Zeyu Ling, Ziwei Niu, Zhenjia Bai, Rui Qin, Yen-Wei Chen, Lanfen LinarXiv 2025

TL;DR

EPIC (Efficient Prompt Interaction for Text-Image Classification) is a novel, parameter-efficient fine-tuning strategy for Large Multimodal Models (LMMs). By introducing "temporal prompts" in intermediate layers and routing them through a lightweight "Interaction Hub," EPIC enables direct cross-modal communication using only ~1% of the foundation model's trainable parameters. This approach achieves state-of-the-art performance among prompt-based methods on multiple text-image classification benchmarks while drastically reducing training memory overhead.

What Problem Does This Paper Address?

Fine-tuning Large Multimodal Models (LMMs) for downstream tasks like text-image classification yields excellent results but comes with a massive computational and memory tax. To avoid updating billions of parameters, researchers often turn to prompt tuning.

However, existing prompt-based methods suffer from a key dilemma:

  1. Prefix-based alignment: Prompts are only added at the input level, leading to insufficient deep cross-modal interaction as information flows through the network.
  2. Intermediate prompt tuning: Prompts are introduced at intermediate layers but lack direct interaction with each other, forcing them to rely on complex, disentangled architectures or weak implicit alignment.

EPIC addresses this gap by allowing intermediate prompt vectors from different modalities (vision and text) to interact directly with one another, establishing a bidirectional information highway without the need to update the heavy underlying model backbones.

Fig. 1: Comparisons among existing prompt-based interaction strategies (a)/(b), and our proposed strategy (c). (a) extracts unimodal representations separately and then utilizes prompt vectors to align the extracted representations with PLM. (b) leverages prompt vectors for each branch of the model, and utilizes the prompts to deliver information from the other branch on intermediate layers. In our proposed EPIC (c), prompt vectors are leveraged for each modality on intermediate layers, and are then interacted to produce prompts of the next layer. Direct interactions of prompts from different branches allow interactions between modalities.

Methods

The core architecture of EPIC relies on a frozen LMM foundation model (such as CLIP ViT-L/14) augmented by two key components:

  1. Temporal Prompts: Trainable prompt tokens are appended to the intermediate layers (interaction layers) of both the visual and textual branches. As tokens pass through an encoder layer, these prompts perform self-attention alongside the modality-specific features, effectively "absorbing" the contextual information of that layer.
  2. Interaction Hub: Instead of letting the dense image and text features perform expensive cross-attention, EPIC routes only the lightweight temporal prompts into an Interaction Hub.

Inside the Interaction Hub, the model computes similarity matrices (typically using cosine similarity) to evaluate both intra-modality relevance (what to keep from the current modality) and inter-modality relevance (what to pull from the other modality). This generates soft activation gates ($z_m^l$ and $r_m^l$) that fuse the information, producing updated prompts for the next layer.

Crucially, only the prompt tokens and the small projection blocks inside the Interaction Hub are trainable, keeping the foundation model entirely frozen.

Fig. 1: Comparisons among existing prompt-based interaction strategies (a)/(b), and our proposed strategy (c). (a) extracts unimodal representations separately and then utilizes prompt vectors to align the extracted representations with PLM. (b) leverages prompt vectors for each branch of the model, and utilizes the prompts to deliver information from the other branch on intermediate layers. In our proposed EPIC (c), prompt vectors are leveraged for each modality on intermediate layers, and are then interacted to produce prompts of the next layer. Direct interactions of prompts from different branches allow interactions between modalities.

Datasets

The authors evaluated EPIC on three distinct text-image classification benchmarks:

  • UPMC-Food101: A fine-grained, uni-label text-image food classification dataset containing 67,971 training and 22,715 testing pairs.
  • MM-IMDB: A mainstream multi-label dataset for movie genre classification based on movie posters and plot summaries, containing 25,956 pairs.
  • SNLI-VE: A large-scale visual entailment dataset containing 565,286 image-text pairs, where the task is to determine if a text hypothesis relates to an image premise via entailment, neutrality, or contradiction.

Key Insights and Ideas

  • Prompts as a Communication Channel: Instead of treating prompts merely as static instructions or prefix modifiers, EPIC treats them as dynamic, lightweight proxies for the modalities themselves. Direct prompt-to-prompt interaction bypasses the need for heavy cross-modal attention over large feature maps.
  • The Power of Mid-Level Interaction: Ablation studies revealed that cross-modal prompt interaction is most effective when conducted at mid-level layers (specifically layers 4, 5, and 6 in their setup).
  • Simplicity Wins: By using a unified prompt vector that handles both context retention and cross-modal fusion via similarity gating, EPIC avoids the architectural complexity of methods that split prompts into multiple distinct functional types.

Key Results

  • Parameter Efficiency: EPIC requires updating only 2.0 million parameters, which represents roughly 1% of the foundation model's total parameters.
  • State-of-the-Art Accuracy: On UPMC-Food101, EPIC achieved 93.95% accuracy, outperforming existing prompt-tuning methods like MaPLe (90.80%) and PMF (91.96%). On SNLI-VE, it achieved a SOTA accuracy of 73.45%.
  • Memory Savings: EPIC-base cut training memory usage down significantly compared to competitive methods, while a stripped-down version ("EPIC-small", using only one interaction layer) reduced training memory even further (to 11.35 GB) while maintaining highly competitive performance.

Limitations and Future Work

While EPIC demonstrates strong efficiency gains, the paper focuses exclusively on text-image classification tasks. The authors do not explore how this prompt-interaction mechanism scales to more open-ended multimodal tasks such as image captioning, visual question answering (VQA), or text-to-image generation. Additionally, finding the optimal interaction layers and similarity metrics currently requires empirical search, suggesting that automated or adaptive layer selection could be a valuable direction for future research.

Summary updated

BibTeX
@misc{yu2025epic,
  author = {Xinyao Yu and Hao Sun and Zeyu Ling and Ziwei Niu and Zhenjia Bai and Rui Qin and Yen-Wei Chen and Lanfen Lin},
  title = {{EPIC: Efficient Prompt Interaction for Text-Image Classification}},
  year = {2025},
  eprint = {2507.07415},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.07415},
}

Loading related content...

Figure