NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Continual classification learning using generative model

Frantzeska Lavda, Jason Ramapuram, Magda Gregorová, Alexandros Kalousis

Abstract

Continual learning is the ability to sequentially learn over time by accommodating new knowledge while retaining previously learned experiences. Standard neural networks suffer from catastrophic forgetting, where learning a new task leads to a sharp decline in performance on earlier tasks. This paper introduces CCL-GM (Continual Classification Learning using Generative Models), a framework that addresses this by deriving a new variational bound on the joint log-likelihood $\log p(x, y)$. By utilizing a student-teacher architecture and generative replay, the model learns to classify and reconstruct data across a sequence of tasks without storing historical raw data.

Introduction: The Challenge of Catastrophic Forgetting

The core challenge in lifelong machine learning is catastrophic forgetting. When a neural network is trained on a sequence of tasks (e.g., learning to recognize digits, then learning to recognize fashion items), it tends to overwrite the weights optimized for the initial task. Existing solutions often rely on dynamic architectures that grow with each task or regularization methods like Elastic Weight Consolidation (EWC) that constrain weight updates. However, these often require storing old parameters or data, which is not always feasible due to memory constraints or privacy concerns.

Methodology: CCL-GM Framework

The authors propose a method that integrates classification directly into the generative process of a Variational Autoencoder (VAE). Instead of maximizing only the evidence lower bound (ELBO) for the data $\log p(x)$, they derive a bound for the joint probability of data and labels, $\log p(x, y)$.

Joint Variational Bound

The derived objective function splits into two primary components:

  1. Reconstruction Loss (ELBO): Ensuring the model can reconstruct the input $x$ from a latent variable $z$.
  2. Classification Loss: Ensuring the latent variable $z$ contains sufficient information to predict the label $y$.

Student-Teacher Architecture

To enable continual learning, the framework employs a dual-model setup. The Teacher is a frozen snapshot of the model after the previous task, serving as a long-term memory. It generates synthetic $(x, y)$ pairs representing all previously learned distributions. The Student is the active model being trained on a combination of new data and the synthetic "replayed" data from the teacher.

The student-teacher architecture: (a) shows the teacher generating synthetic pairs, and (b) shows the student learning from combined data.

This generative replay mechanism allows the model to "remember" past tasks by dreaming about them, rather than storing them.

Experimental Evaluation

The model was evaluated on two benchmarks:

  • Permuted MNIST: A sequence of 5 tasks where each task involves the MNIST dataset with a unique, fixed pixel permutation.
  • Cross-Dataset Sequence: A sequence consisting of MNIST digits, FashionMNIST clothing items, and a Permuted MNIST task.

Key Results

CCL-GM demonstrated superior stability compared to baseline VAE classifiers and regularization methods like EWC. On the 5-task Permuted MNIST benchmark, CCL-GM maintained high average test accuracy, whereas vanilla VAE performance plummeted.

Performance comparison on Permuted MNIST: CCL-GM maintains high accuracy (left) and low reconstruction error (right) compared to EWC and vanilla VAE-CL.

Furthermore, the "Negative ELBO"—a metric for reconstruction quality—remained low and stable for CCL-GM. This indicates that the model successfully preserved its ability to generate and reconstruct data from all previous tasks, unlike other methods where generative capabilities withered over time.

Discussion and Insights

  • Unified Latent Space: By treating classification as a generative task, the latent space $z$ is forced to be meaningful for both categorization and data synthesis.
  • Memory Efficiency: Generative replay addresses storage and privacy issues by saving the ability to generate data rather than the data itself.
  • Posterior Preservation: A KL divergence penalty ensures the student’s latent representation does not drift too far from the teacher’s, stabilizing the learning process.

Limitations

While promising, the authors note that these results are preliminary and focused on MNIST-scale images. Future work is needed to determine how the joint bound scales to high-resolution natural images and to address potential "semantic drift" in synthetic data over very long task sequences.

Conclusion

CCL-GM provides a mathematically grounded approach to continual classification. By combining joint log-likelihood optimization with a student-teacher generative replay system, it effectively mitigates catastrophic forgetting while maintaining both classification accuracy and data reconstruction quality.

Summary updated

BibTeX
@inproceedings{lavda2018continual,
  author = {Frantzeska Lavda and Jason Ramapuram and Magda Gregorová and Alexandros Kalousis},
  title = {{Continual classification learning using generative model}},
  booktitle = {The Web Conference},
  year = {2018},
}
Figure