Task-Free Continual Generation and Representation Learning via Dynamic Expansionable Memory Cluster

Fei Ye, Adrian G. Bors

Abstract

This paper introduces the Continual Variational Autoencoder (CAA), a framework designed for task-free continual learning (TFCL) where data arrives in an unlabeled stream without explicit task boundaries. CAA addresses the challenge of catastrophic forgetting by integrating a bio-inspired dual-memory system, the Dynamic Expansionable Memory Cluster (DEMC), with a novel Two-Step Optimization Strategy (TSOS). By decoupling generation and inference and utilizing novelty-based memory expansion, CAA achieves state-of-the-art performance in generating high-quality images and learning robust latent representations.

Introduction

Standard machine learning models often suffer from catastrophic forgetting, where new information overwrites previously learned knowledge. While Continual Learning (CL) typically assumes known task boundaries, real-world scenarios often present data as a continuous, unlabeled stream—a paradigm known as Task-Free Continual Learning (TFCL). Generative models like VAEs and GANs face unique challenges in this setting: VAEs often produce blurry outputs, while GANs lack a natural latent space for representation learning. CAA aims to bridge this gap by providing sharp image generation alongside meaningful latent representations in a task-free environment.

Methodology

The CAA architecture is built upon two primary components: the Dynamic Expansionable Memory Cluster (DEMC) and the Two-Step Optimization Strategy (TSOS).

Overview of the CAA architecture, illustrating the two-step optimization process and the memory management workflow.

Dynamic Expansionable Memory Cluster (DEMC)

Inspired by human memory, DEMC utilizes a dual-buffer system to manage data novelty and retention:

  • Temporary Memory: A fixed-size buffer for the most recent data samples.
  • Evolving Memory: A collection of clusters that expands when novel data is detected. Novelty is determined by calculating the Jensen-Shannon (JS) divergence between the latent representations of incoming data and existing clusters.
  • Sample Selection: When memory is full, the model transfers the most "difficult" samples (those with the highest reconstruction loss) into the evolving memory, ensuring the model focuses on learning complex features it has not yet mastered.
Detailed view of the sample selection and memory evolution process within the DEMC.

Two-Step Optimization Strategy (TSOS)

To optimize both generation and representation, CAA employs a decoupled training approach:

  1. Step 1: The generator, discriminator, and inference model (encoder) are updated simultaneously using a WGAN-GP loss to capture the data distribution.
  2. Step 2: The generator is frozen, and the inference model is optimized independently to maximize log-likelihood. This decoupling prevents training noise from the generator from interfering with the quality of the learned latent space.

Experimental Results

CAA was evaluated on benchmarks including Split MNIST, Fashion MNIST, SVHN, CIFAR10, CelebA, and ImageNet. Key findings include:

  • Image Quality: On Split CIFAR10, CAA achieved a Generation Frechet Inception Distance (FID) of 74.97, significantly outperforming the OCM baseline (173.73).
  • Representation Learning: When used for classification, CAA reached 95.23% accuracy on Split MNIST and 50.28% on Split CIFAR10, surpassing other task-free methods.
  • Reconstruction and Interpolation: The model maintained low reconstruction errors across datasets and demonstrated smooth interpolation between classes, indicating a well-structured and resilient latent space.

Discussion and Future Work

While CAA demonstrates robust performance, it relies on a critical expansion threshold parameter ($\lambda$). Future work may involve automating the tuning of this threshold to balance memory growth and forgetting. Additionally, exploring cluster pruning or merging could further optimize memory efficiency as the data stream grows indefinitely. Despite the computational overhead of the GAN component, the trade-off yields superior image sharpness and representation quality compared to pure VAE approaches.

Summary updated

BibTeX
@inproceedings{ye2024task,
  author = {Fei Ye and Adrian G. Bors},
  title = {{Task-Free Continual Generation and Representation Learning via Dynamic Expansionable Memory Cluster}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i15.29582},
}
Figure