Interpreting and Analysing CLIP's Zero-Shot Image Classification via Mutual Knowledge
Fawaz Sammani, Nikos Deligiannis
TL;DR
The paper tackles interpreting CLIP's zero-shot image classification by analyzing the mutual knowledge shared between its vision and language encoders through a discrete textual-concept space. It introduces a training-free multimodal concept framework that grounds visual parts to textual descriptors and retrieves textual concepts around the predicted class to compute a mutual-information measure $I(\mathcal{D}_{v}; \mathcal{D}_{\hat{y}})$. Key contributions include a method to quantify mutual information via MI dynamics and AUC, validation across 13 CLIP models, and evidence that larger models and richer pretraining data yield stronger shared knowledge which correlates with zero-shot accuracy, with zero-shot gains up to 3.75%. The work also provides human-friendly explanations and visualizations of mutual concepts, informing model selection and interpretability in vision-language models.
Abstract
Contrastive Language-Image Pretraining (CLIP) performs zero-shot image classification by mapping images and textual class representation into a shared embedding space, then retrieving the class closest to the image. This work provides a new approach for interpreting CLIP models for image classification from the lens of mutual knowledge between the two modalities. Specifically, we ask: what concepts do both vision and language CLIP encoders learn in common that influence the joint embedding space, causing points to be closer or further apart? We answer this question via an approach of textual concept-based explanations, showing their effectiveness, and perform an analysis encompassing a pool of 13 CLIP models varying in architecture, size and pretraining datasets. We explore those different aspects in relation to mutual knowledge, and analyze zero-shot predictions. Our approach demonstrates an effective and human-friendly way of understanding zero-shot classification decisions with CLIP.
