Compact Memory for K-prior Based Continual Learning

Yohan Jung, Hyungi Lee, Wenlong Chen, Thomas Möllenhoff, Yingzhen Li, Juho Lee, Mohammad Emtiyaz KhanAABI Workshop Track 2025

TL;DR

This paper tackles the challenge of "catastrophic forgetting" in continual learning by proposing a novel method to create a compact memory that can accurately reconstruct past learning gradients. By leveraging Hessian matching and probabilistic PCA, they demonstrate a way to retain knowledge without needing to store large amounts of past data, paving the way for more efficient and scalable continual learning systems.

What Problem Does This Paper Address?

Continual lifelong learning aims to enable AI systems to learn new tasks sequentially without forgetting previously acquired knowledge. While significant progress has been made, current methods often fall short of the performance achieved by traditional "batch learning" (where all data is available at once). A key reason for this gap is the difficulty in effectively regularizing new learning based on past knowledge. Replay methods, which store past data to reconstruct gradients, can improve performance but suffer from rapidly growing memory requirements as more tasks are learned, making them slow and impractical. This paper addresses the need for a more efficient way to retain past information, specifically by developing a compact memory that can accurately reconstruct past gradients without storing the entire history.

Methods

The core of this paper's contribution lies in developing a method for creating a "compact memory" that can accurately reconstruct past gradients. They build upon the "K-prior" framework proposed by Khan and Swaroop (2021), which aims to reconstruct past gradients using a memory buffer.

The key innovations are:

  • Feature Space Memory: Instead of storing raw data samples, they propose building a compact memory in the feature space. This memory is represented by a matrix $U_t$ containing feature vectors.
  • Hessian Matching for Linear Regression: For linear regression, they show that the optimal memory can be achieved through "Hessian matching." This involves ensuring that the gradients reconstructed by the memory match the true gradients of the past data, which can be derived from the Hessian of the loss function. They derive an equation (Eq. 7) that guides the update of the memory matrix $U_t$.
  • Probabilistic PCA for Logistic Regression: To extend their approach to more complex models like logistic regression, they leverage the Expectation-Maximization (EM) algorithm from Probabilistic Principal Component Analysis (PPCA). This allows them to estimate both the compact memory vectors and the associated weights, even when perfect reconstruction isn't guaranteed.
  • Algorithm 1: The paper presents a detailed algorithm (Algorithm 1 in Appendix A) that outlines the steps for learning the model parameters and the compact memory using the PPCA-EM approach for logistic regression.

Datasets

  • Split-MNIST: Used for multi-output linear regression experiments. This dataset is divided into five subsets, each representing a binary classification task (e.g., distinguishing between digits 0 and 1).
  • Two-moon dataset: Used for logistic regression experiments. This dataset is split into three binary tasks.

Key Insights and Ideas

  • Feature Space Memory is Key: The insight that a compact memory can be built in the feature space rather than the raw input space is crucial. This allows for a more abstract and potentially more compressed representation of past knowledge.
  • Hessian Matching as a Theoretical Foundation: Demonstrating that Hessian matching provides a theoretical basis for perfect gradient reconstruction in linear regression offers a strong foundation for their compact memory approach.
  • PPCA as a Practical Extension: The successful generalization to logistic regression using PPCA highlights the flexibility of their method and its applicability to non-linear models, even if perfect reconstruction is not achieved.
  • Compactness vs. Performance Trade-off: The paper implicitly suggests that by focusing on compact memory, they can achieve performance comparable to larger memory approaches, offering a valuable trade-off for practical applications.

Key Results

  • Effective Compact Memory: The proposed EM algorithm for Hessian matching is shown to be more effective than a standard SVD approach when using a smaller number of memory elements for linear regression.
  • Competitive Performance in Logistic Regression: For the two-moon dataset, their method achieves decision boundaries that closely approximate the "oracle" (jointly trained) solution, indicating good knowledge retention.
  • Visual Evidence of Learning: Figure 1 (right) visually demonstrates how the learned "eigen-images" (representing features in the memory) evolve as new tasks are added, showing that new features emerge and adapt.

Limitations and Future Work

  • Small-Scale Experiments: The authors acknowledge that their findings are confirmed on "small-scale classification problems." This suggests that scaling to larger, more complex datasets and neural network architectures remains an open challenge.
  • Future Work Directions: The authors explicitly state their intention to extend their method for:
  • Multi-label classification.
  • Making it feasible for neural networks.

Summary updated

BibTeX
@inproceedings{jung2025compact,
  author = {Yohan Jung and Hyungi Lee and Wenlong Chen and Thomas Möllenhoff and Yingzhen Li and Juho Lee and Mohammad Emtiyaz Khan},
  title = {{Compact Memory for K-prior Based Continual Learning}},
  booktitle = {AABI Workshop Track},
  year = {2025},
  url = {https://openreview.net/forum?id=vx0USHUYgL},
}
Figure