Abstract
In recent years, pre-trained multimodal large models have attracted widespread attention due to their outstanding performance in various multimodal applications. Nonetheless, the extensive computational resources and vast datasets required for their training present significant hurdles for deployment in environments with limited computational resources. To address this challenge, we propose a novel dynamic self-adaptive multiscale distillation from pre-trained multimodal large model for efficient cross-modal representation learning for the first time. Unlike existing distillation methods, our strategy employs a multiscale perspective, enabling the extraction of structural knowledge from the pre-trained multimodal large model. This ensures that the student model inherits a comprehensive and nuanced understanding of the teacher's knowledge. To optimize each distillation loss in a balanced and efficient manner, we propose a dynamic self-adaptive distillation loss balancer, a novel component eliminating the need for manual loss weight adjustments and dynamically balancing each loss item during the distillation process. Our methodology streamlines pre-trained multimodal large models using only their output features and original image-level information, requiring minimal computational resources. Extensive experiments have demonstrated that our method maintains high performance while significantly reducing model complexity and training costs. Moreover, our distilled student model utilizes only image-level information to achieve state-of-the-art performance on cross-modal retrieval tasks, surpassing previous methods that relied on region-level information.
Introduction
Pre-trained Multimodal Large Models (MLMs) like CLIP or BEiT-3 have revolutionized the field of cross-modal understanding. However, these models are computationally "heavy," requiring massive memory and processing power, which makes them difficult to deploy on edge devices or smartphones.
Knowledge Distillation (KD) is a common technique to compress these models into smaller "students." Yet, traditional KD approaches often suffer from a single-scale focus, high computational costs due to region-level image processing, and the need for extensive manual tuning of loss function weights. To overcome these barriers, we introduce the Dynamic Self-adaptive Multiscale Distillation (DSMD) framework.
Methodology
The DSMD framework adopts a multiscale perspective to transfer knowledge from a large teacher model to a lightweight student. Instead of a single learning objective, the student is trained across four distinct scales of knowledge:
- Contrastive Distillation: Captures the overall structure of how the teacher separates concepts in its feature space.
- Feature Distillation: Matches the exact numerical values of the teacher's output features using L1 distance.
- Similarity Distillation: Mimics the teacher's perception of "closeness" between image-text pairs using cosine similarity.
- Hard Negative Distillation: Uses triplet loss to focus the student on difficult examples where images and text appear similar but do not match.
A core innovation of our approach is the Dynamic Self-adaptive Loss Balancer. This component monitors the learning progress of each distillation task in real-time and automatically adjusts their weights. This eliminates the need for manual hyperparameter tuning and ensures a balanced training process.
Experimental Results
We evaluated DSMD on two major benchmarks: Flickr30k and MSCOCO 5K. Our student model (using ViT-base and BERT) achieved state-of-the-art (SOTA) results while being significantly more efficient than its teacher.
Key Performance Metrics:
- Efficiency: The student model utilizes only ~10% of the parameters of the BEiT-3 teacher (~197M vs ~1900M).
- Inference Speed: Inference time per sample was reduced by nearly 88%, dropping from 0.0165s to 0.0021s.
- Performance: On Flickr30k, our method achieved an RSUM (Recall Sum) of 528.8, outperforming previous SOTA methods that relied on more complex region-level features.
Discussion and Conclusion
Our research demonstrates that sophisticated distillation strategies can bridge the gap between massive pre-trained models and efficient deployment. A key insight is that image-level information is sufficient to achieve SOTA performance when paired with a multiscale distillation approach. Furthermore, the dynamic loss balancer proves that automated optimization can outperform manual intuition in complex training scenarios.
While highly effective for retrieval tasks, future work will explore the application of DSMD to generative tasks and investigate methods to further improve distillation efficiency when student and teacher architectures differ significantly.
Summary updated