Attention Head Purification: A New Perspective to Harness CLIP for Domain Generalization
Not on the map. Why?
Abstract (arXiv)
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 observations, we purify the attention heads of CLIP from two levels, including task-level purification and domain-level purification. For task-level purification, we design head-aware LoRA to make each head more adapted to the task we considered. For domain-level purification, we perform head selection via a simple gating strategy. We utilize MMD loss to encourage masked head features to be more domain-invariant to emphasize more generalizable properties/heads. During training, we jointly perform task-level purification and domain-level purification. We conduct experiments on various representative DG benchmarks. Though simple, extensive experiments demonstrate that our method performs favorably against previous state-of-the-arts.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 64 of its 74 references that are in the map. First posted on arXiv 10 Dec 2024.
Builds on
64 of 74 references.
References · 64
- 2017Attention Is All You Needcited by 60,361
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
- 2021Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervisioncited by 3,864
- 2019RandAugment: Practical automated data augmentation with a reduced search spacecited by 2,269
- 2014Unsupervised Domain Adaptation by Backpropagationcited by 1,917
- 2022Visual Prompt Tuningcited by 1,681
- 2019LXMERT: Learning Cross-Modality Encoder Representations from Transformerscited by 1,553
- 2022Conditional Prompt Learning for Vision-Language Modelscited by 1,433
- 2018Moment Matching for Multi-Source Domain Adaptationcited by 1,331
- 2015Learning Transferable Features with Deep Adaptation Networkscited by 1,329
- 2021ViLT: Vision-and-Language Transformer Without Convolution or Region Supervisioncited by 1,230
38 more
- 2017Deep Hashing Network for Unsupervised Domain Adaptationcited by 1,188
- 2020In Search of Lost Domain Generalizationcited by 1,054
- 2021CLIP-Adapter: Better Vision-Language Models with Feature Adapterscited by 1,026
- 2017Deeper, Broader and Artier Domain Generalizationcited by 986
- 2019VL-BERT: Pre-training of Generic Visual-Linguistic Representationscited by 954
- 2021Robust fine-tuning of zero-shot modelscited by 797
- 2021Generalizing to Unseen Domains: A Survey on Domain Generalizationcited by 766
- 2017Learning to Generalize: Meta-Learning for Domain Generalizationcited by 763
- 2022MaPLe: Multi-modal Prompt Learningcited by 687
- 2018Recognition in Terra Incognitacited by 658
- 2016Deep Transfer Learning with Joint Adaptation Networkscited by 612
- 2021LiT: Zero-Shot Transfer with Locked-image text Tuningcited by 577
- 2021Domain Generalization with MixStylecited by 566
- 2018Generalizing to Unseen Domains via Adversarial Data Augmentationcited by 451
- 2019Domain Generalization by Solving Jigsaw Puzzlescited by 450
- 2021SLIP: Self-supervision meets Language-Image Pre-trainingcited by 436
- 2021Tip-Adapter: Training-free CLIP-Adapter for Better Vision-Language Modelingcited by 431
- 2019Domain Generalization via Model-Agnostic Learning of Semantic Featurescited by 407
- 2021Supervision Exists Everywhere: A Data Efficient Contrastive Language-Image Pre-training Paradigmcited by 405
- 2021Generic Attention-model Explainability for Interpreting Bi-Modal and Encoder-Decoder Transformerscited by 320
- 2020Learning to Learn Single Domain Generalizationcited by 296
- 2020Learning to Generate Novel Domains for Domain Generalizationcited by 296
- 2021A Fourier-based Framework for Domain Generalizationcited by 290
- 2013Zero-Shot Learning Through Cross-Modal Transfercited by 237
- 2020Deep Domain-Adversarial Image Generation for Domain Generalisationcited by 231
- 2023Interpreting CLIP's Image Representation via Text-Based Decompositioncited by 196
- 2016What makes ImageNet good for transfer learning?cited by 192
- 2021Combined Scaling for Zero-shot Transfer Learningcited by 182
- 2020Single-Side Domain Generalization for Face Anti-Spoofingcited by 139
- 2022Domain Generalization by Mutual-Information Regularization with Pre-trained Modelscited by 133
- 2022CyCLIP: Cyclic Contrastive Language-Image Pretrainingcited by 127
- 2022Uncertainty Modeling for Out-of-Distribution Generalizationcited by 125
- 2020Domain Generalization for Medical Imaging Classification with Linear-Dependency Regularizationcited by 123
- 2024HydraLoRA: An Asymmetric LoRA Architecture for Efficient Fine-Tuningcited by 123
- 2024Low-Rank Few-Shot Adaptation of Vision-Language Modelscited by 104
- 2023CLIPood: Generalizing CLIP to Out-of-Distributionscited by 96
- 2021A Review of the Gumbel-max Trick and its Extensions for Discrete Stochasticity in Machine Learningcited by 82
- 2022A Broad Study of Pre-training for Domain Generalization and Adaptationcited by 65
50 most cited of 64 All 64 (JSON)
Built on by
Citing papers per year: 2025: 1.
1 paper.