Papers › A Closer Look at the Explainability of Contrastive Language-Image Pre-training

A Closer Look at the Explainability of Contrastive Language-Image Pre-training

12 Apr 2023arXiv:2304.05653archive 2025-07-28

Yi Li, Hualiang Wang, Yiqun Duan, Jiheng Zhang, Xiaomeng Li

Contrastive language-image pre-training (CLIP) is a powerful vision-language model that has shown great benefits for various tasks. However, we have identified some issues with its explainability, which undermine its credibility and limit the capacity for related tasks. Specifically, we find that CLIP tends to focus on background regions rather than foregrounds, with noisy activations at irrelevant positions on the visualization results. These phenomena conflict with conventional explainability methods based on the class attention map (CAM), where the raw model can highlight the local foreground regions using global supervision without alignment. To address these problems, we take a closer look at its architecture and features. Based on thorough analyses, we find the raw self-attentions link to inconsistent semantic regions, resulting in the opposite visualization. Besides, the noisy activations are owing to redundant features among categories. Building on these insights, we propose the CLIP Surgery for reliable CAM, a method that allows surgery-like modifications to the inference architecture and features, without further fine-tuning as classical CAM methods. This approach significantly improves the explainability of CLIP, surpassing existing methods by large margins. Besides, it enables multimodal visualization and extends the capacity of raw CLIP on open-vocabulary tasks without extra alignment. The code is available at https://github.com/xmed-lab/CLIP_Surgery.

PaperPDFCode

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

Code

xmed-lab/clip_surgery officialmentioned in papermentioned on GitHubpytorch report
xmed-lab/clipn mentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Interactive SegmentationLanguage ModellingOpen Vocabulary Semantic SegmentationOpen-Vocabulary Semantic SegmentationSegmentationSemantic SegmentationZero Shot SegmentationZero-Shot Learning

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Open Vocabulary Semantic Segmentation COCO-Stuff-171 CLIP Surgery (original CLIP without any fine-tuning) mIoU 21.9 #6 of 7 Archive leaderboard report
Open Vocabulary Semantic Segmentation Cityscapes CLIP Surgery (CLIP without any fine-tuning) mIoU 31.4 #4 of 5 Archive leaderboard report
Open Vocabulary Semantic Segmentation PASCAL Context-59 CLIP Surgery (original CLIP without any fine-tuning) mIoU 29.3 #24 of 24 Archive leaderboard report
Zero Shot Segmentation ADE20K training-free zero-shot segmentation CLIPSurgery mIoU 12.9 #4 of 5 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

CLIP

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections