Bayesian Flow Networks in Continual Learning

Mateusz Pyla, Kamil Deja, Bartlomiej Twardowski, Tomasz TrzcinskiarXiv 2023 · DOI

TL;DR

This paper explores the application of Bayesian Flow Networks (BFNs), a novel generative modeling approach, to the challenging problem of Continual Learning. The authors demonstrate that BFNs, when combined with existing continual learning strategies like rehearsal and generative replay, can effectively mitigate catastrophic forgetting and learn new data distributions sequentially without losing previously acquired knowledge.

What Problem Does This Paper Address?

Continual Learning (CL) aims to enable machine learning models to learn new tasks or data distributions sequentially without forgetting previously learned information. A major hurdle in CL is "catastrophic forgetting," where a model's performance on older tasks drastically degrades when trained on new data. While diffusion models have shown great promise in generative tasks, they often struggle with discrete or non-continuous data. Bayesian Flow Networks (BFNs) offer a potential solution by directly modeling data distribution parameters, making them theoretically well-suited for continual learning. This paper investigates whether BFNs can indeed be effectively applied to CL and how they perform compared to existing methods.

Methods

The core of the paper lies in adapting Bayesian Flow Networks for continual learning. BFNs, as introduced by Graves et al., model data distributions by learning parameters that describe the distribution, rather than directly modeling individual data instances. This is achieved through a process of iterative refinement, starting with an initial belief and progressively improving it by incorporating new data.

The authors propose extending BFNs to CL by integrating them with established CL strategies:

  • Regularization: A simple approach where L1 or L2 norms are penalized to prevent the model's parameters from diverging too much from previous tasks.
  • Memory-based Rehearsal: Storing a subset of data from previous tasks in a buffer and using it alongside new data during retraining.
  • Generative Replay: Leveraging the generative capabilities of BFNs to generate synthetic data from previous tasks, which then serves as rehearsal samples for new tasks.

The training objective for BFNs involves minimizing the KL divergence between a "sender" distribution (noised data) and a "receiver" distribution (the model's prediction), aiming to make the model's output predictions closer to the true data distribution.

Datasets

The paper evaluates BFNs on two datasets:

  • MNIST: A standard image dataset, split into a Class-Incremental Learning (CIL) setting with 5 tasks, each focusing on binary classification of two consecutive digits. Images were binarized for this setting.
  • US Flights Connections in 2013: A tabular dataset used to evaluate BFNs on categorical data in a CL scenario. This dataset was divided into 12 tasks, representing flights by month.

Key Insights and Ideas

  • BFNs are amenable to CL: The paper demonstrates that BFNs, despite being a relatively new generative model, can be effectively integrated into continual learning frameworks.
  • Rehearsal strategies are crucial: Simply finetuning BFNs on new tasks leads to catastrophic forgetting, similar to standard neural networks. However, both buffer-based and generative-based rehearsal strategies significantly mitigate this issue.
  • Generative replay shows promise: The generative replay approach, which uses the BFN itself to generate past data, appears to be a particularly effective strategy for preventing forgetting.
  • Direct parameter modeling is key: The ability of BFNs to directly model data distribution parameters is highlighted as a strength for continual learning, as it allows for a more elegant way to manage prior beliefs and update information from new observations.

Key Results

  • MNIST Experiments:
    • Finetuning BFNs without any CL strategy resulted in significant catastrophic forgetting, with models forgetting how to generate examples from earlier classes.
  • Both buffer-based and generative-based replay successfully prevented catastrophic forgetting, allowing the model to generate examples from earlier classes even after training on the last task.
  • Tabular Data Experiments:
    • The paper presents results on tabular data using test loss as a proxy for model surprise. While specific quantitative comparisons are not detailed in the main text, the figures suggest that generative replay methods perform favorably.

Limitations and Future Work

  • Limitations: The authors acknowledge that BFNs, like other models, are susceptible to catastrophic forgetting if not augmented with CL strategies. The paper presents preliminary studies and highlights the need for further exploration.
  • Future Work: The authors plan to explore further how the combination of Bayesian updates and neural modeling can be used to continually adjust data distribution parameters. They also aim to investigate how BFNs can be employed to continually consolidate knowledge.

Summary updated

BibTeX
@misc{pyla2023bayesian,
  author = {Mateusz Pyla and Kamil Deja and Bartlomiej Twardowski and Tomasz Trzcinski},
  title = {{Bayesian Flow Networks in Continual Learning}},
  year = {2023},
  eprint = {2310.12001},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.12001},
}
Figure