BinPlay: A Binary Latent Autoencoder for Generative Replay Continual Learning

Kamil Deja, Pawel Wawrzynski, Daniel Marczak, Wojciech Masarczyk, Tomasz Trzcinski · DOI

Executive Summary

BinPlay introduces a novel continual learning framework utilizing a binary latent autoencoder to mitigate "catastrophic forgetting" without requiring extensive memory buffers. By mapping training samples to deterministic, precomputed binary codes derived from their chronological index, the model reconstructs high-quality "pseudo-samples" from previous tasks. This approach yields up to a twofold accuracy improvement over existing generative replay methods while maintaining a fixed memory footprint.

Introduction: The Challenge of Catastrophic Forgetting

Artificial neural networks typically suffer from catastrophic forgetting, where learning new tasks causes the abrupt loss of previously acquired knowledge. Continual Learning (CL) aims to achieve "lifelong learning" by accumulating knowledge over time. Current strategies generally fall into two categories:

  1. Buffer-based Replay: Storing a subset of old data for rehearsal. While effective, this approach does not scale as memory requirements grow linearly with the number of tasks.
  2. Generative Replay: Training models like GANs or VAEs to generate synthetic data for rehearsal. These are memory-efficient but often produce low-quality, blurry images that fail to preserve the fine details necessary for maintaining high classification accuracy.

BinPlay bridges this gap by providing high-quality reconstructions typical of buffer-based methods with the constant memory footprint of generative approaches.

Methodology: The Binary Latent Autoencoder

The core innovation of BinPlay is the Binary Latent Autoencoder. Unlike standard autoencoders that utilize continuous latent spaces, BinPlay maps images to a set of predefined, discrete binary codes.

Overview of the BinPlay architecture. The model uses precomputed binary codes to map and reconstruct images without storing them.

The BinPlay workflow consists of three primary stages:

  1. Precalculation: For each image in a training batch, a unique binary code $C(i)$ is generated based on its chronological index $i$. These codes are computed via a deterministic formula involving prime numbers and modular arithmetic, allowing them to be re-generated on demand without storage.
  2. Encoding & Assignment: The encoder maps input images to these precomputed codes. A greedy assignment algorithm ensures each image is paired with the most appropriate binary code in the latent space.
  3. Decoding & Rehearsal: The decoder is trained to reconstruct original images from the binary codes. To prevent forgetting, the model rehearses by sampling indices from previous batches, re-calculating their binary codes, and generating high-quality reconstructions to augment current training.
A detailed look at the three-step process: precalculating codes, assigning images, and performing inference/reconstruction.

Experimental Setup and Results

The authors evaluated BinPlay on class-incremental learning tasks using three standard benchmarks: MNIST, Fashion-MNIST, and CIFAR-10. Each dataset was divided into five sequential batches, each introducing two new classes.

Key Results

BinPlay significantly outperformed existing generative replay methods:

  • CIFAR-10: BinPlay achieved 63.3% accuracy, more than doubling the performance of the leading generative replay competitor, RTF (28.7%).
  • MNIST: The model reached 97.2% accuracy, rivaling some memory-intensive buffer-based methods.
  • Memory Efficiency: BinPlay maintains a constant memory footprint regardless of the number of tasks added, offering a sustainable alternative to buffer-based rehearsal.

Discussion and Insights

  • Discrete Latent Spaces: Standard VAEs often produce blurry outputs due to the "averaging" effect of continuous probability distributions. By enforcing a sparse, binary latent space, BinPlay functions as a high-capacity hash map, preserving sharp, high-frequency details.
  • Index-Based Addressing: Using the chronological index as a "key" effectively transforms the decoder into a compressed memory bank queryable by index, eliminating the need to store latent embeddings.
  • Reconstruction Quality: BinPlay's reconstructions remain sharp across multiple training batches, a critical factor in preventing the performance degradation seen in methods like RTF, where reconstructions often blur into unrecognizable patterns over time.

Limitations and Future Work

While BinPlay demonstrates strong performance, several areas for future research remain:

  • Advanced Mapping: Replacing the current greedy assignment heuristic with more sophisticated, trainable mapping functions.
  • Structured Latent Spaces: Exploring other discrete or structured representations beyond binary codes to further improve compression and reconstruction quality.
  • Scaling: Extending the approach to higher-resolution datasets like ImageNet remains a significant challenge for generative replay frameworks.

Summary updated

BibTeX
@inproceedings{deja2020binplay,
  author = {Kamil Deja and Pawel Wawrzynski and Daniel Marczak and Wojciech Masarczyk and Tomasz Trzcinski},
  title = {{BinPlay: A Binary Latent Autoencoder for Generative Replay Continual Learning}},
  booktitle = {IJCNN},
  year = {2020},
  doi = {10.1109/ijcnn52387.2021.9534171},
}
Figure