Abstract
Vision-language pre-training like CLIP has shown promising performance on various downstream tasks such as zero-shot image classification and image-text retrieval. Most of the existing CLIP-alike works usually adopt relatively large image encoders like ResNet50 and ViT, while the lightweight counterparts are rarely discussed. In this paper, we propose a multi-level interaction paradigm for training lightweight CLIP models. Firstly, to mitigate the problem that some image-text pairs are not strictly one-to-one correspondence, we improve the conventional global instance-level alignment objective by softening the label of negative samples progressively. Secondly, a relaxed bipartite matching based token-level alignment objective is introduced for finer-grained alignment between image patches and textual words. Moreover, based on the observation that the accuracy of CLIP model does not increase correspondingly as the parameters of text encoder increase, an extra objective of masked language modeling (MLM) is leveraged for maximizing the potential of the shortened text encoder. In practice, an auxiliary fusion module injecting unmasked image embedding into masked text embedding at different network stages is proposed for enhancing the MLM. Extensive experiments show that without introducing additional computational cost during inference, the proposed method achieves a higher performance on multiple downstream tasks.
Introduction
Vision-Language Pre-training (VLP) models, exemplified by CLIP, have fundamentally changed the landscape of computer vision by enabling zero-shot capabilities across diverse tasks. However, the success of these models often hinges on massive backbones (e.g., ViT-B/16 or ResNet-50) that are computationally prohibitive for edge devices. When these architectures are scaled down to lightweight backbones like MobileNetV2 or ResNet-18, performance typically degrades significantly.
The authors identify three primary bottlenecks for lightweight VLP:
- Noisy Web Data: Large models can tolerate the noise in web-crawled image-text pairs, but small models struggle with rigid "one-hot" labels for imperfectly matched pairs.
- Coarse-Grained Alignment: Standard CLIP focuses on global instance-level alignment, which is insufficient for small models to learn intricate visual-textual correspondences.
- Inefficient Text Encoding: Increasing text encoder parameters yields diminishing returns in accuracy, suggesting the text branch is under-optimized during standard contrastive training.
The LightCLIP Framework
To address these challenges, LightCLIP introduces a multi-level interaction paradigm that enhances training without increasing inference-time complexity.
1. Progressive Label Softening
To handle the "one-to-many" nature of web data (where multiple captions might describe similar visual concepts), LightCLIP moves away from hard one-hot labels. It employs a progressive softening strategy: starting with hard labels and gradually incorporating similarity-based soft labels. This allows the model to learn from the inherent relationships between different samples in a batch, reducing the penalty for "false negatives" that are semantically related.
2. Token-Level Alignment via Bipartite Matching
To improve fine-grained understanding, LightCLIP introduces a token-level alignment objective. Using a relaxed bipartite matching (Hungarian algorithm), the model learns to associate specific image patches with corresponding textual words. This explicit matching helps the lightweight encoder capture local details that are often lost in global pooling.
3. Enhanced MLM with Multi-Level Fusion
Recognizing the underutilization of the text encoder, the authors incorporate a Masked Language Modeling (MLM) task. To further strengthen this, they propose an auxiliary fusion module that injects visual features into the text encoder at multiple stages during training. This cross-modal interaction forces the text encoder to learn more robust representations by reconstructing masked words using both textual context and visual cues.
Experimental Results
LightCLIP was pre-trained on the YFCC15M-V2 dataset and evaluated across several benchmarks.
Zero-Shot Classification
On ImageNet-1K, LightCLIP consistently outperforms standard CLIP across various lightweight architectures:
- ResNet-18: 35.0% (vs. 30.8% CLIP)
- MobileNetV2: 31.8% (vs. 28.0% CLIP)
- Swin-Nano: 34.6% (vs. 31.2% CLIP)
On a broader suite of 10 downstream datasets, LightCLIP achieved an average improvement of 7.1% over the CLIP baseline using a ResNet-18 backbone.
Image-Text Retrieval
The improvements in retrieval tasks were even more pronounced. On the Flickr30K dataset with a ResNet-18 backbone, LightCLIP improved the Image-to-Text Recall@1 from 37.4% to 55.1%, demonstrating the effectiveness of the fine-grained token-level alignment.
Conclusion
LightCLIP demonstrates that the performance gap in lightweight vision-language models can be bridged through better training objectives rather than just increasing parameter counts. By combining progressive label softening, token-level bipartite matching, and vision-fused MLM, LightCLIP provides a high-performance framework for deploying VLP models on resource-constrained devices. Importantly, all proposed modules are auxiliary and used only during training, ensuring that the final model maintains the efficient dual-stream architecture of standard CLIP for inference.
Summary updated