FEAT
A few-shot image classifier that adapts instance embeddings to each task with a Transformer set-to-set function.
Image classification · 117 operations Checked
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
- Task
- Image classification
- Parameters
- 14.1M
- Operations
- 117
- Framework
- PyTorch
- Recurrent
- No
- Published
- CVPR 2020
- Cited by
- 856 (as of 3 November 2026)
- Authors
- Han-Jia Ye, Hexiang Hu, De-Chuan Zhan, Fei Sha
- Source
- GitHub: Sha-Lab/FEAT
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m16550
- Graph hash
- 1913abbc6c92e1bd500ccb41907f8753593891e52043ee34ae4e01bb233223e4
- Skeleton hash
- a61b6006584c920cb125cfce71a651f9d4b0ef6c59a9d69fb336f873f483f27e
- Architecture hash
- 9828157210f800b9b27eadd6927232408f0633ad90d69e78e97889a785805a32
- Diagram SHA-256
- ea7f5d63154e9128d340728ebc05318c068bbea28a884efc6a1669c5fa781a84
- 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
FEAT (few-shot embedding adaptation with Transformer) is a model for few-shot classification, where classes must be recognized from limited labeled data. Many few-shot methods learn an instance embedding function on seen classes and then apply it to instances from unseen classes. The paper calls this style task-agnostic: the embedding function is not learned to be optimally discriminative for the unseen classes.
FEAT adapts the instance embeddings to the target classification task with a set-to-set function, so that the embeddings become task-specific. The authors compared several such functions: a bidirectional LSTM, deep sets, a graph convolutional network and a Transformer. They observed the Transformer to be the most effective. Its self-attention transforms each instance embedding with consideration of the other instances in the set. The paper notes that it outputs refined instance embeddings and is permutation invariant. A contrastive objective is applied during training in addition to the general one.
The paper considers three backbones for the embedding function: a 4-layer convolution network, a 12-layer residual network and a Wide Residual Network. With the ResNet-12 backbone, the code repository lists 66.78 for 1-shot 5-way tasks and 82.05 for 5-shot 5-way tasks on MiniImageNet.
Key idea. The paper adapts instance embeddings to each few-shot task with a set-to-set function and finds the Transformer the most effective choice among those it tested.
- FEAT
- Few-shot Embedding Adaptation with Transformer
- few-shot learning
- few-shot image classification
- embedding adaptation
- set-to-set function
- MiniImageNet
- TieredImageNet
- meta-learning
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{ye2021fewshotlearningembeddingadaptation,
title={Few-Shot Learning via Embedding Adaptation with Set-to-Set Functions},
author={Han-Jia Ye and Hexiang Hu and De-Chuan Zhan and Fei Sha},
year={2021},
eprint={1812.03664},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/1812.03664},
}