Label Shift Meets Online Learning: Ensuring Consistent Adaptation with Universal Dynamic Regret

Yucong Dai, Shilin Gu, Ruidong Fan, Chao Xu, Chenping HouCVPR 2025

Introduction

In many real-world machine learning deployments, such as human motion detection from mobile sensors, the distribution of classes (labels) changes over time while the relationship between features and labels remains constant. This phenomenon, known as Online Label Shift (OnLS), presents a significant challenge for maintaining model accuracy in dynamic environments. While label shift is well-studied in offline "batch" settings, the online version is considerably more difficult. In a continuous data stream, models only encounter a few unlabeled samples at a time, and class distributions may drift gradually or jump abruptly.

Existing online methods often rely on "Black Box Shift Estimation" (BBSE), which involves inverting a confusion matrix. In data-sparse online settings, this frequently results in mathematically impossible negative label estimates. Such estimates break the convexity assumptions required for stable optimization. Furthermore, previous approaches struggled to simultaneously achieve low "static regret" (performance against the best fixed model) and "dynamic regret" (performance against a model that adapts at every step).

The LASU Framework

To address these challenges, this paper introduces LASU (LAbel Shift with Universal dynamic regret), a novel framework designed for robust real-time adaptation. The framework consists of two core components:

  1. OSCM-L (Online Soft Confusion Matrix-Likelihood): Instead of simple matrix inversion, OSCM-L employs a Maximum Likelihood Estimation (MLE) approach based on a multinomial distribution. This ensures that estimated label distributions are always non-negative, preserving the convexity of the risk function and enabling stable online optimization.
  2. Ensemble of Optimistic Learners: LASU runs multiple "base learners" in parallel, each utilizing Optimistic Online Mirror Descent (Opt-OMD) with a different step size. An "Optimistic Hedge" mechanism weights these learners, allowing the model to achieve universal dynamic regret. This theoretical guarantee ensures optimal performance regardless of whether the environment is stable or rapidly changing.
The LASU framework overview, showing the transition from initial labeled data to online adaptation using OSCM-L and ensemble learning.

Experimental Evaluation

The researchers evaluated LASU on six diverse datasets, simulating four types of label shifts (Linear, Bernoulli, Square, and Sine). The datasets spanned standard vision tasks (MNIST, CIFAR-10, Fashion-MNIST, CINIC-10), satellite imagery (EuroSAT), and real-world sensor data (SHL human motion dataset).

Key Results

LASU consistently outperformed state-of-the-art competitors, including ROGD, ATLAS, and FLH-FTL, across nearly every dataset and shift type. For instance, on the EuroSAT dataset with a Bernoulli shift, LASU achieved an average error of 4.42%, significantly lower than the next best method, UOGD, at 6.08%.

Average error over time for CIFAR-10 and EuroSAT datasets, comparing LASU ("Our algorithm") against various fixed step-size learners.

The performance gap between LASU and other methods tends to widen as more online samples are processed, as the OSCM-L estimator becomes increasingly precise. On the SHL human motion task, LASU demonstrated rapid adaptation to changing locomotion types, highlighting its potential for edge deployment on mobile devices.

Discussion and Future Work

The success of LASU stems from two critical insights. First, restoring mathematical convexity through likelihood-based estimation (OSCM-L) is essential for convergence in online settings. Second, maintaining an ensemble of learners with varying step sizes allows the model to be "minimax optimal," automatically finding the best adaptation rate for the current environment.

While LASU provides a robust solution for pure label shift, real-world scenarios often involve covariate shift (where feature distributions change) alongside label shift. Future research will investigate these "joint shifts." Additionally, while the ensemble approach is highly effective, it introduces computational overhead. Optimizing these methods for massive models and exploring "feature increment learning" remain promising avenues for future development.

Summary updated

BibTeX
@inproceedings{dai2025label,
  author = {Yucong Dai and Shilin Gu and Ruidong Fan and Chao Xu and Chenping Hou},
  title = {{Label Shift Meets Online Learning: Ensuring Consistent Adaptation with Universal Dynamic Regret}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.01434},
}
Figure