MADTP: Multimodal Alignment-Guided Dynamic Token Pruning for Accelerating Vision-Language Transformer

Jianjian Cao, Peng Ye, Shengze Li, Chong Yu, Yansong Tang, Jiwen Lu, Tao Chen

TL;DR

MADTP is a novel framework that significantly accelerates Vision-Language Transformers (VLTs) by dynamically pruning redundant visual and textual tokens. By explicitly aligning modalities and adapting pruning ratios to the complexity of individual input samples, it reduces computational costs (GFLOPs) by up to 80% with less than a 4% drop in performance.

What Problem Does This Paper Address?

Vision-Language Transformers (VLTs) like CLIP and BLIP have revolutionized multimodal tasks, but their massive computational footprint—driven by processing hundreds of image patches and text tokens—makes them difficult to deploy in real-world applications.

Existing attempts to speed them up via "token pruning" (discarding less important data) suffer from two main flaws:

  1. Modality Blindness: Most methods prune tokens based on a single modality. This can lead to "false pruning," where a visual token is discarded because it looks unimportant in isolation, even though it is semantically critical for understanding the accompanying text.
  2. Static Rigidity: Current methods often use a fixed pruning ratio for every input. In reality, a simple image of a "balloon in the sky" requires far less computation than a complex scene of "zebras splashing in water."

Methods

The authors introduce the Multimodal Alignment-Guided Dynamic Token Pruning (MADTP) framework, which consists of two primary innovations:

  • Multi-modality Alignment Guidance (MAG) Module: This module uses a set of learnable tokens to act as a "common ground" between vision and language. It explicitly aligns features of the same semantic concept across modalities. This ensures that the importance of a token is judged by its relevance to the entire multimodal context, not just its own branch.
  • Dynamic Token Pruning (DTP) Module: Instead of a fixed pruning rate, DTP uses a learnable threshold to decide how many tokens to keep for a specific input. It calculates a Token Importance Score (TIS) by averaging class attention, self-attention, and the new cross-modal alignment scores.
Figure 2. Overview of the proposed MADTP framework. It comprises two main components: the Multi-modality Alignment Guidance (MAG) module and the Dynamic Token Pruning (DTP) module. The MAG module is placed between the vision and language branches in VLTs, facilitating explicit alignment of representations across modalities and offering guidance for token pruning. Meanwhile, the DTP module is incorporated within each transformer block, allowing for dynamic token pruning based on the complexity of input instances.

Datasets

The framework was evaluated across four major multimodal benchmarks:

  • NLVR2: For visual reasoning tasks.
  • COCO: Used for both image-text retrieval and image captioning.
  • Flickr30k: Primarily for image-text retrieval.
  • VQA v2.0: For visual question answering.

Key Insights and Ideas

  • Alignment is the "Secret Sauce": The core "aha moment" is that effective pruning in VLTs requires understanding the relationship between modalities. By forcing the model to align features during training (using a similarity loss), the pruning process becomes much more surgical.
  • Instance-Aware Complexity: The model learns that not all inputs are created equal. "Easy" samples can be pruned aggressively early in the network, while "Hard" samples retain more tokens for longer to preserve detail.
  • Avoiding Information Loss: Rather than just deleting tokens, MADTP adopts a strategy where pruned tokens are weighted and aggregated into a single "summary" token that is added back to the retained set, minimizing the loss of background information.
Visualization shows that MADTP successfully retains critical details (like a panda's paws) that static methods might prune, thanks to its alignment guidance.

Key Results

MADTP consistently outperforms state-of-the-art compression methods like UPop across various tasks:

  • Efficiency vs. Accuracy: On the NLVR2 dataset with the BLIP model, MADTP achieved an 80% reduction in GFLOPs while maintaining a test accuracy of 79.22% (only a ~3.8% drop from the uncompressed baseline).
  • Superior Trade-offs: As shown in Figure 1, MADTP maintains a significantly higher accuracy-to-computation curve compared to static pruning (STP) and other unified pruning methods.
  • Retrieval Tasks: On COCO (5K test set), MADTP improved Image-to-Text Recall@1 by 10% compared to UPop at high compression ratios (0.75), while using fewer GFLOPs.
Figure 1. Comparison between our MADTP and other compres- sion methods for the BLIP model tested on the NLVR2 dataset. STP represents the Static Token Pruning method, and MAG de- notes our Multi-modality Alignment Guidance module.

Limitations and Future Work

While MADTP drastically reduces computational operations (GFLOPs), it focuses on token pruning and does not inherently reduce the total number of model parameters (weights). However, the authors demonstrate that MADTP is "orthogonal" to parameter pruning—meaning the two techniques can be combined for even greater efficiency.

The authors suggest that future work will involve integrating a parameter pruning scheme directly into the MADTP framework to create a truly comprehensive end-to-end VLT compression strategy.

Summary updated

BibTeX
@misc{cao2024madtp,
  author = {Jianjian Cao and Peng Ye and Shengze Li and Chong Yu and Yansong Tang and Jiwen Lu and Tao Chen},
  title = {{MADTP: Multimodal Alignment-Guided Dynamic Token Pruning for Accelerating Vision-Language Transformer}},
  year = {2024},
  eprint = {2403.02991},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.02991},
}
Figure