Unsupervised Few-Shot Image Classification by Learning Features into Clustering Space

Shuo Li, Fang Liu, Zehua Hao, Kaibo Zhao, Licheng Jiao

Abstract

Few-Shot Learning (FSL) typically requires large-scale labeled datasets to pre-train models. To alleviate the high cost of manual labeling, Unsupervised Few-Shot Learning (UFSL) has emerged. This paper proposes LF2CS (Learning Features into Clustering Space), a novel single-stage method that maps unlabeled images into a highly separable feature space by fixing cluster centers as an identity matrix. This approach enables the construction of high-quality training tasks without human intervention, achieving state-of-the-art performance across multiple benchmarks.

Introduction: The Challenge of Unlabeled Data

Standard FSL relies on a "base" dataset with thousands of labeled images to learn generalizable features. However, labeling such datasets is expensive. UFSL aims to learn from unlabeled data, but current methods face significant hurdles.

Existing UFSL approaches generally follow two paradigms:

  1. Augmentation-based (CSS): Tasks are created by comparing an image to its augmented versions. While simple, this lacks the semantic diversity of real-world categories.
  2. Clustering-based: Pseudo-labels are generated using algorithms like K-means. These are typically multi-stage processes—extracting features, clustering, and then training—which are computationally expensive and sensitive to initialization.
Comparison of task building strategies: (a) Label-based, (b) Random-based, (c) CSS-based, and (d) Clustering-based.

The authors of LF2CS bridge this gap by introducing a single-stage framework that jointly learns features and clusters, ensuring both efficiency and task diversity.

Methodology: Learning into Clustering Space

The core innovation of LF2CS is the use of Fixed Orthogonal Centers. Instead of iteratively updating cluster centers, the authors fix the cluster center matrix to the identity matrix.

Fixed Orthogonal Centers

By setting centers as the coordinate axes of a $d$-dimensional space, the clusters are naturally orthogonal and maximally separable. This provides a stable target for the feature learning process.

Single-Stage Pipeline

An image $x_i$ is passed through an encoder to produce a feature vector $z_i$. The "pseudo-label" (cluster ID) is determined by the index of the maximum value in $z_i$. This mapping is optimized alongside the feature extractor in a single stage.

The overall pipeline of the LF2CS framework, illustrating image sampling, task building, and joint network optimization.

Avoiding Model Collapse

To prevent the model from assigning all images to a single cluster (trivial solution), the authors enforce a capacity limit ($n_{max}$) for each cluster. If a cluster is full, the image is assigned to the next best available cluster based on the feature mapping.

Joint Optimization

The model is trained using two simultaneous losses:

  • Clustering Loss: A Cross-Entropy loss that encourages features to align with their assigned fixed cluster centers.
  • Few-Shot Loss: Based on "MatchNet," this loss requires the model to predict which images in a small "support set" belong to the same cluster as a "query" image.

Experimental Evaluation

The authors evaluated LF2CS on four standard few-shot benchmarks: Omniglot, miniImageNet, tieredImageNet, and CIFARFS.

Key Results

LF2CS consistently outperformed existing state-of-the-art unsupervised methods:

  • Omniglot: Achieved 97.31% accuracy on 5-way 1-shot tasks, approaching supervised performance levels.
  • miniImageNet: Reached 53.14% (1-shot) and 67.36% (5-shot) with a ResNet-12 backbone, significantly surpassing baselines like CACTUs and UMTRA.
  • Generalization: t-SNE visualizations confirmed that the learned clusters naturally align with semantic categories, such as grouping images by texture or shape, despite the absence of ground-truth labels during training.

Discussion and Future Work

The success of LF2CS stems from using orthogonality as a prior. By "freezing" the destination clustering space, the network has a stable target, simplifying the training pipeline.

However, some limitations remain. The performance is sensitive to the number of clusters ($d$), and the hard cluster size limit ($n_{max}$) is a relatively rigid constraint. Future work may explore soft-constraint methods for cluster balancing and the application of this mapping-to-fixed-space approach to modern architectures like Vision Transformers (ViTs).

Summary updated

BibTeX
@inproceedings{li2022unsupervised,
  author = {Shuo Li and Fang Liu and Zehua Hao and Kaibo Zhao and Licheng Jiao},
  title = {{Unsupervised Few-Shot Image Classification by Learning Features into Clustering Space}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-19821-2\_24},
}
Figure