LiteEmbed: Adapting CLIP to Rare Classes
Aishwarya Agarwal, Srikrishna Karanam, Vineet Gandhi
TL;DR
This work tackles CLIP's limited recognition of rare, emerging, or culturally specific classes by introducing LiteEmbed, a lightweight, few-shot adaptation that optimizes a single class token $e_c$ within CLIP's vocabulary without retraining encoders. It leverages a PCA-based subspace decomposition of CLIP's text space to separate coarse semantic alignment (high-variance directions) from fine-grained discrimination (low-variance directions) via three losses: $L_{ ext{img-align}}$, $L_{ ext{coarse}}$, and $L_{ ext{fine}}$, yielding a training-free, plug-and-play embedding applicable to classification, retrieval, segmentation, and detection. Empirically, LiteEmbed achieves significant gains over prior methods across eight datasets and the NOVA benchmark, improving open-vocabulary tasks and maintaining compositionality for prompts. The approach demonstrates practical impact by enabling robust open-vocabulary recognition for underrepresented or post-2023 concepts without large-scale retraining, pointing to broad applicability in multimodal systems.
Abstract
Large-scale vision-language models such as CLIP achieve strong zero-shot recognition but struggle with classes that are rarely seen during pretraining, including newly emerging entities and culturally specific categories. We introduce LiteEmbed, a lightweight framework for few-shot personalization of CLIP that enables new classes to be added without retraining its encoders. LiteEmbed performs subspace-guided optimization of text embeddings within CLIP's vocabulary, leveraging a PCA-based decomposition that disentangles coarse semantic directions from fine-grained variations. Two complementary objectives, coarse alignment and fine separation, jointly preserve global semantic consistency while enhancing discriminability among visually similar classes. Once optimized, the embeddings are plug-and-play, seamlessly substituting CLIP's original text features across classification, retrieval, segmentation, and detection tasks. Extensive experiments demonstrate substantial gains over prior methods, establishing LiteEmbed as an effective approach for adapting CLIP to underrepresented, rare, or unseen classes.
