[Paper Review] Leveraging Vision-Language Models for Improving Domain Generalization in Image Classification
This paper proposes VL2V-ADiP, a method to improve out-of-distribution (OOD) generalization in image classification by distilling vision-language models (VLMs) into student models under a black-box setting. It aligns the student’s vision features with both the VLM’s image and text embeddings before distillation, significantly boosting OOD performance while preserving the student’s pre-trained features, achieving state-of-the-art results on domain generalization benchmarks.
Vision-Language Models (VLMs) such as CLIP are trained on large amounts of image-text pairs, resulting in remarkable generalization across several data distributions. However, in several cases, their expensive training and data collection/curation costs do not justify the end application. This motivates a vendor-client paradigm, where a vendor trains a large-scale VLM and grants only input-output access to clients on a pay-per-query basis in a black-box setting. The client aims to minimize inference cost by distilling the VLM to a student model using the limited available task-specific data, and further deploying this student model in the downstream application. While naive distillation largely improves the In-Domain (ID) accuracy of the student, it fails to transfer the superior out-of-distribution (OOD) generalization of the VLM teacher using the limited available labeled images. To mitigate this, we propose Vision-Language to Vision - Align, Distill, Predict (VL2V-ADiP), which first aligns the vision and language modalities of the teacher model with the vision modality of a pre-trained student model, and further distills the aligned VLM representations to the student. This maximally retains the pre-trained features of the student, while also incorporating the rich representations of the VLM image encoder and the superior generalization of the text embeddings. The proposed approach achieves state-of-the-art results on the standard Domain Generalization benchmarks in a black-box teacher setting as well as a white-box setting where the weights of the VLM are accessible.
Motivation & Objective
- To address the challenge of poor OOD generalization in student models distilled from black-box VLMs despite their superior generalization capabilities.
- To investigate how to effectively transfer the robustness of VLMs to unimodal student models when only labeled images are available for distillation.
- To develop a method that leverages both image and text embeddings from the VLM teacher without requiring access to its weights or full architecture.
- To improve the OOD performance of distilled student models while preserving their pre-trained features and minimizing inference cost.
- To demonstrate state-of-the-art performance in domain generalization under both black-box and full-access settings.
Proposed method
- Proposes VL2V-ADiP: a three-stage framework—Vision-Language to Vision-Align, Distill, Predict—designed for distillation from VLMs to unimodal student models.
- First, aligns the student’s vision features with the VLM’s image and text embeddings using a contrastive alignment objective.
- Second, distills the aligned VLM embeddings into the student model using a weighted cosine similarity loss between student features and both VLM image and text embeddings.
- The loss function combines supervision from both modalities: $\mathcal{L} = -\frac{1}{2n}\sum_{i=1}^{n}\big{(}(1-\lambda)\cdot\cos(\mathbf{PF}^{s}_{x_{i}},\mathbf{T}_{y_{i}}) + \lambda\cdot\cos(\mathbf{PF}^{s}_{x_{i}},\mathbf{I}^{t}_{x_{i}})\big{)}$, with $\lambda = 0.5$ as the default.
- Uses a pre-trained student initialized on ImageNet-1K, avoiding full fine-tuning of the VLM, and avoids weight sharing or access to the VLM’s internal parameters.
- The method enables direct use of VLM text embeddings as classifiers in the student model without further fine-tuning, enhancing OOD robustness.
Experimental results
Research questions
- RQ1Can the superior OOD generalization of vision-language models be effectively transferred to unimodal student models when only labeled images are available?
- RQ2What role do text embeddings from VLMs play in enhancing OOD robustness compared to image embeddings alone?
- RQ3How can feature alignment between a student model and a black-box VLM improve distillation performance under limited data?
- RQ4Does a balanced fusion of image and text embedding supervision in distillation lead to better OOD generalization than relying on image-only supervision?
- RQ5Can self-distillation techniques improve OOD generalization when the VLM is inaccessible, and how does it compare to direct distillation from the VLM?
Key findings
- VL2V-ADiP achieves state-of-the-art OOD generalization on the Office-Home dataset, with an average OOD accuracy of 81.89% across domains, outperforming prior methods like SAGM (79.60%) and DART (77.29%).
- On the PACS dataset, VL2V-ADiP achieves 96.68% average OOD accuracy, surpassing the next best method (SAGM at 94.30%) and significantly outperforming ERM fine-tuning (91.35%).
- On DomainNet, VL2V-ADiP achieves 62.79% average OOD accuracy with CLIP initialization, exceeding SAGM (59.05%) and DART (59.32%), demonstrating strong performance on highly shifted domains.
- The method shows the highest gains on domains with maximal domain shift—such as ClipArt (OH), Infograph (DN), and Painting (OH)—indicating effective transfer of VLM robustness.
- The ablation study confirms that equal weighting ($\lambda = 0.5$) of image and text embedding losses yields robust performance across datasets, with minimal sensitivity to hyperparameter tuning.
- VL2V-ADiP maintains strong performance even when the VLM is accessed only via black-box inference, making it practical for real-world deployment in vendor-client settings.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.