Task-agnostic continual learning using online variational bayes with fixed-point updates

Chen Zeno, Itay Golan, Elad Hoffer, Daniel Soudry · DOI

Abstract

Catastrophic forgetting remains a significant hurdle for neural networks tasked with sequential learning. While many continual learning (CL) strategies mitigate this by assuming known task boundaries, real-world scenarios often involve gradual or unannounced distribution shifts. This paper introduces FOO-VB (Fixed-point Operator for Online Variational Bayes), a task-agnostic algorithm that leverages the mathematical properties of fixed-point updates to preserve knowledge. By treating weights as probability distributions and utilizing the curvature of the loss landscape, FOO-VB effectively "locks" critical parameters without requiring external memory or explicit task signals.

Introduction

Neural networks are notoriously susceptible to catastrophic forgetting: the tendency to overwrite weights optimized for previous tasks when learning new information. Traditional Continual Learning (CL) research often operates under the "task-aware" assumption, where the model is explicitly notified of task transitions. However, this is rarely the case in dynamic, real-world environments where data distributions change fluidly—a setting known as task-agnostic learning.

Existing solutions for task-agnostic scenarios frequently rely on "rehearsal" methods, which store and replay previous data samples. While effective, rehearsal introduces significant memory overhead and raises privacy concerns. FOO-VB addresses these challenges by providing a Bayesian framework for task-agnostic learning that operates within a fixed architecture and requires no external data storage.

Methodology: Online Variational Bayes via Fixed-Point Updates

The core of FOO-VB lies in Bayesian Inference. Theoretically, continual learning can be framed as a recursive process where the posterior distribution of weights from a previous task serves as the prior for the current one. Because exact Bayesian inference is computationally intractable for deep networks, the authors derive a novel set of Fixed-point Equations for Online Variational Bayes (VB).

Unlike standard gradient descent, which minimizes variational free energy through iterative steps, FOO-VB derives equations where optimal parameters—specifically the mean and variance of the weight distributions—are defined in terms of one another. This allows for more stable and mathematically grounded updates. The authors propose three implementations of the algorithm:

  1. Diagonal Gaussian: A lightweight version assuming weight independence, doubling the memory footprint of standard networks but offering high efficiency.
  2. Matrix Variate Gaussian: Utilizes a Kronecker-factored covariance matrix to capture intra-layer weight interactions, balancing computational feasibility with representational power.
  3. Multivariate Gaussian: A full-covariance version that serves as a theoretical upper bound but is practically limited by the memory constraints of large-scale networks.

Theoretical Insights: Curvature and Plasticity

FOO-VB introduces a unique mechanism for managing model plasticity through the relationship between uncertainty and the loss landscape:

  • Uncertainty as a Local Learning Rate: The standard deviation ($\sigma$) of a weight distribution effectively functions as its learning rate. High certainty (low $\sigma$) results in minimal weight changes, while high uncertainty allows for greater plasticity.
  • Hessian-Based Locking: The update rule for $\sigma$ is mathematically linked to the Hessian (the second-order derivative of the loss function). In regions of high positive curvature—indicating a stable local minimum—the model reduces uncertainty, effectively "freezing" the weights.
  • Escaping Saddle Points: Conversely, in regions of negative curvature (saddle points), the algorithm increases uncertainty, encouraging the model to explore the landscape and find more robust minima.

Because these updates occur per mini-batch based on the local geometry of the data, FOO-VB requires no explicit task boundaries. The model naturally adapts its plasticity based on the importance of the weights to the current and previous data distributions.

Experimental Evaluation

The researchers evaluated FOO-VB across several challenging benchmarks designed to simulate task-agnostic environments:

  • Discrete Task-Agnostic Permuted MNIST: A sequence of 10 tasks involving shuffled pixels where task transitions are hidden from the model.
  • Continuous Task-Agnostic Permuted MNIST: A more rigorous test where task transitions are gradual, featuring blended samples from consecutive tasks to simulate fluid distribution shifts.
  • Vision Datasets Mix: A complex sequence of heterogeneous datasets (MNIST, notMNIST, Fashion-MNIST, SVHN, and CIFAR10) to test the model’s ability to handle diverse visual features.

Key Results

FOO-VB demonstrated superior performance compared to established methods like Online EWC and MAS when adapted for task-agnostic settings. In the continuous Permuted MNIST benchmark, the Matrix Variate version of FOO-VB achieved near-oracle performance, experiencing less than 1% degradation in average accuracy after 10 tasks. The Diagonal version also proved highly effective, maintaining 88-94% accuracy while remaining significantly faster and more memory-efficient than the Matrix Variate implementation.

Limitations and Future Directions

While FOO-VB offers a robust framework for task-agnostic learning, it faces certain computational challenges. The Matrix Variate version requires Singular Value Decomposition (SVD) for its fixed-point updates, which, although parallelizable, is more computationally intensive than standard SGD. Additionally, the current model assumes layer independence; future research into inter-layer correlations could further enhance performance.

The authors suggest that the principles of FOO-VB could be extended to Meta-Learning or used to stabilize training in Generative Adversarial Networks (GANs), where the discriminator often suffers from forgetting as the generator's output evolves. By providing a principled way to manage plasticity without task labels, FOO-VB represents a significant step toward truly autonomous, lifelong machine learning.

Summary updated

BibTeX
@article{zeno2021task,
  author = {Chen Zeno and Itay Golan and Elad Hoffer and Daniel Soudry},
  title = {{Task-agnostic continual learning using online variational bayes with fixed-point updates}},
  journal = {Neural Computation},
  year = {2021},
  doi = {10.1162/neco\_a\_01430},
}
Figure