All models

Meta-Baseline

Few-shot image classifier: a classification-pre-trained encoder meta-learned with cosine nearest-centroid matching.

Image classification · 73 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (24 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
8M
Operations
73
Framework
PyTorch
Recurrent
No
Published
ICCV 2021
Cited by
28 (as of 3 November 2026)
Authors
Yinbo Chen, Zhuang Liu, Huijuan Xu and others
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m18419
Graph hash
286ee08b32c8e3b52f333ef0e1517ac8c8e91a71173996ebdde2de0e7ae8a830
Skeleton hash
01bd030d8d3ae308765a3f6ae8c90585f4ce9459ba245e6a1187183ff6be6527
Architecture hash
31ae730ece08491ad64c42875905c8b97d76cc2baa372855e283cf7fce58c4f1
Diagram SHA-256
a6b1f841c03e25ba55f3f771d7296061ddbcf283d9475effd72d3c32aa85989c
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

Meta-Baseline is a two-stage method for few-shot image classification: pre-train a classifier on the whole label-set, then meta-learn the same network on few-shot tasks using its own evaluation metric. The paper's main purpose for it was to investigate whether the meta-learning objective is still effective on top of a model trained by ordinary classification.

The first stage trains a classifier on all base classes and removes its last fully-connected layer to leave an encoder, a model the paper calls Classifier-Baseline. At test time the mean embedding of each class's support samples serves as its centroid, and each query sample is assigned to the nearest centroid by cosine distance. The second stage optimizes the model on that same evaluation metric, over few-shot tasks sampled from the base classes. During this stage the cosine similarity is multiplied by a learnable scalar. The models for miniImageNet and tieredImageNet use ResNet-12 as the backbone.

The authors note that every component had been proposed in prior works, but that none of those works studied them as a whole. The official repository lists 5-way accuracy on miniImageNet of 63.17% (1-shot) and 79.26% (5-shot) for Meta-Baseline, against 58.91% and 77.76% for Classifier-Baseline. The paper's analysis found that during the meta-learning stage, novel class generalization can decrease while base class generalization is increasing.

Key idea. The paper explores meta-learning over a whole-classification pre-trained model on its evaluation metric and analyzes the trade-off between the two training objectives.

  • Meta-Baseline
  • Classifier-Baseline
  • few-shot learning
  • few-shot image classification
  • meta-learning
  • cosine nearest-centroid
  • whole-classification
  • miniImageNet
  • tieredImageNet
  • few-shot-meta-baseline

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{chen2021metabaselineexploringsimplemetalearning,
      title={Meta-Baseline: Exploring Simple Meta-Learning for Few-Shot Learning}, 
      author={Yinbo Chen and Zhuang Liu and Huijuan Xu and Trevor Darrell and Xiaolong Wang},
      year={2021},
      eprint={2003.04390},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2003.04390}, 
}