TL;DR
Vision-language models like CLIP are great at general recognition, but when asked to learn from messy, unlabeled datasets containing unknown categories, their generic text prompts ("a photo of a Corgi") blur the lines between similar-looking classes. This paper introduces a visual memory bank that harvests subtle, patch-level visual details (like short legs or golden fur) and injects them directly into text embeddings, using contrastive "poisoning" to sharpen decision boundaries. The result is a model that excels at fine-grained classification while reliably filtering out subtle imposters in the wild.
What Problem Does This Paper Address?
In traditional semi-supervised learning, we assume our unlabeled data contains the exact same categories as our small labeled set. Reality is rarely that tidy. Open-Set Semi-Supervised Learning (OSSL) tackles the realistic scenario where unlabeled data is polluted with unknown, out-of-distribution (OOD) categories. The goal is twofold: accurately classify known, in-distribution (ID) classes while rejecting the OOD gatecrashers so they don't corrupt the training process.
Recently, researchers brought pre-trained Vision-Language Models (VLMs) like CLIP into OSSL to leverage their rich semantic knowledge. However, CLIP relies on coarse, class-level text prompts. In fine-grained tasks—say, distinguishing dog breeds—knowing what a generic "Corgi" or "Husky" means isn't enough when an unseen "German Shepherd" wanders into the unlabeled pool. Because they share high-level dog features, OOD samples easily slip past confidence filters, masquerading as known classes.
To separate them, the model needs fine-grained attributes—details that live naturally in the image pixels, not the class name.
Methods
Built upon a frozen CLIP backbone (ViT-B/16) with standard confidence-based pseudo-labeling for unlabeled data, the authors introduce two novel mechanisms to bridge the granularity gap:
- Fine-Grained Visual Memory Bank: Instead of just looking at whole images, the model slices each image into patches and measures the cosine similarity between each visual patch and the class text prompt. It selects the top-$K$ ($K=5$) most relevant patches—capturing local, defining traits like a bird's beak or a car's grille—passes them through a lightweight alignment module, and updates a single prototype vector per class using an exponential moving average (EMA). Both labeled data and high-confidence unlabeled data keep this memory fresh.
- Contrastive Embedding Enhancement (with Poisoning): Next, a lightweight fusion network injects these stored visual memories directly into the text embeddings. Crucially, it does this in two ways:
- Enriched embeddings: Fusing a class's text prompt with its own visual memory vector to create a hyper-specific prototype.
- Poisoned embeddings: Fusing a class's text prompt with a randomly chosen different class's visual memory vector.
During training, a contrastive loss forces image features to align with the enriched text embedding while actively repelling the "poisoned" one. This forces the network to rely on distinctive, class-specific details rather than shared background or coarse anatomy.
Datasets
The authors evaluate their approach on five established fine-grained visual classification benchmarks (no new datasets are introduced):
- CUB-200-2011 (birds)
- Stanford Dogs (dog breeds)
- Stanford Cars (car models)
- FGVC-Aircraft (aircraft variants)
- Semi-Aves (birds with naturally occurring open-set splits)
For the first four datasets, odd-numbered classes serve as known ID categories (with just 5 or 20 labeled images per class), while even-numbered classes act as unseen OOD noise mixed into the unlabeled data, ensuring minimal domain mismatch and maximum difficulty.
Key Insights and Ideas
- Random poisoning beats "hard" negatives: When constructing poisoned embeddings, randomly sampling another class's visual memory outperforms picking the nearest (most confusing) negative class. Random sampling provides higher entropy and exposes the model to a much wider variety of visual contrasts during training.
- Less is more for memory slots: Maintaining just one aggregated memory vector per class consistently beats maintaining 5 or 10 sub-prototypes per class, keeping the representation compact and stable.
- Local patches beat global views: Building the memory bank from top-$K$ patches significantly outperforms using global image features or random patches, proving that patch-text similarity successfully isolates the subtle anatomy that matters.
Key Results
Across all vijf benchmarks and label regimes, this method achieves state-of-the-art performance, consistently beating prompt-learning baselines (like CoOp and MaPLe) and the strongest prior CLIP-based OSSL framework, CFSG-CLIP.
- ID Classification Accuracy: On CUB-200-2011 (5-shot), accuracy jumps to 88.09%, beating CFSG-CLIP (84.73%) by 3.36%. On FGVC-Aircraft, it hits 61.91% (5-shot) and 73.90% (20-shot).
- Open-Set Balanced Accuracy (measuring joint ID classification and OOD rejection): Reaches 73.30% on 20-shot Aircraft (+1.17% over CFSG-CLIP) and 92.62% on 20-shot Stanford Cars.
- OOD Detection: Dramatically improves separation between knowns and unknowns. On 5-shot Stanford Cars, AUROC leaps from CFSG-CLIP's 63.01% to 79.84%, while false positives (FPR95) drop from 89.67% down to 76.51%.
Limitations and Future Work
Because the visual memory bank relies on selecting the top-$K$ local image patches, it shines when distinguishing traits are localized—like a hood ornament, feather pattern, or ear shape. However, the authors note that it yields smaller gains when categories differ primarily in global structure, such as overall body proportions or full-object silhouettes. Integrating global structural cues alongside local patch memories is a key direction for future work.
Summary updated