LFD-ProtoNet: Prototypical Network Based on Local Fisher Discriminant Analysis for Few-shot Learning

Kei Mukaiyama, Issei Sato, Masashi SugiyamaarXiv 2020 · arXiv

Introduction

Few-shot learning (FSL) is a challenging paradigm where models must learn to recognize novel classes from a very limited number of labeled examples, known as the support set. One of the most influential approaches in this field is the Prototypical Network (ProtoNet). ProtoNet operates on the principle that there exists an embedding space where points cluster around a single prototype (the mean vector) for each class. Classification is then performed by finding the nearest prototype to a query sample using squared Euclidean distance (SED).

The standard Prototypical Network (ProtoNet) architecture, which relies on a simple class mean for classification.

Despite its simplicity and effectiveness, ProtoNet has a significant limitation: it assumes that a simple mean is a sufficient representation of a class. In scenarios where support samples exhibit high variance or follow a multimodal distribution (e.g., a "dog" class containing vastly different breeds), the mean becomes an unreliable prototype, leading to poor generalization and misclassification.

Proposed Method: LFD-ProtoNet

To address the representational weaknesses of standard ProtoNet, the authors introduce LFD-ProtoNet. This architecture enhances the classic model by integrating Local Fisher Discriminant Analysis (LFDA) to learn a task-specific subspace.

The proposed LFD-ProtoNet architecture, which integrates an LFDA block to generate a task-adaptive feature representation matrix F.

The LFDA Advantage

The core innovation lies in replacing the identity projection of ProtoNet with a projection matrix $F$ derived from LFDA. While standard Fisher Discriminant Analysis (FDA) attempts to collapse all samples of a class into a single point, LFDA is designed to preserve the local structure of the data. This is crucial for multimodal classes; LFDA ensures that samples near each other within the same class remain close, while samples from different classes are maximally separated.

The workflow of LFD-ProtoNet consists of four main stages:

  1. Feature Extraction: An embedding network $f_\theta$ (such as ResNet-12) maps input images into a high-dimensional latent space.
  2. LFDA Projection: For each task, the model calculates a specific projection matrix $F$. This matrix defines a subspace that minimizes local within-class variance and maximizes between-class separation.
  3. Task-Adaptive Subspace: The projection creates a discriminative environment where prototypes are more robust to intra-class variance.
  4. Classification: Query images are projected into this LFDA-optimized subspace and classified based on their distance to the class prototypes $\mu$.

By utilizing LFDA, the model can extract up to $kC - 1$ useful features (where $k$ is the number of shots and $C$ is the number of classes), significantly increasing its "expression power" compared to the $C - 1$ features provided by standard FDA.

Experimental Evaluation

LFD-ProtoNet was evaluated on two benchmark datasets: miniImageNet and tieredImageNet. The latter is particularly challenging as it groups classes into broader categories, testing the model's ability to generalize across semantic boundaries.

Key Results

The model demonstrated state-of-the-art performance, particularly in 5-shot scenarios:

  • miniImageNet (5-shot): LFD-ProtoNet achieved 76.5% accuracy, a substantial improvement over the baseline ProtoNet (68.2%) and slightly edgeing out TapNet (76.36%).
  • tieredImageNet (5-shot): The model reached 78.0% accuracy, again outperforming ProtoNet (72.69%) and remaining competitive with more complex meta-learning architectures.

Discussion and Insights

The success of LFD-ProtoNet highlights that locality matters in few-shot learning. By respecting the internal clusters of a class, the model avoids the pitfalls of over-simplification inherent in mean-based prototypes. Furthermore, the authors provide a theoretical guarantee, showing that the LFDA objective function directly minimizes the upper bound of classification risk.

While LFD-ProtoNet excels in 5-shot tasks, it faces challenges in 1-shot scenarios where calculating local covariance is inherently difficult due to the lack of multiple samples per class. Additionally, the requirement to compute a new projection matrix for every task introduces some computational overhead compared to the original ProtoNet.

Conclusion

LFD-ProtoNet represents a significant step forward for metric-based few-shot learning. By combining the simplicity of Prototypical Networks with the discriminative power of Local Fisher Discriminant Analysis, it provides a robust framework for handling high-variance data. Future work may involve extending this approach to semi-supervised settings, using unlabeled data to better estimate local structures and further refine the task-adaptive subspaces.

Summary updated

Abstract

The prototypical network (ProtoNet) is a few-shot learning framework that performs metric learning and classification using the distance to prototype representations of each class. It has attracted a great deal of attention recently since it is simple to implement, highly extensible, and performs well in experiments. However, it only takes into account the mean of the support vectors as prototypes and thus it performs poorly when the support set has high variance. In this paper, we propose to combine ProtoNet with local Fisher discriminant analysis to reduce the local within-class covariance and increase the local between-class covariance of the support set. We show the usefulness of the proposed method by theoretically providing an expected risk bound and empirically demonstrating its superior classification accuracy on miniImageNet and tieredImageNet.
BibTeX
@misc{mukaiyama2020lfd,
  author = {Kei Mukaiyama and Issei Sato and Masashi Sugiyama},
  title = {{LFD-ProtoNet: Prototypical Network Based on Local Fisher Discriminant Analysis for Few-shot Learning}},
  year = {2020},
  eprint = {2006.08306},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.08306},
}
Figure