Abstract
Cross-domain few-shot learning (FSL) requires models to adapt to novel domains with very few labeled examples. Traditional methods often use auxiliary networks to predict task-specific parameters, which can fail to generalize to distant domains. This paper proposes a simpler approach: attaching lightweight residual adapters to a frozen backbone and optimizing them directly on the support set during meta-testing. This "optimize, don't predict" strategy achieves state-of-the-art results on the Meta-Dataset benchmark, particularly on unseen domains like traffic signs and medical imagery.
Introduction
Few-shot learning (FSL) aims to recognize new categories from just a handful of labeled images. While standard FSL has improved significantly, cross-domain few-shot learning remains a major hurdle. In this setting, a model trained on natural images (e.g., ImageNet) must adapt to wildly different domains at test time, such as satellite imagery or hand-drawn sketches.
Most existing approaches split the model into "task-agnostic" weights and "task-specific" weights. Typically, an auxiliary network is trained to dynamically predict these task-specific weights based on the small "support set" of examples. However, this auxiliary network often fails to generalize to distant domains and struggles to accurately predict the high-dimensional weights needed for deep networks.
Methodology: Residual Adapters
The authors propose a shift in philosophy: don't predict the adaptation; optimize it. The core idea is to attach lightweight parametric adapters ($r_\alpha$) to multiple intermediate layers of a backbone network (like ResNet-18) and optimize them during the inference phase.
Architecture and Topology
The proposed method uses a parallel topology for the adapters. Unlike "serial" adapters that process features in a sequence, these use a "residual" or parallel connection. This allows the model to retain its pre-trained knowledge while the adapter "nudges" the features to fit the new task. If the adapter learns nothing, the model simply reverts to its pre-trained state, making it more robust than serial alternatives.
Meta-Testing Optimization
During the "meta-test" phase, the task-agnostic backbone is frozen. The model only optimizes the adapters and a linear pre-classifier transformation ($\beta$) using the cross-entropy loss on the few labeled support samples. This optimization typically requires only about 40 iterations. The adapters are implemented as $1 \times 1$ convolutions (matrix multiplication in the channel dimension), providing the necessary capacity to realign features for distant domains.
Evaluation
The primary evaluation is conducted on Meta-Dataset, consisting of 13 diverse datasets. Eight are seen during training (e.g., ImageNet, Birds), and five are entirely unseen (e.g., Traffic Signs, MSCOCO, MNIST).
Key Results
The proposed method, dubbed URL+RA (Universal Representation Learning + Residual Adapters), set a new state-of-the-art on Meta-Dataset:
- Massive Gains on Unseen Domains: On the Traffic Sign dataset, the method improved accuracy by +19.5% over the previous best approach. It also saw gains of +8.7% on CIFAR-10 and +6.8% on CIFAR-100.
- Superior Ranking: It achieved an average rank of 1.6 across all 13 datasets, outperforming complex competitors like CNAPS and CTX.
- Efficiency: Despite the optimization step at test time, the method is efficient. It trains significantly faster than attention-based competitors while maintaining a negligible increase in the total number of parameters.
Conclusion
The core insight of this work is that direct optimization of a few parameters is more robust than relying on a meta-trained auxiliary network, especially when dealing with domain shifts. Residual adapters provide a safe and effective way to "nudge" features toward a new domain without breaking the pre-trained representation. Future work may explore automated ways to determine optimal adapter placement or combining these adapters with more advanced feature extraction techniques.
Summary updated