Persistent Mixture Model Networks for Few-Shot Image Classification

Arman Afrasiyabi, Jean-François Lalonde, Christian Gagné

TL;DR

MixtFSL improves few-shot image classification by modeling classes as multimodal mixtures rather than single prototypes. By jointly learning feature representations and trainable mixture components in a two-stage online process, it creates a highly discriminative feature space that generalizes exceptionally well to novel classes with minimal data.

What Problem Does This Paper Address?

Few-shot learning (FSL) aims to recognize new image categories using only a handful of examples. A dominant paradigm, exemplified by Prototypical Networks, assumes each class can be represented by a single "prototype" vector in feature space—a unimodal assumption.

However, real-world categories are often complex and multimodal (e.g., a "dog" class might include different breeds, poses, or backgrounds). Relying on a single point to represent a class leads to underfitting and poor generalization. While some researchers have tried using mixture models, they typically rely on offline clustering algorithms like DP-means. These methods are often computationally expensive, fail to capture the global distribution of base classes, and decouple feature learning from the clustering process.

Methods

The authors propose Mixture-based Feature Space Learning (MixtFSL), which learns a multimodal representation for base classes using a set of trainable mixture components. The training happens in two distinct stages:

  1. Initial Training: The feature extractor and mixture components are learned simultaneously. This stage uses two key losses:
  2. Assignment Loss ($\mathcal{L}_a$): Pulls feature vectors toward their nearest mixture component.
  3. Diversity Loss ($\mathcal{L}_d$): Prevents all components of a class from collapsing into a single point by encouraging them to spread out toward the class centroid.
  4. Progressive Following: To stabilize training and avoid "pull-push" oscillations (where cluster assignments change too rapidly for the network to converge), the authors introduce a leader-follower scheme. A fixed "target" network (the "leader") provides stable assignments for the training network (the "follower"). The target network is updated periodically, and the softmax temperature is gradually decreased to sharpen the clusters.
Figure 1. t-SNE [44] visualization of a single base class embedding (circles) (a) without, and (b) with our MixtFSL approach. MixtFSL learns a representation for base samples (circles) and associated mixture learned components (diamonds) that clusters a class into several modes (different colors). This more flexible representa- tion helps in training robust classifiers from few samples in the novel domain compared to the monolithic representation of (a). Embeddings are extracted from a miniImageNet with a ResNet-18.

Datasets

The model was evaluated on four standard few-shot benchmarks:

  • miniImageNet: A subset of ImageNet with 100 classes.
  • tieredImageNet: A larger subset of ImageNet with 608 classes, organized hierarchically.
  • FC100: Based on CIFAR-100, featuring low-resolution images and a challenging split between base and novel classes.
  • CUB-200-2011 (CUB): A fine-grained dataset of bird species, used for both standard and cross-domain (miniImageNet $\rightarrow$ CUB) evaluation.

Key Insights and Ideas

  • Joint Online Learning: Unlike previous mixture-based FSL methods that cluster as a post-processing step, MixtFSL allows gradients to flow through both the feature extractor and the mixture components simultaneously. This ensures the feature space is specifically optimized for multimodal representation.
  • The "Diversity" Requirement: The authors found that without the diversity loss ($\mathcal{L}_d$), mixture models naturally degrade into single-prototype models. The stop-gradient ($sg$) operator in this loss is critical for preventing total collapse.
  • Automatic Complexity Adjustment: During the progressive following stage, components that are never assigned any samples are simply discarded. This allows the model to automatically determine the optimal number of modes for each class based on the data.
  • Resistance to Forgetting: A significant finding is that MixtFSL retains its ability to classify base classes even after being adapted to novel classes, losing only ~0.5% accuracy compared to the ~30% drop seen in some alignment-based competitors.
Comparison of different loss configurations. Without diversity loss (a), components clump together. With diversity loss and stop-gradients (c), the model successfully learns distinct multimodal clusters.

Key Results

MixtFSL achieves state-of-the-art results across multiple backbones (Conv4, ResNet-12, ResNet-18, WideResNet).

  • miniImageNet (ResNet-12): Achieved 82.04% accuracy in 5-shot classification.
  • tieredImageNet (ResNet-12): Reached 86.16% in 5-shot classification.
  • Flexibility: When combined with other techniques like associative alignment, the model (MixtFSL-Align) reached 82.45% on miniImageNet and 88.20% on tieredImageNet, setting new benchmarks for inductive few-shot learning.

Limitations and Future Work

  • Training Complexity: The current two-stage "choreography" of training steps is somewhat complex and increases overall training time. The authors suggest that a single-stage procedure would be a valuable future improvement.
  • Dataset Sensitivity: The benefits of multimodal modeling are less pronounced on small, fine-grained datasets like CUB, where classes are naturally more unimodal. In these cases, the extra complexity of MixtFSL may not be necessary.
  • Inductive Focus: This work focuses on inductive inference (classifying novel samples one by one). Exploring how these multimodal representations could benefit transductive settings (using the structure of the entire novel set) remains an open question.

Summary updated

Abstract

We introduce Mixture-based Feature Space Learning (MixtFSL) for obtaining a rich and robust feature representation in the context of few-shot image classification. Previous works have proposed to model each base class either with a single point or with a mixture model by relying on offline clustering algorithms. In contrast, we propose to model base classes with mixture models by simultaneously training the feature extractor and learning the mixture model parameters in an online manner. This results in a richer and more discriminative feature space which can be employed to classify novel examples from very few samples. Two main stages are proposed to train the MixtFSL model. First, the multimodal mixtures for each base class and the feature extractor parameters are learned using a combination of two loss functions. Second, the resulting network and mixture models are progressively refined through a leader-follower learning procedure, which uses the current estimate as a "target" network. This target network is used to make a consistent assignment of instances to mixture components, which increases performance and stabilizes training. The effectiveness of our end-to-end feature space learning approach is demonstrated with extensive experiments on four standard datasets and four backbones. Notably, we demonstrate that when we combine our robust representation with recent alignment-based approaches, we achieve new state-of-the-art results in the inductive setting, with an absolute accuracy for 5-shot classification of 82.45 on miniImageNet, 88.20 with tieredImageNet, and 60.70 in FC100 using the ResNet-12 backbone.
BibTeX
@inproceedings{afrasiyabi2021persistent,
  author = {Arman Afrasiyabi and Jean-François Lalonde and Christian Gagné},
  title = {{Persistent Mixture Model Networks for Few-Shot Image Classification}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2021},
  doi = {10.1109/iccv48922.2021.00891},
}
Figure