You Need Multiple Exiting: Dynamic Early Exiting for Accelerating Unified Vision Language Model

Shengkun Tang, Yaqing Wang, Zhenglun Kong, Tianchi Zhang, Yao Li, Caiwen Ding, Yanzhi Wang, Dongkuan Xu

Introduction

Large-scale Transformer models have revolutionized vision-language (VL) tasks, but their massive size makes them slow and expensive to deploy in real-time. A common observation in deep learning is that not every input is equally difficult; a simple classification doesn't require the same computational depth as a complex reasoning task.

"Early exiting" is a popular solution where a model stops computation once it is confident in an answer. However, existing methods face two major hurdles in unified VL architectures: the lack of a clear confidence metric for encoders (which don't produce final task outputs) and the component mismatch between encoder and decoder exiting strategies. Ignoring one half of the architecture leaves significant speedups on the table.

The MuE Framework

The authors introduce MuE (Multiple Exiting), a novel framework that accelerates unified vision-language models by dynamically skipping unnecessary layers in both the encoder and the decoder. MuE employs three key innovations to enable efficient inference:

  1. Modality Decomposition: Standard unified models fuse image and text tokens early. MuE "decomposes" the encoder, processing image and text tokens through separate (but parameter-tied) paths. This allows the model to exit the image encoder and text encoder at different depths depending on which modality is more complex for a specific input.
  2. Layer-wise Similarity (Saturation): Instead of using a separate classifier to guess confidence, MuE measures the Cosine Similarity between the hidden states of consecutive layers. If the representation stops changing significantly (reaches "saturation"), the model assumes further layers won't add value and skips them.
  3. Layer-wise Task Loss: To ensure that intermediate layers are actually capable of producing good results, the authors add a training objective that forces every single decoder layer to attempt the final task. This "prepares" the early layers to be useful exit points.
MuE architecture featuring modality decomposition and similarity-based early exiting.

Experimental Evaluation

The researchers evaluated MuE on two primary benchmarks representing different types of VL tasks: SNLI-VE (Visual Entailment) for classification and MS COCO (Image Captioning) for generative tasks.

Key Results

MuE significantly outperforms both static "tiny" models and existing dynamic exiting methods like DeeBERT and PABEE:

  • On SNLI-VE: MuE reduced expected inference time by 50% while maintaining 99% of the original model's accuracy (88.5% vs 89.2%).
  • On MS COCO: MuE achieved a 40.2% speedup while maintaining 96% of the CIDEr score (a common captioning metric).
  • Efficiency vs. Size: MuE outperformed "OFA-Tiny" (a smaller, static version of the base model). This proves that a large model choosing when to be "small" is more effective than a small model that is always small.
Performance comparison of MuE against baselines across different time reduction rates for both Accuracy and CIDEr.

Insights and Discussion

  • Saturation as a Reliable Proxy: The paper confirms that internal representation stability is a computationally cheap way to decide when to exit. Measuring this internal stability avoids the overhead of additional classifiers.
  • Modalities Have Different Budgets: Different tasks rely on different modalities. For Visual Entailment, the model can skip many image layers but needs more text layers. For Image Captioning, the inverse is true. MuE’s ability to treat these separately is a major efficiency win.
  • Training Matters for Early Exits: The "Layer-wise Task Loss" is essential because it prevents the performance "cliff" usually seen when exiting early from a model trained only for final-layer output.

Limitations and Future Work

While MuE is highly effective, performance begins to degrade more sharply in generative tasks once computation is reduced beyond 50%, as errors from early layers can accumulate over the course of generating a long sentence. Future work could involve skipping specific tokens (e.g., ignoring background patches of an image) to save even more power.

Summary updated

BibTeX
@inproceedings{tang2023you,
  author = {Shengkun Tang and Yaqing Wang and Zhenglun Kong and Tianchi Zhang and Yao Li and Caiwen Ding and Yanzhi Wang and Dongkuan Xu},
  title = {{You Need Multiple Exiting: Dynamic Early Exiting for Accelerating Unified Vision Language Model}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
  url = {https://openreview.net/forum?id=5SYyKOj1hZ},
}
Figure