A unifying framework for generalised Bayesian online learning in non-stationary environments

Gerardo Duran-Martin, Leandro Sánchez-Betancourt, Alexander Y. Shestopaloff, Kevin Patrick Murphy

Abstract

Machine learning models often struggle with non-stationary data streams where underlying distributions shift over time. This paper introduces the BONE (generalised Bayesian Online learning in Non-stationary Environments) framework, a modular approach that unifies diverse algorithms—from classical Kalman filters to modern continual learning—into a single mathematical language. By decomposing online learning into five core components, BONE enables the development of hybrid methods, such as the proposed RL[1]-OUPR*, which effectively handle both gradual drifts and sudden shocks. Empirical evaluations across electricity forecasting and synthetic benchmarks demonstrate BONE's superior adaptability and robustness.

Introduction: The Challenge of Non-Stationarity

Most machine learning models are built on the "stationary" assumption: the data distribution remains constant over time. In the real world, this is rarely true. Sensors drift, consumer preferences shift, and global events cause sudden "shocks" to data patterns. While fields like changepoint detection and online continual learning have developed tools to handle these changes, they often utilize disparate mathematical languages, making direct comparison difficult.

The BONE framework bridges this gap by providing a unified "Lego-set" for building and comparing algorithms. It demonstrates that seemingly unrelated methods, such as the Kalman Filter (1960) and Bayesian Online Changepoint Detection (2007), are actually specific configurations within a broader taxonomy based on how they handle auxiliary variables.

Taxonomy of online learning methods unified under the BONE framework.

The BONE Framework

The authors propose breaking down any online learning algorithm into five modular choices:

  1. M.1 (Measurement Model): The base model, such as linear regression or a deep neural network.
  2. M.2 (Auxiliary Process): The mechanism for tracking the environment's state (e.g., time since the last change).
  3. M.3 (Conditional Prior): The expectation of how model parameters evolve (e.g., smooth drift vs. complete reset).
  4. A.1 (Posterior Algorithm): The method for updating model weights (e.g., Variational Bayes).
  5. A.2 (Weighting Function): The update rule for beliefs about the environment's state.
Probabilistic graphical model showing the dependencies between auxiliary variables (psi), parameters (theta), and observations (y) over time.

This modularity allows for the creation of hybrid methods. For instance, the authors derive RL[1]-OUPR*, which combines a "Runlength" process (tracking time since a change) with an "Ornstein-Uhlenbeck" process (modeling smooth drift) and a "Prior Reset" (handling sudden jumps). This hybrid approach is uniquely capable of handling environments that exhibit both gradual trends and abrupt shocks simultaneously.

Empirical Evaluation and Key Results

The BONE framework was evaluated across several diverse scenarios:

  • Electricity Forecasting: Predicting UK electricity load during the COVID-19 lockdowns. The RL[1]-OUPR* method was among the fastest to adapt to the sudden behavioral shifts in March 2020, maintaining the lowest error rates.
  • Online Classification: In tasks with periodic sine-wave drift and sudden resets, BONE-derived methods significantly outperformed standard changepoint detectors, which often "panic" and reset too frequently during smooth changes.
  • The "Greedy" Advantage: Tracking every possible changepoint is computationally expensive. BONE shows that a "greedy" approach—tracking only the most likely state—is often more robust and efficient.
  • Robustness to Outliers: By utilizing robust update rules (like WoLF-IMQ), the framework can distinguish between genuine environmental shifts and isolated outliers that might otherwise trigger unnecessary model resets.

Conclusion

BONE offers a powerful unification of online learning research, providing both a theoretical map and a practical library for building adaptive models. While challenges remain in computational scaling for complex auxiliary variables and meta-parameter sensitivity, the framework's modularity paves the way for applying non-stationary logic to advanced architectures like Transformers and Graph Neural Networks.

Summary updated

BibTeX
@article{duranmartin2025unifying,
  author = {Gerardo Duran-Martin and Leandro Sánchez-Betancourt and Alexander Y. Shestopaloff and Kevin Patrick Murphy},
  title = {{A unifying framework for generalised Bayesian online learning in non-stationary environments}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2025},
}
Figure