English

Not All Attention Heads Are What You Need: Refining CLIP's Image Representation with Attention Ablation

Computer Vision and Pattern Recognition 2025-11-18 v2 Artificial Intelligence Machine Learning

Abstract

This paper investigates the role of attention heads in CLIP's image encoder. Building on interpretability studies, we conduct an exhaustive analysis and find that certain heads, distributed across layers, are detrimental to the resulting representations. To mitigate their impact, we propose a simple yet effective Attention Ablation Technique (AAT) that suppresses selected heads by directly manipulating their attention weights. By incorporating two complementary strategies tailored to different application scenarios, AAT enables the systematic identification and ablation of harmful heads with minimal overhead. Experiments show that AAT consistently improves downstream performance across diverse domains, boosting recall by up to 11.1% on cross-modal retrieval benchmarks. These results highlight that AAT can effectively refine large-scale VLMs with virtually no extra inference cost, while yielding semantically meaningful patterns that align with existing interpretability findings.

Keywords

Cite

@article{arxiv.2507.00537,
  title  = {Not All Attention Heads Are What You Need: Refining CLIP's Image Representation with Attention Ablation},
  author = {Feng Lin and Marco Chen and Haokui Zhang and Xiaotian Yu and Guangming Lu and Rong Xiao},
  journal= {arXiv preprint arXiv:2507.00537},
  year   = {2025}
}

Comments

18 pages, 8 figures