Bayesian Structural Adaptation for Continual Learning

Abhishek Kumar, Sunabha Chatterjee, Piyush RaiICML 2021

Introduction

In the field of Continual Learning (CL), artificial neural networks face a significant hurdle: catastrophic forgetting. When a model learns a sequence of tasks, it tends to overwrite the knowledge required to perform previous ones.

Existing solutions to this problem generally fall into two distinct categories. Regularization-based methods use Bayesian inference to penalize changes to weights that were important for previous tasks (e.g., Variational Continual Learning). However, these often rely on fixed architectures that eventually run out of capacity. Conversely, structural-based methods physically alter the network architecture by adding new neurons or masking specific paths, but these approaches are frequently ad-hoc and lack a principled probabilistic foundation.

This paper introduces a unified Bayesian framework that bridges this gap. By simultaneously regularizing model weights and adapting the network structure for every new task, the model learns sparse, task-specific sub-networks that overlap. This facilitates knowledge transfer while effectively eliminating catastrophic forgetting in both supervised and unsupervised settings.

Methodology: Weight Masking and the IBP Prior

The core innovation of this paper is a "weight-masking" approach modeled through a Bayesian nonparametric lens.

For any given layer, the network weights $W$ are represented as the element-wise product of two matrices: $W = B \odot V$.

  • $V$ (Knowledge): Contains the continuous, real-valued weights.
  • $B$ (Structure): A binary mask that determines which weights are active for a specific task.

To govern this structure, the authors employ the Indian Buffet Process (IBP)—specifically a truncated stick-breaking construction—as a prior for the binary mask $B$. The IBP naturally encourages highly sparse structures, allowing the model to dynamically "pick" which neurons to use. If a new task is complex, the IBP allows the network to activate more nodes, effectively expanding its capacity.

Overlapping task-specific sub-networks

When a new task arrives, the framework uses Online Variational Bayes. The posterior distribution of the weights $V$ from the previous task becomes the prior for the current task, providing the regularization needed to prevent forgetting. To avoid the "dead neuron" problem in expanding networks, the authors introduce Masked Priors, ensuring that weights unused in previous tasks do not become over-regularized.

Generative and Task-Agnostic Extensions

Unlike many CL approaches that focus strictly on discriminative classification, this framework is designed to be highly versatile. It unifies supervised and unsupervised continual learning by treating Variational Autoencoders (VAEs) and standard classifiers with the same underlying logic.

Graphical models for supervised and unsupervised continual learning

Furthermore, the authors introduce a gating mechanism to handle "task-agnostic" settings, allowing the model to infer which task it is currently performing without explicit labels.

Experiments and Key Results

The framework was rigorously evaluated across several standard continual learning benchmarks, including Split/Permuted MNIST, Split notMNIST, Split FashionMNIST, Split CIFAR-100, and Sequential Generation tasks.

Key findings include:

  • Superior Accuracy: On the Permuted MNIST benchmark (10 tasks), the proposed model achieved an impressive 97.94% accuracy, significantly outperforming baselines like Variational Continual Learning (94.87%) and Elastic Weight Consolidation (91.73%).
  • High Efficiency: The model maintains high performance while utilizing only a fraction of the total network capacity. Newer tasks tend to require fewer new weights because they leverage the "buffet" of features already learned, sharing a high percentage of connections between similar tasks.
  • Backward Transfer: Remarkably, the structural adaptation helps the model refine its internal representations over time. In experiments like Permuted MNIST, accuracy on the first task actually improved as the model learned subsequent tasks.
  • Latent Space Quality: In unsupervised generative experiments, the model's latent representations (visualized via t-SNE) demonstrated much cleaner separation between tasks compared to VCL, which often suffers from overlapping latent clusters that lead to blurred image generations.

Limitations and Future Work

While highly effective, the framework does have limitations. The variational inference process, particularly with the IBP, introduces computational overhead, making training times per task longer than simpler methods like EwC. Additionally, the current architecture focuses on adapting the width of hidden layers; adapting network depth remains a challenging next step. Finally, the model currently assumes discrete task boundaries, leaving adaptation to truly fluid, non-stationary data distributions as an open area for future research.

Summary updated

BibTeX
@inproceedings{kumar2021bayesian,
  author = {Abhishek Kumar and Sunabha Chatterjee and Piyush Rai},
  title = {{Bayesian Structural Adaptation for Continual Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
}
Figure