Uncertainty-based Network for Few-shot Image Classification

Minglei Yuan, Qian Xu, Chunhao Cai, Yin-Dong Zheng, Tao Wang, Tong Lu

TL;DR

The Uncertainty-Based Network (UCN) improves transductive few-shot image classification by explicitly modeling the uncertainty of unlabeled query instances. By using mutual information across multiple data augmentations to weight query contributions, UCN iteratively refines class prototypes, achieving significant accuracy gains over state-of-the-art methods.

What Problem Does This Paper Address?

Few-shot learning (FSL) is the challenge of training a model to recognize new categories using only a handful of labeled examples (the "support set"). A powerful technique in this field is transductive inference, where the model looks at the entire unlabeled "query set" at once to improve its internal representations, or "prototypes," of each class.

Standard transductive methods usually use classification scores as a measure of confidence: if the model is 90% sure a query image is a "dog," it uses that image to update its "dog" prototype. However, the authors point out a critical flaw: high classification scores do not always mean low uncertainty.

As shown in Figure 1, a model might give a high score to a confusing or noisy image, leading to "prototype drift" where the class representation becomes corrupted by bad data.

![Fig.

  1. Examples of classification scores and uncertainty. High scores can still have high uncertainty, potentially misleading the model.](/figures/art_197b9daca939457a9e4962e06ab90b6f)

Methods

The authors propose the Uncertainty-Based Network (UCN) to solve this by weighting query instances based on their measured uncertainty. The process follows an iterative pipeline:

  1. Data Augmentation: Each query instance is perturbed using multiple data augmentation techniques (e.g., cropping, flipping).
  2. Uncertainty via Mutual Information (MI): The model classifies all augmented versions of a query image. If the model's predictions vary wildly across these versions, the Mutual Information (MI) will be high, indicating high uncertainty. Conversely, consistent predictions across augmentations result in low MI (low uncertainty).
  3. Weight Generation: These MI values are fed into a learnable multi-head attention weight generator. This module produces weights that determine how much each query instance should influence the class prototypes.
  4. Iterative Prototype Refinement: The class prototypes are updated by taking a weighted average of the support instances and the query instances. This process repeats for $T$ iterations, gradually sharpening the class boundaries.

![Fig.

  1. The framework of the proposed UCN. It uses an iterative process to refine prototypes based on classification scores and uncertainty (MI) derived from multiple augmentations.](/figures/art_8a503b96d03f441b877ba50cd02afcee)

Datasets

The UCN was evaluated on four standard few-shot learning benchmarks:

  • miniImageNet: A subset of ImageNet often used for FSL.
  • tieredImageNet: A larger, more hierarchical subset of ImageNet.
  • FC100: Based on CIFAR-100, designed to be more challenging by minimizing semantic overlap between training and testing classes.
  • CIFAR-FS: Another CIFAR-100 based benchmark for few-shot tasks.

Key Insights and Ideas

  • Confidence $\neq$ Certainty: The core "aha moment" is that classification probability is an insufficient metric for transductive updates. Modeling the variance of that probability (via MI across augmentations) provides a much more robust signal.
  • Augmentation as a Probe: Instead of just using augmentation for training stability, UCN uses it at inference time as a diagnostic tool to see how "stable" the model's belief is about a specific unlabeled instance.
  • Attention-based Weighting: Using a multi-head attention mechanism to process uncertainty allows the model to learn complex relationships between uncertainty scores and prototype updates, rather than relying on a simple heuristic.

Key Results

UCN demonstrates impressive performance across all benchmarks, often outperforming existing inductive and transductive methods by 1% to 18% in classification accuracy.

  • Quantitative: On miniImageNet (1-shot), UCN achieved 76.78% accuracy, a significant jump over the baseline and comparable to or better than other SOTA transductive methods like MCT.
  • Qualitative: t-SNE visualizations (Figure 3) show that UCN's refined prototypes move much closer to the "Oracle" (the ideal prototype calculated with full labels) compared to previous methods. The decision boundaries become cleaner and more accurate.

![Fig.

  1. t-SNE visualization comparing MCT and UCN. UCN prototypes (diamonds) are closer to the ideal Oracle prototypes (stars) than MCT prototypes (squares).](/figures/art_d0ecaa8f7d6a419a8619871879ac780a)

Ablation studies confirmed that both the Mutual Information (UI) and the specific regularization loss were crucial, with the UI alone providing a ~4.27% boost in 5-way 1-shot settings.

Limitations and Future Work

While the paper demonstrates strong results, a few areas remain for exploration:

  • Computational Overhead: Performing multiple augmentations and $T$ iterations of refinement for every query set increases the computational cost at inference time compared to simpler inductive methods.
  • Choice of Augmentations: The performance likely depends on the specific suite of augmentations used; future work could investigate automated ways to select the best perturbations for uncertainty estimation.
  • Generalization: The authors suggest that while UCN works well for image classification, the principle of uncertainty-aware transductive refinement could be extended to other few-shot tasks like object detection or segmentation.

Summary updated

BibTeX
@misc{yuan2022uncertainty,
  author = {Minglei Yuan and Qian Xu and Chunhao Cai and Yin-Dong Zheng and Tao Wang and Tong Lu},
  title = {{Uncertainty-based Network for Few-shot Image Classification}},
  year = {2022},
  eprint = {2205.08157},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2205.08157},
}
Figure