Bayesian Evidential Learning for Few-Shot Classification

Xiongkun Linghu, Yan Bai, Yihang Lou, Shengsen Wu, Jinze Li, Jianzhong He, Tao BaiarXiv 2022

TL;DR

Bayesian Evidential Learning (BEL) is a new "plug-and-play" framework that brings reliable uncertainty quantification to metric-based few-shot classification. By placing a Dirichlet distribution over class probabilities and fusing pre-trained knowledge with meta-learning, it improves both classification accuracy and model calibration across standard benchmarks.

What Problem Does This Paper Address?

Few-Shot Classification (FSC) is the art of teaching a model to recognize new categories from just a handful of examples. While state-of-the-art "metric-based" methods (which classify by measuring distances in a learned feature space) are accurate, they are often overconfident. A standard softmax output gives you a probability, but it doesn't tell you how certain the model is about that probability.

Traditional Bayesian Neural Networks (BNNs) try to solve this by placing distributions over model weights, but this is computationally expensive and difficult to tune for FSC. The authors identify a critical gap: we need a way to quantify uncertainty that is easy to integrate into existing high-performing metric-based models without making them impossible to train.

Methods

The authors propose Bayesian Evidential Learning (BEL), which shifts the focus from weight uncertainty to evidential uncertainty.

  1. Theory of Evidence: Instead of outputting a single probability vector, the network predicts the parameters ($\alpha$) of a Dirichlet distribution. This distribution acts as a "distribution of distributions," allowing the model to represent its belief mass for each class and a separate "uncertainty mass."

    Visualizing uncertainty on a simplex: (a) shows a sharp, confident correct prediction, while (d) shows a flat, uncertain distribution.
  2. Bayesian Evidence Fusion: The core innovation is a theorem that allows the model to fuse two sources of information:

  3. Prior Evidence: Knowledge from a fixed, pre-trained network ($f_{pre}$).
  4. Task Evidence: Knowledge learned by a meta-trained network ($f_{meta}$) during the specific few-shot task.

    This fusion happens at the distribution level, providing a principled way to combine general feature knowledge with task-specific adaptation.

  5. Adaptive Loss Function: They introduce a loss function that combines a Bayesian risk term with a KL divergence regularizer. Their gradient analysis proves that this creates a "smoother" optimization target that naturally penalizes overconfident but incorrect predictions.

Figure 2: The framework of Bayesian Evidential Learning. In the pre-training stage, the network is trained in the merged datasets of base classes. The weighted evidence η · αP provides prior evidence with relatively higher uncertainty. Given the prior evidence, the meta-trained network learns to form posterior evidence η · αP + αM. fpre: pre-trained network, fmeta: meta-trained network

Datasets

The researchers evaluated BEL on five standard few-shot benchmarks to ensure robustness:

  • miniImageNet and tieredImageNet: The "gold standards" for general few-shot learning.
  • CIFAR-FS and FC100: Smaller-scale datasets based on CIFAR.
  • CUB-200-2011: A fine-grained dataset focused on bird species.

Key Insights and Ideas

  • Decoupling is Key: By placing the distribution over class probabilities rather than weights, the authors decouple uncertainty modeling from the specific metric learning strategy (like Euclidean distance or EMD). This makes BEL "agnostic" to the underlying architecture.
  • Smooth Optimization: The gradient analysis reveals that BEL acts as a form of "learned label smoothing." Unlike standard cross-entropy, which can lead to vanishing gradients as the model becomes overconfident, BEL’s adaptive gradient keeps the optimization process healthy.
  • Prior Knowledge Matters: The paper shows that using a fixed pre-trained network to provide a "prior" significantly helps the model generalize to novel classes, effectively acting as a stabilizer during the meta-learning phase.

Key Results

BEL was integrated into leading FSC methods like Meta-Baseline and DeepEMD, yielding consistent improvements:

  • Accuracy Boost: On tieredImageNet (5-way 1-shot), Meta-Baseline + BEL achieved 69.92% accuracy compared to the baseline's 68.65%.
  • Calibration Success: The most dramatic results were in Expected Calibration Error (ECE), which measures how well predicted probabilities match actual accuracy. On miniImageNet (5-shot), Meta-Baseline's ECE dropped from a staggering 14.69% to just 3.59% when using BEL.
Table showing that BEL significantly reduces calibration error (ECE) across different algorithms and datasets.

Limitations and Future Work

While BEL is effective, it introduces two new hyperparameters: $\eta$ (weighting the prior evidence) and $\lambda$ (controlling the KL penalty). The authors note that the optimal values for these can vary depending on the dataset and the quality of the pre-trained embedding.

Future work could explore automated ways to tune these parameters or extending the Bayesian fusion theorem to other domains like few-shot regression or object detection where uncertainty is equally critical.

Summary updated

BibTeX
@misc{linghu2022bayesian,
  author = {Xiongkun Linghu and Yan Bai and Yihang Lou and Shengsen Wu and Jinze Li and Jianzhong He and Tao Bai},
  title = {{Bayesian Evidential Learning for Few-Shot Classification}},
  year = {2022},
  eprint = {2207.13137},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2207.13137},
}
Figure