Research map / Label-efficient and robust learning / Domain adaptation and generalization
When and How Does CLIP Enable Domain and Compositional Generalization?
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Trains CLIP models on controlled mixtures of DomainNet domains and ImageNet-Captions to test when CLIP generalizes to unseen domains and unseen classes within partially seen domains, and analyzes why with SAE feature sharing, CKA, and a new mechanistic circuit similarity measure.
Problem
Whether CLIP generalizes to an entirely unseen domain when trained on a diverse mixture of domains (domain generalization) and to unseen classes within partially seen domains (compositional generalization), and which training factors and internal mechanisms govern this.
Approach
Systematically construct training distributions with controlled domain diversity and class exposure (natural-only, leave-out-domain, CG low/high-diversity) so that only the domain mixture varies, then analyze the resulting models with data-centric analyses, sparse autoencoder feature sharing, representational similarity (CKA), and a new mechanistic (circuit) similarity measure.
Key results
- CG high-diversity on Sketch reached 28.1% balanced top-1 vs 30.1% for Leave-out-domain, with an upper bound of 44.3% when trained on classes C2 of the test domain.
- Adding ImageNet-Sketch sketches of non-queried classes raised Sketch compositional generalization from 28.1% to 36.9% in the CG high-diversity setting.
- Domain diversity raised SAE top-k shared feature overlap by +7.1 points on Clipart and +4.1 on Sketch (Natural-only to Leave-out-domain).
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Add diverse non-test domains to training | CLIP trained on ImageNet-Captions · Clipart and Sketch | balanced top-1 accuracy: Clipart: 20.3 -> 27.4; Sketch: 19.5 -> 30.1 | Helped |
| Add diverse non-test domains to compositional training | CG low-diversity CLIP · Clipart and Sketch | balanced top-1 accuracy: Clipart: 17.1 -> 27.6; Sketch: 19.2 -> 28.1 | Helped |
| Train on a subset of queried test-domain classes rather than excluding the test domain (ablation) | CLIP with diverse training domains · Clipart and Sketch | balanced top-1 accuracy: Clipart: 27.4 -> 17.1; Sketch: 30.1 -> 19.2 | Hurt |
| Replace queried-class sketches with sketches of non-queried classes (ablation) | CG high-diversity CLIP · Sketch | balanced top-1 accuracy: 28.1 -> 36.9 | Helped |
| Replace queried-class sketches with sketches of non-queried classes (ablation) | CG low-diversity CLIP · Sketch | balanced top-1 accuracy: 19.2 -> 27.1 | Helped |
| Add test-domain samples from evaluated classes C2 during training (ablation) | High-diversity CLIP · Clipart and Sketch | balanced top-1 accuracy: 27.6 -> 36.6; 28.1 -> 44.3 | Helped |
| Increase domain diversity from Natural-only to Leave-out-domain (ablation) | CLIP · Clipart and Sketch | shared SAE features: +7.1; +4.1 | Helped |
| Increase domain diversity from Natural-only to CG high-diversity (ablation) | CLIP · Clipart and Sketch | shared SAE features: +6.9; +3.4 | Helped |
| Replace domain-specific captions with domain-invariant captions only (ablation) | CLIP CG high-diversity · Quickdraw unseen classes | balanced top-1 accuracy: 1.7 -> 0.7 | Hurt |
| Replace CLIP loss with SigLIP loss (ablation) | CLIP ResNet-50 · Clipart and Sketch | balanced top-1 accuracy: Clipart CG high-diversity: 28.6 -> 25.7; Sketch CG high-diversity: 28.6 -> 27.5 | Mixed |
| Use CC3M or CC12M instead of ImageNet-Captions as the base dataset (ablation) | CLIP ResNet-50 · Clipart and Sketch | balanced top-1 accuracy: CC3M CG high-diversity: 35.5, 33.6; CC12M CG high-diversity: 48.7, 51.7 | Mixed |
| Use BLIP instead of CLIP (ablation) | Vision-language pre-training · Clipart and Sketch | balanced top-1 accuracy: Leave-out-domain: 27.1 -> 61.8; 31.8 -> 58.6 | Helped |
Surprising findings
- Seeing a subset of the test domain's classes can make compositional generalization worse than not seeing the test domain at all (e.g., Sketch 19.2 CG low-diversity vs 30.1 Leave-out-domain).
- Quickdraw fails to generalize to unseen classes even with high domain diversity, and removing domain-specific captions does not fix it.
Limitations
- Experiments limited to small-scale datasets (0.5M to 10M samples) and ResNet-50 CLIP, without large-scale domain data
- Domain generalization gap to upper bound persists; CLIP only weakly generalizes
- Dataset quality effects not studied
Experimental setup
Datasets: ImageNet-Captions CC3M CC12M DomainNet ImageNet-Sketch
Benchmarks: DomainNet
Metrics: balanced top-1 accuracy balanced top-5 accuracy macro F1 effective robustness CKA Jaccard index of circuit components normalized Weisfeiler-Lehman subtree kernel
Baselines: Natural-only CLIP Leave-out-domain CLIP CG low-diversity CLIP CG high-diversity CLIP supervised ResNet-50 classifier SigLIP BLIP
Builds on: CLIP OpenCLIP DomainNet ImageNet-Captions Sparse autoencoders
Closest papers by meaning
- Domain Generalization in CLIP via Learning with Diverse Text Prompts (CVPR 2025 · similarity 0.91)
- CLIPCEIL: Domain Generalization through CLIP via Channel rEfinement and Image-text aLignment (NeurIPS 2024 · similarity 0.91)
- Does Data Scaling Lead to Visual Compositional Generalization? (ICML 2025 · similarity 0.90)
- Unknown Prompt the only Lacuna: Unveiling CLIP's Potential for Open Domain Generalization (CVPR 2024 · similarity 0.89)
- Does CLIP’s generalization performance mainly stem from high train-test similarity? (ICLR 2024 · similarity 0.89)
- When does compositional structure yield compositional generalization? A kernel theory. (ICLR 2025 · similarity 0.89)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
