Transductive Maximum Margin Classifier for Few-Shot Learning

Fei Pan, Chunlei Xu, Jie Guo, Yanwen GuoarXiv 2021

Introduction

Few-shot learning (FSL) aims to recognize new categories using only a handful of labeled examples, typically one or five images per class (the "support set"). Standard deep learning models often struggle in this regime, as they tend to overfit to the limited support data. Most existing FSL methods are inductive, meaning they build a classifier using only the support set and then apply it to unlabeled "query" images. However, with so little labeled data, finding a separating hyperplane that generalizes well is extremely challenging.

This paper introduces FS-TMMC (Few-Shot Transductive Maximum Margin Classifier), a transductive approach that leverages the unlabeled query examples themselves to refine the decision boundary. By incorporating query data into the optimization process, the model captures valuable structural information about the data distribution, significantly improving generalization over standard inductive methods.

Methodology

The FS-TMMC approach consists of three main stages:

  1. Feature Extraction: Standard backbones (such as ResNet-18, WideResNet, or DenseNet) are pre-trained on a large "base" dataset to convert images into high-dimensional feature vectors.
  2. Transductive Optimization: Unlike a standard Support Vector Machine (SVM) that only considers labeled data, FS-TMMC optimizes a loss function that includes both a Hinge Loss (to ensure support examples are correctly classified with a large margin) and a Transductive Loss. The transductive component encourages unlabeled query examples to fall far from the decision boundary, effectively using them to "push" the hyperplane into the natural gaps between data clusters.
  3. Efficient Solving: To handle the non-differentiable nature of the standard SVM objective, the authors use smooth, differentiable surrogates (like the LogSumExp function). This allows for the use of L-BFGS, a highly efficient quasi-Newton optimization algorithm, to find the optimal hyperplane quickly during inference.
Conceptual comparison between (a) inductive learning using only support points and (b) transductive learning using query points to find a better separating hyperplane.

To handle multiple classes, the system employs a one-vs-rest strategy combined with Platt scaling to transform classifier outputs into probability distributions.

Experimental Results

The model was evaluated on standard few-shot learning benchmarks, including miniImageNet, tieredImageNet, and CUB-200-2011.

FS-TMMC achieves state-of-the-art (SOTA) performance across multiple benchmarks. On tieredImageNet, using a DenseNet backbone, it reached 89.84% accuracy in 5-way 5-shot tasks, outperforming previous transductive methods like LaplacianShot. Ablation studies further revealed that the transductive component provides a massive boost—over 7% improvement in 1-shot tasks compared to an inductive version of the same classifier.

Performance comparison of FS-TMMC against various baselines on the miniImageNet and tieredImageNet benchmarks.

Furthermore, in cross-domain robustness tests (miniImageNet $\rightarrow$ CUB), FS-TMMC outperformed other methods by a significant margin (e.g., 69.72% vs 66.33% for the next best method in 5-shot). This suggests that transductive adjustment is particularly helpful when the feature extractor is biased by a different training domain.

Discussion and Key Insights

  • Query Data as a Regularizer: The core innovation is treating unlabeled query data as a structural guide. In a 1-shot scenario, query points act as anchors that narrow down which separating hyperplanes are most plausible given the data's density.
  • Differentiable SVMs: By approximating the optimization problem with smooth functions, the authors enable the use of powerful gradient-based second-order optimizers like L-BFGS, making the transductive step computationally feasible at test time.
  • Limitations: While effective, FS-TMMC introduces computational overhead compared to simple forward-pass methods, requiring roughly 1 second per task. Additionally, its performance depends on processing query images in batches, which may limit its use in online settings where images arrive one by one.

Summary updated

BibTeX
@misc{pan2021transductive,
  author = {Fei Pan and Chunlei Xu and Jie Guo and Yanwen Guo},
  title = {{Transductive Maximum Margin Classifier for Few-Shot Learning}},
  year = {2021},
  eprint = {2107.11975},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2107.11975},
}
Figure