TL;DR
ELIP (Efficient Language-Image Pre-training) is a parameter-free method that uses text supervision to prune and merge redundant vision tokens in Vision Transformers (ViTs). By removing approximately 30% of vision tokens during pre-training, ELIP significantly reduces computational overhead and memory usage while maintaining over 99% of the performance of full-scale baseline models across diverse downstream tasks.
What Problem Does This Paper Address?
Large-scale discriminative language-image models like CLIP and BLIP have revolutionized cross-modal tasks, but their pre-training is notoriously resource-intensive. A primary culprit is the Vision Transformer (ViT) backbone, which processes images as a sequence of patches (tokens). Many of these patches—such as background sky or repetitive textures—are redundant or irrelevant to the accompanying text description.
While "vision-only" token pruning methods exist, they often ignore the multi-modal nature of the task. A patch that seems "unimportant" to a vision model might be the exact detail mentioned in a text caption. The challenge is to reduce the number of vision tokens without losing the information necessary for high-quality image-text alignment.
Methods
The authors propose ELIP, a progressive token pruning and merging strategy that is trainable-parameter-free and plug-and-play.
1. Text-Guided Importance
Unlike previous methods that look only at vision signals, ELIP uses the output of the text encoder to guide pruning. It fuses the vision [CLS] token with the text [CLS] token (using a weighted sum) to create a multi-modal importance score. This ensures that tokens are kept if they are relevant to the specific text being processed.
2. Progressive Pruning and Merging
ELIP divides the 12-layer ViT into four blocks:
- Block I (Layers 1-2): No pruning. Early layers need full spatial information to build low-level features.
- Blocks II-IV: Progressively more tokens are removed. By the final block, only about 40% of the original tokens remain.
3. Pruning vs. Merging
Instead of simply discarding "unimportant" tokens, ELIP merges them into a single "summary" token. This weighted average of discarded tokens ensures that background information is still represented in a compressed form, which the authors find is superior to pure pruning.
Datasets
The models were pre-trained from scratch on several standard image-caption datasets:
- CC3M+ (4.1M images): A combination of Conceptual Captions (CC3M), SBU Captions, and MSCOCO.
- CC12M+ (10.1M images): Includes the larger Conceptual 12M dataset.
Evaluation was conducted on eleven datasets, including Flickr30K and MSCOCO (for retrieval), VQA v2, NLVR2, SNLI-VE, and ImageNet (for classification).
Key Insights and Ideas
- The Vision Bottleneck: As shown in Figure 2(b), the vision encoder (VE) accounts for the vast majority of computational cost (FLOPs) in models like BLIP and ALBEF. Targeting the VE for efficiency yields the highest returns.
- Attention Concentration: The authors observed that attention maps in ViTs become increasingly "peaky" or concentrated in deeper layers (see Figure 2(a)). This confirms that many tokens become redundant as the model matures its representation of the image.
- The "Lottery Ticket" for Tokens: The paper posits that a subset of vision tokens exists that can achieve nearly the same loss as the full set. ELIP effectively searches for this "winning" subset using text as a filter.
- Scaling Up with Spared Memory: Because ELIP reduces GPU memory usage, researchers can use the "saved" space to increase the batch size. This "ELIP+" approach can actually lead to better performance than the original baseline because contrastive learning benefits significantly from larger batches.
Key Results
- Efficiency: ELIP achieves a ~30% reduction in vision tokens. This translates to significant savings in TFLOPs and memory (e.g., reducing ALBEF memory from 88.1GB to 69.6GB).
- Performance Retention: Across five major downstream tasks, ELIP maintained 99.2% of the baseline performance on average.
- Superiority over Vision-Only Baselines: Compared to SOTA vision-only pruning methods like EViT and ToMe, ELIP showed much smaller performance drops, especially in sensitive tasks like image-text retrieval.
- Retrieval Performance: On Flickr30K, ELIP applied to ALBEF achieved 93.4% R@1 (Recall at 1) for text retrieval, nearly identical to the 93.6% of the full model, while being significantly faster.
Limitations and Future Work
- Fixed Pruning Ratios: Currently, ELIP uses a pre-defined pruning schedule (e.g., keep 90%, then 65%, then 40%). However, some images are naturally more complex than others. The authors suggest that an adaptive pruning ratio that changes based on image content would be a promising next step.
- Generative Models: While this work focuses on discriminative models (like CLIP), the authors note that the vision encoders pruned by ELIP are often used as backbones for generative Vision-LLMs (like LLaVA). Extending this efficiency to the generative domain is a clear future direction.
Summary updated