Leveraging Cross-Modal Neighbor Representation for Improved CLIP Classification
Chao YiLu RenDe-Chuan ZhanHan-Jia Ye
Chao Yi
Lu Ren
De-Chuan Zhan
Han-Jia Ye
+4
CLIP's image encoder, used directly for classification, suffers from misalignment with its text-image pretraining objective. This paper proposes CODER (CrOss-moDal nEighbor Representation), which represents an image by the distance structure to its neighboring text features, better aligning with CLIP's pretraining and exploiting its cross-modal ability. CODER constructs texts via the Auto Prompt Generator, a data-free and training-free method. Applied to CLIP's zero-shot and few-shot classification, CODER shows effectiveness across datasets and architectures.

OpenReview ·
· October 4, 2023