Abstract
Meta-learning for few-shot learning (FSL) typically relies on simple base learners like nearest-neighbor classifiers. This paper introduces MetaOptNet, which replaces these with discriminative linear predictors, specifically Support Vector Machines (SVMs). By leveraging the dual formulation of convex optimization and implicit differentiation, MetaOptNet allows for efficient, end-to-end training of deep embedding networks. The approach achieves state-of-the-art results on miniImageNet, tieredImageNet, CIFAR-FS, and FC100 benchmarks.
Introduction
Few-shot learning (FSL) aims to recognize new categories from a very limited number of examples (typically one or five). Most successful approaches utilize a meta-learning strategy: they train an embedding model (a neural network) such that a base learner (a simple classifier) can effectively distinguish between classes in the resulting vector space.
A significant limitation in existing FSL methods is their reliance on simple base learners, such as nearest-neighbor or prototypical (mean-based) classifiers. These methods often fail to exploit "negative examples" and struggle with high-dimensional feature spaces without overfitting. MetaOptNet addresses this by integrating more powerful discriminative classifiers, like SVMs, into the deep learning pipeline.
Methods
The core contribution of MetaOptNet is the use of differentiable convex optimization as the base learner within a meta-learning framework.
- Linear Classifiers as Base Learners: Instead of simple distance metrics, the model solves a multiclass SVM (Crammer-Singer formulation) or Ridge Regression problem for every new task.
- Implicit Differentiation: To train the embedding network, the system requires gradients from the optimization process. Rather than "unrolling" optimization steps, the authors apply the Implicit Function Theorem to the Karush-Kuhn-Tucker (KKT) conditions, allowing direct computation of gradients for the optimal solution.
- Dual Formulation for Efficiency: In FSL, the number of examples ($N$) is small, while the feature dimension ($d$) is large (e.g., 16,000). Solving the SVM in its dual form makes computational complexity dependent on $N$ rather than $d$, making it feasible to run an SVM solver in the inner loop of training.
Key Results
MetaOptNet achieved state-of-the-art results across major benchmarks at the time of its publication. By using a ResNet-12 backbone, the model demonstrated superior accuracy compared to both simple metric-based learners and more complex meta-learning algorithms.
- miniImageNet: Reached 62.64% (1-shot) and 78.63% (5-shot) accuracy.
- tieredImageNet: Achieved 65.99% (1-shot) and 81.56% (5-shot) accuracy.
- Efficiency: Despite the complexity of solving a Quadratic Program (QP) in every step, the dual formulation kept overhead modest. The SVM solver added only 30-50% to total computation time compared to simpler Prototypical Networks when using a ResNet-12 backbone.
Discussion and Insights
- Discriminative Power: SVMs learn better class boundaries by explicitly maximizing margins and utilizing all available data points, including negatives.
- Regularization and High Dimensions: The built-in regularization of SVMs (weight decay and margin maximization) provides essential robustness as embedding dimensions grow, preventing the overfitting common in nearest-neighbor methods.
- Meta-Training Shot Count: Training the model on tasks with more examples (e.g., 15-shot) than it encounters at test time (e.g., 1-shot) significantly improves generalization.
Limitations and Future Work
While powerful, the current framework is limited to linear classifiers. Future research may explore Kernel SVMs to allow the model to increase its capacity as more data becomes available. Additionally, the performance of MetaOptNet is sensitive to specific regularization hyperparameters ($C$ for SVM, $\lambda$ for Ridge Regression), which may require tuning across different architectures.
Summary updated