Abstract
Large Vision-Language Models (VLMs) like CLIP exhibit remarkable zero-shot capabilities but are often too computationally intensive for edge deployment. Traditional distillation methods frequently result in a loss of out-of-distribution (OOD) generalizability, as students overfit to the specific training distribution. This paper proposes a framework to distill massive VLMs into lightweight student models while preserving their open-vocabulary capabilities. By aligning the relative structure of the teacher's visual space and enriching text labels with LLM-generated semantic details, the proposed method significantly enhances the student's ability to recognize unseen objects.
1. Introduction
The advent of Large Vision-Language Models (VLMs) has redefined the landscape of computer vision, enabling "zero-shot" recognition where models identify concepts never encountered during explicit training. However, the scale of these models—often containing hundreds of millions or billions of parameters—precludes their use in real-time applications on mobile devices or robotic platforms.
Distillation offers a path toward efficiency, yet standard techniques often fail to transfer the "open-world" logic of the teacher to the student. Conventional distillation typically optimizes for performance on a fixed, closed-set dataset, causing the student to become a specialist in the training data while losing the teacher's broad OOD generalizability. This work addresses the challenge of shrinking model size without sacrificing the ability to understand the open world.
2. Methodology
The proposed framework rests on two core principles designed to bridge the gap between teacher and student performance in OOD scenarios.
2.1 Relative Visual Space Alignment
A common pitfall in distillation is the use of Mean Squared Error (MSE) to force student image features to match teacher features exactly. The authors argue that this is mathematically restrictive and often leads to overfitting. Instead, they propose a contrastive loss ($\mathcal{L}_{im-cst}$) that encourages the student to maintain the relative distances between images as defined by the teacher. If the teacher perceives a "cheesecake" as being semantically closer to a "pizza" than to a "car," the student is trained to preserve this neighborhood structure. This ensures the student learns the underlying "logic" of the visual manifold rather than just memorizing coordinate points.
2.2 Vision-Language Proximity ($\mathcal{L}_{vlprox}$)
To maintain cross-modal coherence, the framework employs a Vision-Language Proximity loss. This ensures that the alignment between the student’s visual features and the teacher’s language embeddings remains consistent with the teacher’s own internal structure.
2.3 Language Representation Enrichment
To provide a richer training signal, the authors move beyond simple category labels. Using Large Language Models (LLMs) like ChatGPT, they generate fine-grained, descriptive sentences for each class. For example, instead of the label "lotus," the student receives a description: "large, round, flat leaves; tall, slender stems; delicate petals in shades of pink." This "privileged information" helps the student learn more robust, semantically meaningful features, which are critical when encountering visually similar but novel OOD classes.
3. Experimental Evaluation
The framework was evaluated across several benchmarks to test its versatility:
- Fine-grained Recognition: CaltechBirds, StanfordCars, and Flower102.
- General Recognition: Food101, SUN397, and tiered-ImageNet.
- Robotics: A modified PickClutter task from the ManiSkill2 benchmark, where the model predicts grasp feasibility for YCB objects in cluttered environments.
In these experiments, labels were split to ensure the student was evaluated on "unseen" OOD categories, directly testing its zero-shot transfer capabilities.
4. Key Insights
4.1 The "MSE Trap"
The study reveals a counter-intuitive finding: lower MSE (closer absolute feature matching) does not necessarily correlate with better OOD performance. Students can exhibit high MSE but superior OOD accuracy if they successfully preserve the relative neighborhood structure of the teacher's feature space. Generalization, therefore, appears to reside in the manifold structure rather than absolute positioning.
4.2 LLMs as Semantic Bridges
The use of LLM-enriched descriptions acts as a powerful regularizer. By providing the student with detailed attributes, the model learns to associate visual features with specific semantic concepts, making it more resilient when faced with new categories that share those attributes.
5. Results
The proposed method demonstrated substantial improvements across all tasks:
- OOD Accuracy: On the Flower102 dataset, zero-shot OOD accuracy rose from a 14.2% baseline to 21.6%. 5-shot accuracy improved from 34.9% to 39.0%.
- Robotics Performance: In the PickClutter task, the combination of semantic enrichment and visual space alignment improved the F1-score for OOD graspable object detection from 23.3 to 50.7 in 5-shot settings.
- Architectural Consistency: While ResNet18 was the primary focus, the benefits were also observed when distilling into ViT-B/32, though Vision Transformers showed a higher tendency to overfit on smaller datasets.
6. Conclusion and Future Work
This research demonstrates that it is possible to distill the broad knowledge of large VLMs into compact models without losing their OOD generalizability. By focusing on relative visual structures and enriched semantic signals, student models can maintain the "open-vocabulary" magic of their teachers. Future work will explore extending these principles to more complex tasks like object detection and segmentation, as well as distilling from even larger foundation models.
Summary updated