Long-tailed Classification from a Bayesian-decision-theory Perspective

Bolian Li, Ruqi Zhang

TL;DR

Existing long-tailed classification techniques rely on heuristic loss re-weighting or multi-expert ensembling without a unifying theoretical grounding. This paper proposes Long-tailed Bayesian Decision (LBD), a Bayesian-decision-theory framework that optimizes an integrated risk objective using variational EM and particle optimization. It not only provides a principled foundation for both re-balancing and ensembling, but also introduces task-adaptive utility matrices to penalize dangerous misclassifications (e.g., mistaking rare tail samples for common head samples).

What Problem Does This Paper Address?

In real-world data, class distributions are heavily skewed: a few "head" classes have abundant samples, while many "tail" classes have very few. Standard models trained on long-tailed distributions perform poorly on tail classes. Furthermore, real-world applications often feature asymmetric misprediction costs—mistaking a rare, critical condition (tail) for a common one (head) is typically far more dangerous than the reverse.

Existing solutions rely on heuristic re-balancing losses (which sacrifice head accuracy) or multi-expert ensembling (which lack formal statistical justification). Crucially, existing methods treat parameter inference, decision-making costs (decision loss), and the train-test distribution shift as disjoint problems, while failing to provide reliable uncertainty calibration.

Methods

LBD unifies data distribution shift, decision loss, and posterior inference under Bayesian Decision Theory:

  1. Integrated Risk Objective & Variational EM: Rather than minimizing standard training loss, LBD maximizes the integrated gain over the testing distribution $p_{\text{test}}(x, y)$ and posterior $p(\theta|\mathcal{D}_{\text{test}})$. To make optimization tractable, the authors derive a variational lower bound using importance sampling: $$\frac{p_{\text{test}}(x, y)}{p_{\text{train}}(x, y)} \propto \frac{1}{f(n_y)}$$ This naturally derives classical re-balancing weights as importance weights bridging uniform test targets and long-tailed training distributions.

  2. Task-Adaptive Utility Functions: Instead of uniform zero-one loss, users can specify an asymmetric utility matrix $U_{ij} = u(y=i, d=j)$. The authors evaluate:

  3. One-hot utility: For standard top-1 classification accuracy.
  4. Tail-sensitive utility: Assigns negative penalties when true tail samples are incorrectly predicted as head classes.
  5. Particle-based Ensembles with Repulsive Regularization: To model the multimodal posterior without massive computational overhead, the parameter posterior is represented as an ensemble of a few "particles" (typically $\le 5$ neural network heads sharing backbone features). A repulsive regularization term—derived from the prior KL divergence—forces particles apart in parameter space early in training (decayed via an annealing schedule) to maintain ensemble diversity.

Datasets

The authors evaluated LBD on three standard long-tailed vision benchmarks:

  • CIFAR-10-LT (sampled from CIFAR-10)
  • CIFAR-100-LT (sampled from CIFAR-100)
  • ImageNet-LT (sampled from ILSVRC 2012; 1,000 classes, 115.8K images)

Evaluation metrics: Standard top-1 overall accuracy, regional accuracy (Head, Med, Tail), Expected Calibration Error (ECE), Area Under ROC (AUC), and a newly introduced metric: False Head Rate (FHR).

Key Insights and Ideas

  • Re-balancing is importance sampling: The ratio $\frac{p_{\text{test}}(x, y)}{p_{\text{train}}(x, y)} \propto \frac{1}{f(n_y)}$ reveals that common frequency-based loss weightings (e.g., linear inverse frequency $1/n_y$ or effective number of samples) are mathematically justified as importance weights correcting for dataset shift between uniform evaluation and skewed training.
  • Ensembles naturally reflect posterior uncertainty in the tail: Tailed classes lack sufficient empirical data to constrain the model to a single optimum. Maintaining diverse ensemble particles directly approximates the Bayesian posterior over these under-constrained solution spaces.
  • Asymmetric risks can be plugged directly into training: By incorporating utility functions into the variational lower bound, models can be explicitly trained to avoid high-cost errors (e.g., false head predictions) without catastrophic degradation of overall accuracy.

Key Results

  • Standard Accuracy: LBD establishes state-of-the-art results across datasets:
  • CIFAR-10-LT: 83.75% overall accuracy (vs. 83.11% for RIDE and 79.70% for TLC).
  • CIFAR-100-LT: 50.24% overall accuracy (vs. 48.99% for RIDE); tail accuracy rose to 30.34% (compared to 10.62% for Cross-Entropy and 28.78% for RIDE).
  • ImageNet-LT: 55.73% overall accuracy (vs. 54.32% for RIDE and 55.03% for TLC).
  • Tail Sensitivity (False Head Rate): Using the tail-sensitive utility matrix, LBD reduced average FHR dramatically compared to standard Cross-Entropy:
  • CIFAR-10-LT: Average FHR dropped from 35.91% (CE) and 15.50% (RIDE) down to 9.25%.
  • CIFAR-100-LT: Average FHR improved from 69.95% (CE) and 40.11% (RIDE) down to 32.08%, with only a negligible 0.04% reduction in overall accuracy.
  • Uncertainty Calibration: Bayesian predictive entropy markedly lowered calibration errors; on ImageNet-LT, LBD achieved an ECE of 8.72% (compared to 18.35% for MCP and 15.29% for evidential uncertainty in TLC).

Limitations and Future Work

  • Uniform Test Distribution Assumption: The mathematical derivation assumes the target testing distribution is uniformly balanced. If test targets follow arbitrary or non-uniform distributions, the discrepancy ratio $\frac{p_{\text{test}}(y)}{p_{\text{train}}(y)}$ requires a more general estimation.
  • Hand-Crafted Utility Matrices: The tail-sensitive utility matrix uses pre-selected penalty weights; real-world downstream scenarios with complex semantic hierarchies may require more granular calibration.
  • Domain Extension: The authors note that applying LBD to long-tailed regression and broader out-of-distribution (OOD) dataset shifts remains an open direction.

Summary updated

BibTeX
@inproceedings{li2023long,
  author = {Bolian Li and Ruqi Zhang},
  title = {{Long-tailed Classification from a Bayesian-decision-theory Perspective}},
  booktitle = {AABI},
  year = {2023},
  url = {https://openreview.net/forum?id=sz7d2cKXVb},
}
Figure