Grad-ECLIP: Gradient-based Visual and Textual Explanations for CLIP

Read full text
Authors: Chenyang Zhao, Kun Wang, Janet H. Hsiao, Antoni B. Chan
Cited by: 0
References: 73

Abstract

Significant progress has been made in the improvement and downstream applications of the Contrastive Language-Image Pre-training (CLIP) vision-language model, while less attention has been paid to the interpretation of CLIP. We propose a Gradient-based visual and textual Explanation method for CLIP (Grad-ECLIP), which interprets the matching result of CLIP for a specific input image-text pair. By decomposing the encoder's architecture and identifying the relationship between matching similarity and intermediate spatial features, Grad-ECLIP generates effective heat maps that reveal the impact of image regions or words on the CLIP results. Unlike previous Transformer interpretation methods that focus on utilizing self-attention maps, which are typically extremely sparse in CLIP, we produce high-quality visual explanations by applying channel and spatial weights to token features. Qualitative and quantitative evaluations verify the effectiveness and superiority of Grad-ECLIP compared with the state-of-the-art methods. Finally, a series of analyses are conducted based on our visual and textual explanation results, from which we explore the working mechanism of image-text matching, the strengths and limitations in attribution identification of CLIP, and the relationship between the concreteness/abstractness of a word and its usage in CLIP. The code of Grad-ECLIP is available here: https://github.com/Cyang-Zhao/Grad-Eclip.

Fields of Study & Subjects

Multimodal Machine Learning Applications Generative Adversarial Networks and Image Synthesis Topic Modeling

Publication details

Journal / source
IEEE Transactions on Pattern Analysis and Machine Intelligence
Publisher
Institute of Electrical and Electronics Engineers (IEEE)
Volume
PP
Issue
11
Pages
1–18
Publication date
1 January 2026
Language
EN