In many real-world industrial applications, data does not arrive all at once; it comes in sequential batches. For deep neural networks (DNNs), retraining the entire model from scratch every time new data arrives is computationally prohibitive.
The common alternative is fine-tuning: taking a model trained on old data and running a few more iterations of Stochastic Gradient Descent (SGD) on the new data. However, DNNs are notorious for "catastrophic forgetting"—getting stuck in suboptimal local solutions that favor the most recent data at the expense of what was learned previously.
This paper introduces a Bayesian framework for incremental learning, where deep neural networks are updated sequentially as new data arrives without retraining from scratch. By using variational inference to treat weights as distributions rather than fixed points, the authors prevent the forgetting and local optima issues common in standard fine-tuning.
Framing Incremental Learning as a Bayesian Update
The authors frame incremental learning as a sequential Bayesian update. In this setup, the posterior distribution of the weights after seeing the first batch of data becomes the prior for the next batch:
$$p(w | D_1, \dots, D_t) \propto p(D_t | w)p(w | D_1, \dots, D_{t-1})$$
Because calculating the true posterior is mathematically impossible for complex DNNs, the researchers use Variational Inference (VI) to approximate it. They explore three types of posterior approximations:
- Fully Factorized Gaussian (FFG): Each weight is treated as an independent Gaussian distribution. It is fast and stable but lacks expressiveness.
- Channel Factorized Gaussian (CFG): This preserves correlations within convolutional kernels channel-wise using Cholesky decomposition, offering a middle ground in complexity.
- Multiplicative Normalizing Flows (MNF): A highly expressive family of distributions. Because standard MNF is intractable for sequential updates (requiring the marginalization of auxiliary variables), the authors derive a new variational lower bound that treats these auxiliary variables as regular parameters, making MNF usable for incremental learning.
Additionally, they propose using the Laplace approximation to convert standard, non-Bayesian pre-trained models into Bayesian ones by estimating the variance of the weights based on the original training data.
Key Insights: Memory, Stability, and Tuning
- The Posterior as Memory: In the Bayesian framework, the "memory" of previous data is naturally encoded in the width (variance) of the weight distributions. Weights that were critical for previous data will have lower variance, making them harder to shift during new training.
- Stability vs. Expressivity: Interestingly, while MNF is more complex and expressive, the simpler FFG often performed better in incremental settings. The authors suggest that complex posteriors can suffer from unstable convergence when data is limited.
- The KL-Divergence Dominance: In larger architectures, the "memory" term (the KL-divergence between the new and old posterior) can become so strong that it prevents the model from learning new data, leading to underfitting.
- The 0.05 Trick: To combat this underfitting in larger models, the authors downscaled the KL term by a factor of 0.05. While this technically breaks the "proper" variational lower bound, it significantly improved practical performance.
Key Results
The researchers evaluated their approach using MNIST (LeNet-5), CIFAR-10 (3Conv3FC), and a custom CIFAR(5+5) split designed to test domain adaptation and pre-training benefits.
- Outperforming Fine-Tuning: On both MNIST and CIFAR-10, standard fine-tuning (FT) performance dropped significantly as the number of incremental steps ($T=10$ slices) increased. In contrast, the Bayesian FFG method maintained accuracy nearly identical to a model trained on the full dataset at once ($T=1$).
- Pre-training Success: In the CIFAR(5+5) experiment, the Bayesian approach successfully leveraged pre-trained weights to improve performance on new classes. Standard fine-tuning failed to show any significant benefit from the pre-training phase.
- Laplace Approximation: The Laplace approximation proved to be a robust way to initialize weight variances, removing the need for expensive grid searches for hyperparameters.
Limitations and Future Work
While highly effective at mitigating catastrophic forgetting, the Bayesian approach is not without trade-offs. Multiplicative Normalizing Flows (MNF), despite being theoretically superior, introduced a large number of parameters and were slow to optimize, sometimes leading to poorer results in incremental stages.
Furthermore, the need to manually scale the KL term (the 0.05 factor) suggests that the balance between "remembering" and "learning" still requires some manual tuning for different architectures. Finally, maintaining weight distributions (means and variances) inherently doubles the memory requirements for model weights compared to standard DNNs, introducing a computational overhead that must be weighed against the cost of retraining from scratch.
Summary updated