Attention Head Purification: A New Perspective to Harness CLIP for Domain Generalization
Yingfan Wang, Guoliang Kang

TL;DR
This paper introduces attention head purification for CLIP to improve domain generalization by selecting and refining attention heads to focus on domain-invariant features, leading to better cross-domain performance.
Contribution
It proposes a novel attention head purification method involving task-level and domain-level purification to enhance CLIP's domain generalization capabilities.
Findings
Outperforms previous state-of-the-art methods on DG benchmarks.
Head-aware LoRA improves task adaptation of attention heads.
MMD loss encourages domain-invariant feature learning.
Abstract
Domain Generalization (DG) aims to learn a model from multiple source domains to achieve satisfactory performance on unseen target domains. Recent works introduce CLIP to DG tasks due to its superior image-text alignment and zeros-shot performance. Previous methods either utilize full fine-tuning or prompt-learning paradigms to harness CLIP for DG tasks. Those works focus on avoiding catastrophic forgetting of the original knowledge encoded in CLIP but ignore that the knowledge encoded in CLIP in nature may contain domain-specific cues that constrain its domain generalization performance. In this paper, we propose a new perspective to harness CLIP for DG, i.e., attention head purification. We observe that different attention heads may encode different properties of an image and selecting heads appropriately may yield remarkable performance improvement across domains. Based on such…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsIntelligent Tutoring Systems and Adaptive Learning
MethodsSoftmax · Attention Is All You Need · Contrastive Language-Image Pre-training · Focus
