An Embarrassingly Simple Baseline to One-shot Learning

Chen Liu, Chengming Xu, Yikai Wang, Li Zhang, Yanwei Fu

Introduction

One-shot learning represents a significant challenge in computer vision: models must learn to recognize a completely new category after seeing only a single labeled example. While humans excel at this—recognizing a panda after seeing just one picture—deep learning models typically require thousands of examples to achieve similar proficiency.

Recent research has focused heavily on meta-learning ("learning to learn"), where models are trained on numerous small tasks to simulate the test environment. However, this paper argues that these complex algorithms can be outperformed by an "embarrassingly simple" baseline: a standard pre-trained ResNet-12 combined with feature normalization and a task-specific feature pruning strategy.

The Proposed Baseline

The authors propose a two-stage approach that avoids the complexity of meta-learning logic:

  1. Standard Pre-training: A ResNet-12 backbone is trained on a large "base" dataset using standard multi-class cross-entropy loss. Once trained, the network is frozen and used strictly as a feature extractor.
  2. Feature Normalization: The authors identify $L_2$ normalization of the extracted 512-dimension feature vectors as a critical step. This reduces "mean shift" issues and aligns feature scales, significantly boosting performance even for basic classifiers.
  3. Feature Pruning: Inspired by human perception—where we might focus on specific traits like color to distinguish between a lemon and a lime—the authors apply a binary mask to the 512 features. By testing random masks and selecting the one that performs best for a specific task, they isolate relevant features and ignore "noise" or domain-specific information that might be harmful to novel task performance.
Visualization of feature clusters for a 5-way classification task, demonstrating how normalized features can be separated into distinct categories.

Datasets and Evaluation

The study evaluates the method on two standard few-shot learning benchmarks:

  • miniImageNet: A subset of ImageNet containing 100 classes with 600 images per class.
  • tieredImageNet: A larger dataset with 608 classes grouped into broader categories, creating a more significant "domain gap" between training and testing classes.
Sample images from few-shot learning benchmarks showing the diversity of classes, including animals, household objects, and equipment.

Key Results

The "simple" baseline achieved leading performance, and the pruning strategy set new records for 5-way 1-shot learning, outperforming complex meta-learning methods like MAML and ProtoNet.

Method miniImageNet Accuracy tieredImageNet Accuracy
ProtoNet (Meta-learning) 51.98% -
MAML (Meta-learning) 54.69% -
Our Baseline (LR + Norm) 60.63% 69.02%
Best Prune Trial 66.83% 74.04%

The "Best Prune Trial" significantly outperformed then-current state-of-the-art methods like CAN (63.85%) and MetaOptNet (62.64%).

Discussion and Future Work

The primary insight of this work is that a high-dimensional embedding trained on general data already contains the necessary information for one-shot tasks; the challenge is selection rather than learning. While the current "Best Prune Trial" relies on a random search process, it proves that an optimal subset of features exists for every task.

Future work should focus on learning how to prune. Instead of random trials, a secondary model could be trained to analyze a one-shot support set and immediately predict the optimal pruning mask to isolate the most relevant features for that specific task.

Summary updated

BibTeX
@inproceedings{liu2020embarrassingly,
  author = {Chen Liu and Chengming Xu and Yikai Wang and Li Zhang and Yanwei Fu},
  title = {{An Embarrassingly Simple Baseline to One-shot Learning}},
  booktitle = {Workshops @ CVPR},
  year = {2020},
  doi = {10.1109/cvprw50498.2020.00469},
}
Figure