Abstract
Cross-domain few-shot learning (CDFSL) requires models to recognize novel categories from limited examples in target domains that differ significantly from training data. Traditional approaches often rely on complex, rigid "universal" feature extractors that are difficult to update and require homogeneous architectures. This paper proposes Feature Extractor Stacking (FES), a flexible framework that independently fine-tunes multiple pretrained models and combines their predictions using a stacking classifier. FES achieves state-of-the-art performance on the Meta-Dataset benchmark, particularly in strong generalization tasks, while remaining architecture-agnostic.
Introduction
Few-shot learning (FSL) involves teaching a model to recognize new categories from a small "support set." In the more challenging context of Cross-domain Few-shot Learning (CDFSL), the model must generalize to target domains (e.g., medical X-rays or satellite imagery) that look nothing like its source training data (e.g., ImageNet).
Current state-of-the-art methods typically attempt to build a single "universal feature extractor" to distill knowledge from multiple source domains. However, these methods face three primary challenges:
- Rigidity: Adding a new source domain often requires retraining the entire universal model.
- Homogeneity: Most methods require all source models to share the same neural architecture.
- Complexity: Meta-training these models is computationally expensive and often requires manual weighting of datasets.
Methodology: Feature Extractor Stacking (FES)
FES adopts a "lazy" learning approach inspired by classic Stacked Generalization. Instead of a complex meta-training phase, FES operates during the meta-testing phase when the few-shot task is presented.
The FES Pipeline
- Independent Fine-tuning: Given a new task, FES takes several pretrained extractors from different source domains and fine-tunes them independently on the small support set.
- Snapshotting: During fine-tuning, multiple "snapshots" of each model are saved at different iterations to capture the trajectory of model adaptation.
- Two-Fold Cross-Validation: To prevent the final classifier from overfitting to the tiny support set, a 2-fold CV strategy is used. The model trains on one half of the support set to generate "meta-data" (logits) on the other half.
- The Stacking Classifier: A simple linear layer learns to weight the outputs of all snapshots. This allows the system to determine which models—and at which stage of their fine-tuning—are most relevant to the specific task.
Variants: ConFES and ReFES
The paper introduces two specialized variants to improve the stacking process:
- ConFES (Convolutional FES): Treats the sequence of snapshots as a time series, utilizing 1D depthwise convolutions to identify patterns in model evolution.
- ReFES (Regularized FES): Employs a "fused lasso" penalty to encourage sparse weights (ignoring useless models) and smooth transitions (ensuring adjacent snapshots have similar weights).
Experimental Setup and Datasets
The primary benchmark used is Meta-Dataset, a massive collection of diverse datasets.
- Source Domains: ImageNet, Omniglot, Aircraft, Birds, Textures, Quick Draw, Fungi, and VGG Flower.
- Target Domains (Strong Generalization): Traffic Signs, MSCOCO, MNIST, CIFAR-10, CIFAR-100, and specialized datasets including CropDisease, EuroSAT (satellite), ISIC (skin cancer), ChestX (X-rays), and Food101.
Key Insights
- Architecture Agnostic: Because FES operates in "logit space" (final output scores), it can combine different architectures, such as ResNet and EfficientNet, without modification.
- The Power of Snapshots: The authors found that the most effective version of a model is not always the final one. Stacking multiple snapshots allows FES to leverage early-stage features that may generalize better than later features that have begun to overfit.
- Automated Relevance: Unlike methods that manually boost specific datasets like ImageNet, FES determines task-specific relevance automatically from the support set. If a task resembles satellite imagery, the model naturally learns to trust extractors trained on similar data.
Results and Discussion
FES and its variants consistently outperformed top-tier methods like URL, FLUTE, and TSA on the Meta-Dataset benchmark. The performance gains were most significant in "strong generalization" tasks—those furthest from the original training data, such as medical and satellite imagery. Heatmaps of stacking weights confirmed that FES successfully ignores irrelevant source domains and focuses on the most promising extractors for a given task.
Limitations
- Inference Latency: Fine-tuning multiple extractors is more computationally expensive during the inference stage than using a single universal model. Parallelization across multiple GPUs is a potential mitigation strategy.
- Storage: Storing dozens of snapshots for multiple models requires significant memory. However, the sparsity of the stacking weights suggests that pruning strategies could reduce the final model size.
Conclusion
Feature Extractor Stacking provides a robust and flexible alternative to universal feature extractors in CDFSL. By leveraging independent fine-tuning and automated weight learning, FES achieves state-of-the-art results while maintaining the ability to incorporate heterogeneous model architectures. Future work will explore different regularizations to incorporate prior biases for specific domains.
Summary updated