Vision-Language Models (VLMs) like CLIP have revolutionized zero-shot classification, allowing images to be classified using only a list of class names. However, standard zero-shot approaches treat each test image in isolation, ignoring the rich structural information present in the distribution of the data itself. This paper introduces ZLaP (Zero-shot Label Propagation), a training-free method that leverages the hidden structure of unlabeled data to significantly boost VLM performance.
The Modality Gap Challenge
A primary obstacle in applying graph-based methods to VLMs is the modality gap: in the embedding space, text features and image features are often clustered far apart. In a simple similarity graph, images mostly connect to images and text to text, making it nearly impossible for labels to "propagate" from class names to images. Vanilla label propagation often fails spectacularly due to this structural barrier.
ZLaP overcomes this by measuring "geodesic" distance—the distance along the manifold of the data. If Image A is similar to Image B, and Image B is similar to a "Dog" text prompt, ZLaP can infer that Image A is also a dog, even if Image A is far from the prompt in raw Euclidean space.
Methodology
The authors propose three key technical innovations to make label propagation effective for VLMs:
- Bi-modal Graph Adjustments: ZLaP performs $k$-nearest neighbor (kNN) searches separately for image-to-image and image-to-text connections. It uses a power function to re-weight cross-modal similarities, balancing the influence of text and image nodes.
- Dual Solution for Inductive Inference: While standard label propagation is transductive (requiring all data at once), the authors derived a mathematical dual solution. This allows the model to build a classifier from unlabeled data and apply it to new, individual images efficiently.
- Sparsification ($ZLaP^*$): Keeping only the highest-confidence values in the propagation matrix acts as a noise filter, improving accuracy by removing erroneous, low-confidence connections while reducing memory footprint.
Experimental Results
ZLaP was evaluated on a suite of 14 diverse datasets, including ImageNet, fine-grained collections (Oxford Flowers, Stanford Cars), and specialized tasks (EuroSAT, DTD).
Key Findings
- Superior Accuracy: ZLaP consistently outperforms standard CLIP and recent state-of-the-art methods like InMaP and TPT, providing an average boost of +3.4% to +4.9% in accuracy.
- Efficiency Gains: The dual solution with sparsification drops the time to classify an image from ~2.6 seconds to just ~0.6 milliseconds.
- Robustness: The method is complementary to other techniques, such as using LLMs to generate better class descriptions, and works across various VLM architectures (ResNet50, ViT-B/16, EVA-CLIP).
Conclusion and Future Work
ZLaP demonstrates that the structural information in unlabeled data is a powerful, often untapped resource for zero-shot tasks. While the method's performance is best when unlabeled data closely matches the test distribution, its efficiency and training-free nature make it highly practical. Future research may extend this graph-based approach to more complex vision tasks like object detection or semantic segmentation.
Summary updated