Continual Learning with Bayesian Neural Networks for Non-Stationary Data

Richard Kurle, Botond Cseke, Alexej Klushyn, Patrick van der Smagt, Stephan Günnemann

Introduction

Most research in Continual Learning (CL) focuses on preventing "catastrophic forgetting"—the tendency of neural networks to completely lose knowledge of old tasks when learning new ones. However, in many real-world scenarios, such as financial markets, weather prediction, or user behavior analytics, the data distribution itself shifts over time. This phenomenon is known as concept drift.

In non-stationary environments, "remembering everything" is actually a disadvantage. If the underlying rules of the data have changed, old data becomes a liability that can deteriorate the model's current performance. The core challenge is the stability-plasticity dilemma: how to keep a model stable enough to learn from a continuous stream of data, while remaining plastic enough to adapt when that data fundamentally changes.

This paper introduces a more effective way to train Bayesian Neural Networks (BNNs) on streaming data that changes over time. By combining a novel "Gaussian Residual Scoring" method for memory management with adaptation techniques like Bayesian forgetting and diffusion processes, the authors enable models to smartly forget outdated information while maintaining high predictive accuracy.

Methodology

The authors build upon Variational Continual Learning (VCL), which approximates the model's "knowledge" (the posterior distribution) using two components: a diagonal Gaussian distribution and a small episodic "memory" of raw data points.

To improve upon standard VCL, they introduce three key innovations:

  1. Gaussian Residual Scoring (GRS): Previous methods chose memory points randomly or based on geometric distance (e.g., k-center). GRS instead evaluates the "residual"—the difference between the actual data likelihood and what the Gaussian approximation can capture. It retains the data points that the Gaussian part of the model finds hardest to represent, ensuring the memory buffer is truly complementary to the parametric model.
  2. Improved Gaussian Updates: The authors propose a more stable way to update the model's weights. By using the memory to "discount" local contributions during the update, they prevent the model from becoming over-regularized (too "stiff") when processing very small batches of streaming data.
  3. Model Adaptation (Forgetting): To handle non-stationary data, they introduce two specific mechanisms:
  4. Bayesian Forgetting (BF): This exponentially decays the influence of older likelihood terms over time.
  5. Ornstein-Uhlenbeck (OU) Process: This treats the model weights as a stochastic process that naturally drifts back toward the "prior" (initial state) if no new evidence is seen. This prevents the model's confidence from becoming artificially high and inflexible.

Key Insights and Results

The researchers evaluated their approach across static/online learning tasks (UCI regression, MNIST, Two-moons) and non-stationary concept drift tasks (Weather, Gas Sensor Array Drift, Covertype, and a rotating logistic regression toy problem).

The ELBO as a Quality Metric: A major theoretical insight is that the Evidence Lower Bound (ELBO)—the standard objective for Variational Bayes—can be decomposed into a sum of residuals. These residuals provide a mathematically grounded way to identify which data points are poorly approximated and thus belong in the memory buffer.

Solving VB’s "Small Data" Problem: Variational Bayes (VB) often fails on small streaming batches because it produces a posterior that is "too simple" (e.g., nearly linear). By including the memory in the optimization process, the authors effectively increase the batch size, leading to much better local optima.

Decision boundaries on the Two-moons dataset and training metrics (Expected log-likelihood and KL divergence) over iterations.

Superior Memory Management: On standard benchmarks like MNIST and UCI regression, the GRS method consistently outperformed VCL’s k-center and random selection strategies in terms of Log-Marginal Likelihood (LML).

Tracking Concept Drift: In non-stationary environments, the variance of a standard BNN posterior shrinks toward zero over time, effectively "locking" the model. The adaptation methods (BF and OU) prevent this by maintaining a healthy level of uncertainty.

  • In a rotating logistic regression task, standard online VB quickly converged to a useless "zero mean" model, whereas the BF and OU methods successfully tracked the sinusoidal movement of the true parameters.
  • On real-world drift datasets like Covertype and Weather, all adaptation methods significantly improved performance over standard online VB. While the OU process generally performed best, adding a running memory to Bayesian Forgetting closed the performance gap.

Limitations and Future Work

The authors acknowledge that Variational BNNs with uni-modal (Gaussian) approximations still struggle with complex, multi-modal posteriors, especially when data is scarce. While their Gaussian update helps mitigate this, it does not solve the fundamental limitation of the Gaussian assumption itself.

Future directions include:

  • Developing automated ways to infer the "forgetting rate" (adaptation parameters) using active drift detection.
  • Exploring non-Gaussian posterior approximations to better capture complex weight distributions.
  • Adapting the system to handle abrupt or recurring changes in data distribution, rather than just gradual, continuous drift.

Summary updated

BibTeX
@inproceedings{kurle2020continual,
  author = {Richard Kurle and Botond Cseke and Alexej Klushyn and Patrick van der Smagt and Stephan Günnemann},
  title = {{Continual Learning with Bayesian Neural Networks for Non-Stationary Data}},
  booktitle = {International Conference on Learning Representations},
  year = {2020},
}
Figure