ECOR: Explainable CLIP for Object Recognition
Ali Rasekh, Sepehr Kazemi Ranjbar, Milad Heidari, Wolfgang Nejdl
TL;DR
This work tackles explainability in open-vocabulary object recognition with CLIP by defining explainability as the joint distribution $P(c,\{r_i\}_{i=1}^{m}|I)$ and proposing an autoregressive two-stage model that first predicts $P(\{r_i\}_{i=1}^{m}|I)$ and then $P(c|\{r_i\}_{i=1}^{m},I)$. It implements this via prompt-tuned CLIP with Prompt_R for rationales and Prompt_{c|R} for categories, optimizing a two-term loss $L_{train} = L_{CLIP}(...Prompt_R) + L_{CLIP}(...Prompt_{c|R})$ and evaluating on six DROR datasets. The results show state-of-the-art explainable classification and strong zero-shot transfer, with ablations confirming that conditioning category on rationales and jointly modeling $P(R|I)$ and $P(c|R,I)$ are crucial, while inverted conditioning or independence assumptions harm performance, especially on large datasets. The work advances trustworthy, interpretable object recognition and provides code for reproducibility.
Abstract
Large Vision Language Models (VLMs), such as CLIP, have significantly contributed to various computer vision tasks, including object recognition and object detection. Their open vocabulary feature enhances their value. However, their black-box nature and lack of explainability in predictions make them less trustworthy in critical domains. Recently, some work has been done to force VLMs to provide reasonable rationales for object recognition, but this often comes at the expense of classification accuracy. In this paper, we first propose a mathematical definition of explainability in the object recognition task based on the joint probability distribution of categories and rationales, then leverage this definition to fine-tune CLIP in an explainable manner. Through evaluations of different datasets, our method demonstrates state-of-the-art performance in explainable classification. Notably, it excels in zero-shot settings, showcasing its adaptability. This advancement improves explainable object recognition, enhancing trust across diverse applications. The code will be made available online upon publication.
