Continual Variational Autoencoder Learning via Online Cooperative Memorization

Fei Ye, Adrian G. Bors

Abstract

Deep learning models, particularly Variational Autoencoders (VAEs), frequently struggle with catastrophic forgetting when trained on non-stationary data streams. This challenge is amplified in Task-Free Continual Learning (TFCL), where task boundaries and class labels are unavailable. This paper presents Online Cooperative Memorization (OCM), a novel framework that leverages Optimal Transport (OT) theory to maintain a diverse memory buffer for experience replay. By utilizing a dual-memory architecture consisting of Short-Term and Long-Term components, OCM ensures the preservation of representative data samples based on a kernel-based information importance criterion. Experimental results across benchmarks such as Split CIFAR and ImageNet demonstrate that OCM significantly outperforms existing generative continual learning methods in reconstruction quality, log-likelihood, and memory efficiency.

1. Introduction

Standard deep learning models are typically trained on static datasets under the assumption that data is independent and identically distributed (i.i.d.). However, real-world applications often involve data streams where the distribution shifts over time. In these scenarios, models suffer from catastrophic forgetting—the abrupt loss of previously acquired knowledge upon learning new information. While supervised continual learning has seen significant progress, Task-Free Continual Learning (TFCL) for generative models like VAEs remains a difficult frontier. In TFCL, the model must adapt to distribution shifts without explicit signals indicating when a new task has begun or what labels are associated with the data.

2. Theoretical Foundation: Optimal Transport

The core innovation of this work is the formulation of continual learning as a dynamic Optimal Transport (OT) problem. The researchers provide a mathematical proof demonstrating that the Evidence Lower Bound (ELBO)—the primary objective function for VAEs—is directly constrained by the diversity of the samples stored in the model's memory. Specifically, the distance between the model’s learned distribution and the true data distribution is upper-bounded by the diversity of the replay buffer. This theoretical insight suggests that maintaining a diverse set of examples is not just a heuristic for better performance, but a mathematical necessity for minimizing approximation error in a continual setting.

3. The Online Cooperative Memorization (OCM) Framework

To operationalize the OT-based theory, the authors propose the Online Cooperative Memorization (OCM) framework. OCM is composed of three primary elements:

3.1 Dual-Memory System

OCM employs a hierarchical memory structure to manage data incoming from the stream:

  • Short-Term Memory (STM): This buffer acts as a temporary cache for the most recent samples encountered in the data stream.
  • Long-Term Memory (LTM): This buffer is designed for the long-term preservation of a diverse set of samples. It serves as the primary source for experience replay during the training of the learner.

3.2 Kernel-Based Selection Criterion

The "cooperative" aspect of the framework lies in how samples transition from STM to LTM. Rather than using random replacement or label-based selection, OCM uses a kernel-based information importance criterion. By comparing the latent representations (the compressed "essence" of the data) of new samples in the STM against those already stored in the LTM using a Radial Basis Function (RBF) kernel, the system identifies which samples are most distinct. If a new sample is sufficiently different from the existing LTM contents, it is integrated into the long-term buffer. This ensures the memory remains representative of the entire data history without requiring human-provided labels.

3.3 Dynamic VAE Expansion

For environments with extreme distribution shifts, the framework includes a Dynamic VAE Expansion mechanism. If the model detects a significant spike in reconstruction loss—signaling that the current network architecture is insufficient for the new data—it automatically adds a new VAE component to the ensemble to capture the new concepts without interfering with previously learned parameters.

4. Experimental Evaluation

The OCM framework was evaluated against several state-of-the-art baselines, including CNDPM and LIMix, across a variety of datasets ranging from Split MNIST to high-resolution ImageNet.

4.1 Quantitative Performance

On the complex "Cross-Domain" task (a mixture of MNIST, Fashion-MNIST, and OMNIGLOT), the Dynamic-ELBO-OCM achieved a log-likelihood of -177.29, a substantial improvement over CNDPM (-218.15) and LIMix (-226.63). In terms of reconstruction quality, OCM achieved an FID score of 133.23 on ImageNet, compared to 145.36 for models using random memory selection, indicating much clearer and more accurate generative capabilities.

4.2 Memory Efficiency and Classification

OCM demonstrated remarkable efficiency, often outperforming competitors while using significantly less memory. For instance, on Split CIFAR10, OCM achieved superior results with only 400-500 memory slots, whereas competing methods required 1,000. Furthermore, when applied to classification tasks, the Dynamic-OCM reached 94.02% accuracy on Split MNIST, surpassing several supervised baselines despite operating in a task-free, unsupervised manner.

5. Conclusion and Future Work

Online Cooperative Memorization provides a robust, theoretically grounded solution to the problem of catastrophic forgetting in VAEs. By linking memory diversity to Optimal Transport theory and implementing a dual-memory selection process, the framework enables effective generative learning in non-stationary environments.

While highly effective, the computational cost of calculating kernel similarities between STM and LTM could become a bottleneck for extremely large buffers. Future research may focus on optimizing these similarity checks and exploring the application of OT-based memory logic to larger transformer-based architectures, such as Large Language Models (LLMs) and diffusion models.

Summary updated

BibTeX
@inproceedings{ye2022continual,
  author = {Fei Ye and Adrian G. Bors},
  title = {{Continual Variational Autoencoder Learning via Online Cooperative Memorization}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-20050-2\_31},
}
Figure