TL;DR
The paper introduces Query-Based Knowledge Sharing (QKS), a novel framework that significantly improves open-vocabulary multi-label image classification. By freezing a pre-trained vision-language model and using learnable, label-agnostic query tokens to extract regional visual features, QKS avoids the pitfalls of knowledge distillation and sets new state-of-the-art performance on zero-shot classification benchmarks.
What Problem Does This Paper Address?
In real-world computer vision applications, models often encounter objects or concepts at test time that were completely absent during training—a challenge known as zero-shot or open-vocabulary multi-label classification.
Recent approaches have tried to leverage the rich, multi-modal knowledge of Vision-Language Pre-training (VLP) models like CLIP. Typically, they do this via knowledge distillation, trying to mimic the VLP model's embeddings. However, the authors argue this is suboptimal. Distillation struggles with polysemy (words with multiple meanings), requires complex two-stage training pipelines, and often relies on global image features that contain too much redundant background information.
Methods
Instead of distilling or fine-tuning the VLP model, QKS freezes it entirely to preserve its foundational multi-modal knowledge. The framework consists of three main components:
- Knowledge Extraction Module: A Transformer decoder that uses a fixed number of learnable, label-agnostic query tokens. These tokens interact with the spatial features from the frozen vision encoder to automatically isolate and aggregate crucial regional visual clues, filtering out background noise.
- Knowledge Sharing Module: Once visual features are extracted, they are shared across all potential labels. Each label embedding (generated by the frozen language encoder) performs a maximum matching response (inner product) over the query tokens to select the visual clues most relevant to it.
- Prompt Pool for Label Embedding: Rather than relying on a single prompt template (e.g., "There is a {} in the scene"), QKS passes labels through a diverse pool of handcrafted templates and averages their embeddings, yielding much more robust text representations.
Additionally, the authors reformulate the standard ranking loss into a Classification Learning objective. Standard ranking losses normalize feature vectors to a unit hyper-sphere, ignoring vector magnitude. QKS treats label embeddings as classifiers in a margin-agnostic classification loss, allowing both vector angle and magnitude to influence image-label matching.
Datasets
The authors evaluated QKS on two widely used multi-label classification benchmarks:
- NUS-WIDE: Contains over 161,000 training images. Following standard zero-shot protocols, 925 labels are treated as seen during training, and 81 labels are reserved as unseen for testing.
- Open Images (v4): A large-scale dataset where 7,186 labels are treated as seen, and the 400 most frequent remaining labels are used as unseen test targets.
Key Insights and Ideas
- Freezing is Better Than Distilling: Freezing both the vision and language encoders of the VLP model prevents the catastrophic forgetting and polysemy degradation that usually occurs during fine-tuning or distillation for specific downstream tasks.
- Label-Agnostic Queries Generalize Better: Using label-specific queries to find image regions fails for unseen classes because the model doesn't know what features to look for. Label-agnostic queries simply look for any distinct semantic regions, which unseen text labels can then flexibly choose from during the sharing phase.
- Vector Magnitude Matters: Vector magnitude reflects feature strength. By preserving magnitude information in the loss function rather than normalizing it away, the model achieves much cleaner precision and recall boundaries.
Key Results
QKS significantly outperforms previous state-of-the-art methods, such as MKT, across both Zero-Shot Learning (ZSL) and Generalized Zero-Shot Learning (GZSL) settings:
- NUS-WIDE: QKS achieved a 49.5% mAP on the ZSL task, outperforming MKT by 11.9%. On the GZSL task, it improved mAP by 4.2% (reaching 22.5%).
- Open Images: QKS raised the ZSL mAP from 68.1% (MKT) to 72.6% (a 4.5% absolute improvement) and showed consistent gains in F1 scores.
Ablation studies confirmed that the framework is robust to hyperparameter choices, though performance peaks at around $m=12$ query tokens and $L=7$ layers in the extraction module.
Limitations and Future Work
The authors noted that increasing the number of layers in the knowledge extraction module beyond a certain point ($L > 7$) leads to a performance drop due to overfitting on the training set's limited data size. Additionally, due to dead URLs in the web-scraped Open Images dataset, the authors trained on roughly 10% fewer images than the official dataset specification, suggesting that performance could be even higher with a complete dataset. Future work may explore scaling the framework to larger datasets or adapting the label-agnostic query mechanism to dense prediction tasks like open-vocabulary object detection.
Summary updated