atlas

Research map / Label-efficient and robust learning / Domain adaptation and generalization

Attention Temperature Matters in ViT-Based Cross-Domain Few-Shot Learning

NeurIPS 2024 · Label-efficient and robust learning › Domain adaptation and generalization · approach: Cross-domain few-shot with transformers · 10 citations (OpenAlex)

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.

Shows that scaling ViT attention by a small temperature (down to 0, i.e., uniform attention) improves cross-domain few-shot transfer, and proposes Attention Abandonment during source training plus target-time attention temperature adjustment to boost ViT-S transferability.

Problem

Vision Transformers transfer poorly under large domain gaps in cross-domain few-shot learning (CDFSL); the query-key attention yields ineffective target-domain attention.

Approach

Attention temperature (even 0, giving uniform attention) improves target-domain accuracy but hurts source accuracy; the authors attribute this to query-key attention being discriminative but poorly transferable, and propose randomly abandoning query-key attention (setting its temperature to 0 with probability p=0.8) during source training, plus a fixed target-time temperature.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
add attention abandonment during source-domain training (ablation)ViT-S CDFSL · CropDiseases, 5-way 5-shotaccuracy: 94.24±0.27 -> 95.40±0.33Helped
add target-domain attention adjustment (ablation)ViT-S CDFSL without abandonment · CropDiseases, 5-way 5-shotaccuracy: 94.24±0.27 -> 94.48±0.31Helped
add target-domain attention adjustment when abandonment is active (ablation)ViT-S CDFSL · CropDiseases, 5-way 5-shotaccuracy: 95.40±0.33 -> 95.53±0.22Helped
replace stochastic temperature with learnable temperature (ablation)ViT-S CDFSL · CDFSL, 5-way 5-shotaverage accuracy: 64.02±0.07 vs 66.62±0.19Hurt
replace global attention-map abandonment with element-wise dropout (ablation)ViT-S CDFSL · CDFSL, 5-way 5-shotaverage accuracy: 64.11±0.17 vs 66.62±0.19Hurt
mask diagonal attention instead of using global temperature (ablation)ViT-S CDFSL · CDFSL, 5-way 5-shotaverage accuracy: 64.38±0.17 vs 66.62±0.19Hurt
fix the attention network during training (ablation)ViT-S CDFSL · CDFSL, 5-way 5-shotaverage accuracy: 64.08±0.19 vs 66.62±0.19Hurt
abandon all attention rather than stochastically abandoning query-key attention (ablation)ViT-S CDFSL · CDFSL, 5-way 5-shotaverage accuracy: 65.16±0.16 vs 66.62±0.19Hurt
replace query-key attention with cosine relation (ablation)ViT-S last-block attention · CropDiseases, 5-way 1-shotaccuracy: 79.10 -> 79.98Helped
replace query-key attention with average relation (ablation)ViT-S last-block attention · CropDiseases, 5-way 1-shotaccuracy: 79.10 -> 80.73Helped
add default query-key self-attention to input tokens (ablation)ViT-S last block · CropDiseases, 5-way 1-shotaccuracy: 79.63 -> 79.10Hurt
add default query-key self-attention to input tokens (ablation)ViT-S last block · miniImageNet, 5-way 1-shotaccuracy: 90.17 -> 92.59Helped

Surprising findings

Limitations

Experimental setup

Datasets: miniImageNet CropDiseases EuroSAT ISIC2018 ChestX

Benchmarks: miniImageNet CropDiseases EuroSAT ISIC2018 ChestX

Metrics: 5-way 1-shot accuracy 5-way 5-shot accuracy domain similarity (CKA)

Baselines: StyleAdv FLoR SDT MEM-FS PMF GNN+AFA LDP-net RDC MICM Learnable Temp.

Builds on: DINO StyleAdv ProtoNet Dropout

Closest papers by meaning

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.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy