[Paper Review] Low-Shot Learning with Imprinted Weights
This paper introduces weight imprinting, a method that directly sets final-layer weights of a ConvNet classifier using scaled activations from novel class examples, enabling instant classification performance with minimal data. Experiments show that averaging imprinted embeddings outperforms nearest-neighbor classification and provides superior fine-tuning initialization, especially in 1–5 shot learning scenarios on CUB-200-2011.
Human vision is able to immediately recognize novel visual categories after seeing just one or a few training examples. We describe how to add a similar capability to ConvNet classifiers by directly setting the final layer weights from novel training examples during low-shot learning. We call this process weight imprinting as it directly sets weights for a new category based on an appropriately scaled copy of the embedding layer activations for that training example. The imprinting process provides a valuable complement to training with stochastic gradient descent, as it provides immediate good classification performance and an initialization for any further fine-tuning in the future. We show how this imprinting process is related to proxy-based embeddings. However, it differs in that only a single imprinted weight vector is learned for each novel category, rather than relying on a nearest-neighbor distance to training instances as typically used with embedding methods. Our experiments show that using averaging of imprinted weights provides better generalization than using nearest-neighbor instance embeddings.
Motivation & Objective
- To enable instant classification of novel visual categories with only one or a few training examples, mimicking human-like few-shot recognition.
- To overcome limitations of standard fine-tuning, which requires retraining on all prior data and is infeasible for resource-limited devices.
- To improve upon embedding-based methods by replacing multiple stored exemplars with a single averaged embedding vector per class, reducing memory and improving generalization.
- To provide a better initialization for subsequent fine-tuning by using imprinted weights instead of random initialization.
Proposed method
- The method computes penultimate-layer activations from a single or multiple training images of a novel class and scales them to form final-layer weights.
- A normalization layer with a learnable scaling factor enables direct copying of these activations as classifier weights, preserving the standard ConvNet parametric form.
- For multiple examples per class, the activations are averaged to form a single, stable weight vector, replacing the need for storing all individual embeddings.
- The imprinted weights are used directly for inference, providing immediate classification performance without retraining.
- The approach is compatible with standard backpropagation, allowing further fine-tuning when more data becomes available.
- The method is evaluated using a standard softmax cross-entropy loss, contrasting with more complex loss functions like triplet or lifted structured loss.
Experimental results
Research questions
- RQ1Can direct weight initialization using activations from few-shot examples achieve better immediate classification performance than nearest-neighbor retrieval on stored embeddings?
- RQ2Does averaging imprinted embeddings improve generalization compared to using individual exemplar embeddings in nearest-neighbor classification?
- RQ3How does weight imprinting compare to random initialization as a starting point for fine-tuning in low-shot learning?
- RQ4Can imprinting be effectively combined with fine-tuning to achieve better final accuracy than standard training approaches?
- RQ5Does the choice of loss function (e.g., softmax vs. lifted structured loss) affect the performance of the imprinted weights?
Key findings
- Imprinting with averaged embeddings achieved 52.25% top-1 accuracy on CUB-200-2011 with 20-shot learning, outperforming nearest-neighbor classification using individual embeddings.
- The imprinted model achieved 48.74% top-1 accuracy in 10-shot learning, significantly outperforming the baseline nearest-neighbor approach.
- When fine-tuned, the imprinted weights led to 70.07% top-1 accuracy in 20-shot learning, surpassing the 71.57% achieved with random initialization and fine-tuning.
- The method reduced test-time memory and computation by storing only one weight vector per class instead of all exemplar embeddings.
- Increasing embedding dimensionality from 64 to 512 had no significant effect on performance, indicating robustness to embedding size.
- The softmax loss with imprinting outperformed the lifted structured loss in the same setup, suggesting that simpler objectives can be more effective when combined with imprinting.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.