Flexible Distribution Alignment: Towards Long-tailed Semi-supervised Learning with Proper Calibration

Emanuel Sanchez Aimar, Nathaniel Helgesen, Yonghao Xu, Marco Kuhlmann, Michael Felsberg

TL;DR

ADELLO tackles the challenge of long-tailed semi-supervised learning by dynamically aligning model predictions with unknown unlabeled data distributions while enforcing proper probability calibration. By combining adaptive logit adjustment with soft pseudo-label distillation for underconfident samples, it achieves state-of-the-art performance across multiple benchmarks without adding computational overhead.

What Problem Does This Paper Address?

In the real world, data rarely distributes itself evenly. Most datasets exhibit a "long-tailed" distribution, where a few frequent classes (head classes) contain the vast majority of the samples, while many rare classes (tail classes) have very few.

Semi-supervised learning (SSL) is a powerful tool to combat data scarcity by leveraging a small set of labeled data alongside a much larger pool of unlabeled data. However, standard SSL algorithms fall apart under long-tailed conditions. They typically assume that the labeled and unlabeled data share the same class distribution. In practice, the unlabeled distribution is usually unknown and often mismatched—a phenomenon known as label distribution shift.

When standard SSL models encounter this shift, they suffer from severe confirmation bias, over-allocating pseudo-labels to head classes. This leads to poorly calibrated models that are overly confident about wrong predictions and completely blind to rare tail classes.

Fig. 1: Long-tailed semi-supervised learning considers a challenging scenario, where a labeled dataset with a skewed class distribution, PL(y), see (a), can bias the model towards frequent classes. This challenge is exacerbated by the use of a larger unlabeled dataset with an unknown class distribution, Q(y), see (b), risking the reinforcement of data biases, which in turn leads to uncalibrated probabilities. Our evaluation focuses on misclassification error (complement of accuracy) and expected calibration error to test generalization and calibration. Our approach shows consistent improvements in both respects, as shown in (c) and (d).

Methods

To resolve these issues, the authors introduce ADELLO (Align and Distill Everything All at Once), a framework built on two core components:

  1. Flexible Distribution Alignment (FlexDA): Instead of assuming a fixed or known prior for the unlabeled data, FlexDA dynamically estimates the unlabeled class distribution during training using an Exponential Moving Average (EMA) of the model's pseudo-labels. It then applies a logit-adjusted loss to both the supervised and unsupervised objectives to counteract head-class bias. A progressive scheduler gradually smooths the target prior toward a uniform distribution by the end of training, ensuring a balanced classifier at inference time.
  2. Complementary Consistency Regularization (CCR): Standard threshold-based SSL methods throw away any unlabeled sample whose prediction confidence falls below a strict threshold (e.g., 0.95). CCR salvages these underconfident samples. Instead of forcing a hard pseudo-label, it applies a bias-corrected, distillation-based consistency loss using soft targets. It also features an imbalance-aware temperature selection mechanism that automatically adjusts the distillation temperature based on the estimated class imbalance.
Fig. 2: Method overview: Our flexible distribution alignment (FlexDA) aligns the classifier with the correct prior, dynamically estimated from unlabeled data. This approach extends FixMatch with a bias-adjusted supervised loss ((4), Sec. 4.1) and a bias-adjusted consistency loss ((5), Sec. 4.1) to debias high-confidence hard pseudo-labels. We also introduce a bias-adjusted complementary consistency loss to learn from low-confidence soft pseudo-labels (Sec. 4.2). A progressive scheduler steadily smooths the target prior, ˆQαt, leading to a balanced classifier by the conclusion of training.

Datasets

The authors evaluated ADELLO across a diverse set of benchmarks spanning different image resolutions and domains:

  • CIFAR10-LT & CIFAR100-LT: Artificially downsampled long-tailed variants of standard datasets, evaluated under forward, balanced, and reversed label shifts.
  • STL10-LT: A dataset featuring 100k unlabeled images that contain both in-distribution and out-of-distribution (OOD) classes.
  • ImageNet127: A large-scale, naturally imbalanced dataset grouping the 1,000 ImageNet classes into 127 hierarchically linked categories.
  • TissueMNIST-LT & EuroSAT-LT: Benchmarks used to test generalization outside of natural images, covering medical microscopy and satellite imagery respectively.

Key Insights and Ideas

  • Calibration and Generalization are Inseparable: A major takeaway is that model calibration (ensuring a model's confidence matches its actual accuracy) directly drives generalization in long-tailed settings. Better-calibrated models generate more reliable pseudo-labels, preventing the self-reinforcing bias toward head classes.
  • Don't Discard, Distill: Traditional SSL treats low-confidence samples as noise. ADELLO proves that these samples contain valuable dark knowledge. Distilling them with a higher, imbalance-aware temperature prevents confirmation bias while maximizing data utilization for rare classes.
  • Dynamic Priors are Highly Accurate: Tracking the unlabeled distribution via an EMA of pseudo-labels is surprisingly robust. The authors showed that the estimated prior closely tracks the ground-truth unlabeled prior from the very beginning of training, even under severe distribution mismatches.

Key Results

  • Robustness to Label Shift: On CIFAR100-LT with a severe reversed label shift ($\gamma_u = 0.02$), ADELLO achieved 53.0% accuracy, significantly outperforming the baseline FixMatch (45.4%) and previous state-of-the-art methods like UDAL (48.7%).
  • Large-Scale Superiority: On the massive ImageNet127 benchmark, ADELLO outperformed the previous best method (CoSSL) by +3.8% at $32\times32$ resolution and +4.2% at $64\times64$ resolution.
  • Exceptional Calibration: ADELLO dramatically reduced Expected Calibration Error (ECE). For instance, on the STL10-LT dataset, it brought the ECE down to 6.9%, compared to FixMatch's 37.8% and DARP's 31.6%.
  • Zero Computational Overhead: Unlike competing methods that rely on auxiliary classifiers, data re-sampling, or extra forward passes (like DASO, which takes over 19 hours to train), ADELLO trains in 5 hours and 18 minutes—virtually identical to the simple FixMatch baseline (5 hours and 15 minutes).

Limitations and Future Work

While ADELLO demonstrates impressive robustness, the authors point out a few limitations:

  • Closed-World Assumption: The framework assumes that all classes encountered during inference are known and labeled in the small training subset. Although it showed promise handling OOD data in STL10-LT, it isn't fully optimized for open-world scenarios where entirely novel classes appear at test time.
  • Task Complexity: The current formulation is tailored specifically for image classification. Adapting flexible distribution alignment to more complex vision tasks—such as object detection, instance segmentation, or video tracking—remains an open area for future research.

Summary updated

BibTeX
@inproceedings{aimar2024flexible,
  author = {Emanuel Sanchez Aimar and Nathaniel Helgesen and Yonghao Xu and Marco Kuhlmann and Michael Felsberg},
  title = {{Flexible Distribution Alignment: Towards Long-tailed Semi-supervised Learning with Proper Calibration}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72949-2\_18},
}
Figure