TL;DR
This paper proposes using natural gradients and Stein gradients to improve Bayesian continual learning. By leveraging these gradient methods, the authors show that models can better retain knowledge from previous tasks, mitigating catastrophic forgetting, and can also utilize data summaries (coresets) more effectively.
What Problem Does This Paper Address?
Machine learning models often struggle with "continual learning," where they need to learn a sequence of tasks without forgetting what they learned from previous ones. This phenomenon is called "catastrophic forgetting." While Bayesian approaches offer a way to retain knowledge through posterior distributions over model parameters and by using "coresets" (summaries of past data), conventional gradient descent methods can still lead to forgetting. This paper aims to enhance Bayesian continual learning by exploring how more sophisticated gradient methods, specifically natural gradients and Stein gradients, can help models retain knowledge more effectively.
Methods
The paper introduces two main methodological contributions:
- Natural Gradients (GNG): Instead of using standard Euclidean gradients, which optimize in parameter space, natural gradients optimize in a "Riemannian space" that better reflects the geometry of probability distributions. This means they aim for the smallest change in the distribution of parameters, not just the parameters themselves. The authors specifically apply this to Bayesian Neural Networks (BNNs) with Gaussian posteriors, deriving the natural gradient for these models. They also propose combining Gaussian Natural Gradients (GNG) with the Adam optimizer to handle the potentially small variances in Bayesian models.
- Stein Gradients: These gradients are used to generate samples from a known distribution and can be adapted to move samples closer to a target conditional distribution. The authors propose using Stein gradients to construct "coresets" more effectively. Coresets are small collections of data samples that summarize past tasks. By using Stein gradients, they can create more informative coresets, which are then used either to train a predictive model for past tasks or to add a "regret loss" to the optimization objective, penalizing deviations from past task performance.
Datasets
The paper evaluates its methods on the following datasets:
- Permuted MNIST
- Split MNIST
- Split Fashion MNIST
These are standard benchmarks for continual learning tasks, where the original dataset is split into multiple sequential tasks.
Key Insights and Ideas
- Natural gradients are better suited for Bayesian continual learning: By optimizing in the space of distributions rather than just parameters, natural gradients can lead to more stable learning and better retention of past knowledge in Bayesian models.
- Adam complements Natural Gradients: The Adam optimizer's ability to adapt learning rates based on gradient moments helps mitigate issues with small variances in Bayesian posteriors when using natural gradients.
- Stein gradients enhance coreset construction: Using Stein gradients to build coresets allows for more efficient and effective summarization of past task data, leading to improved performance, especially when used in a "regret loss" formulation.
- Regret loss with coresets is powerful: Incorporating a loss term that directly penalizes performance degradation on past tasks, using coresets, proves to be a highly effective strategy for continual learning.
Key Results
- Permuted MNIST: GNG with Adam outperforms standalone Adam in terms of average accuracy on the permuted MNIST task.
- Split Tasks: The performance difference between GNG with Adam and standalone Adam is less pronounced on split MNIST and split Fashion MNIST tasks.
- Coresets: Using coresets, particularly with the regret loss formulation, generally leads to better performance across all tested methods.
- Stein Coresets: Stein coresets often outperform random or K-center coresets, demonstrating the benefit of a more principled coreset construction method.
- Variance Reduction: Visualizations show that GNG tends to lead to lower variance in parameter updates, contributing to more stable learning.
Limitations and Future Work
- Split Task Performance: The paper notes that the benefits of GNG are less clear on split tasks compared to permuted MNIST, suggesting that the underlying reasons require further investigation.
- Computational Cost: While Stein gradients are computationally cheaper than some coreset construction methods (O(M²) vs. O(MN)), the overall computational cost of Bayesian continual learning with these methods can still be significant.
- Further Investigation: The authors suggest that deeper investigation is needed to fully understand why GNG performs particularly well on permuted MNIST and to explore its behavior in more complex scenarios.
Summary updated