Prediction Error-based Classification for Class-Incremental Learning

Michał Zając, Tinne Tuytelaars, Gido M van de Ven

TL;DR

The paper introduces Prediction Error-based Classification (PEC), a novel paradigm for class-incremental learning that sidesteps catastrophic forgetting by assigning a dedicated "student" network to each class. By training these students to mimic a fixed random "teacher" network, PEC achieves state-of-the-art performance in challenging single-pass scenarios without needing a memory buffer or complex generative models.

The Challenge of Class-Incremental Learning

Class-incremental learning (CIL) is often considered the "hard mode" of continual learning. A model must learn to distinguish between a growing set of classes presented sequentially, without forgetting old ones or becoming biased toward the most recent ones.

Traditional discriminative approaches (using one large network for all classes) suffer from "catastrophic forgetting" as new tasks overwrite previously acquired knowledge. Conversely, generative approaches (modeling each class's specific data distribution) are more robust to forgetting but are notoriously difficult to train. This is especially true in "online" settings where data is seen only once and in small quantities. To bridge this gap, the authors propose a modular approach that is as easy to train as a discriminative model but as robust to forgetting as a generative one.

Methodology: Prediction Error-based Classification

PEC replaces the difficult task of generative modeling with a much simpler objective: random network distillation.

  1. The Setup: For every new class $c$, a small "student" network $g_{\theta_c}$ is initialized. A single, shared "teacher" network $h$ is also initialized with random weights and then frozen permanently.
  2. Training: The student $g_{\theta_c}$ is trained exclusively on examples from class $c$ to replicate the outputs of the teacher $h$.
  3. Inference: To classify a new input $x$, it is passed through all class-specific students. The prediction error $||g_{\theta_c}(x) - h(x)||^2$ is calculated for each.
  4. Decision: The class with the minimum prediction error is chosen as the prediction.
Diagram of the PEC architecture, where class-specific students aim to minimize prediction error relative to a frozen random teacher.

The underlying intuition, backed by Gaussian Process theory, is that a student will only exhibit low error on data similar to its training set. For "out-of-distribution" data (i.e., other classes), the student's prediction will default to its random initialization, leading to high error when compared to the teacher.

Key Insights

  • Forgetting is Eliminated: Because each class has its own parameters that are never updated after their initial training phase, catastrophic forgetting is structurally impossible.
  • Simplicity Wins: Unlike Variational Autoencoders (VAEs) or Generative Adversarial Networks (GANs), PEC students are simple regression models. This makes them incredibly fast to train and highly stable, even with minimal data.
  • Width over Depth: Scaling the width of the teacher network and the output dimension provides much larger performance gains than adding layers.
  • Theoretical Grounding: The method serves as a practical approximation of a classification rule based on Gaussian Process posterior variance, providing a principled way to measure model uncertainty.

Empirical Results

The authors evaluated PEC on five standard image classification benchmarks: MNIST, Balanced SVHN, CIFAR-10, CIFAR-100, and miniImageNet. They focused on the most difficult splits, including "one class per task" scenarios, and strictly enforced a single-pass-through-data (online) regime.

PEC consistently outperformed both rehearsal-free and many rehearsal-based methods across all benchmarks in the single-pass setting.

Performance on CIFAR-10 showing PEC (green) achieving superior sample efficiency and final accuracy compared to baselines.
  • Beating the Baselines: On CIFAR-10 (one class per task), PEC achieved 58.9% accuracy. For comparison, the best rehearsal-free baseline (VAE-GC) reached 42.7%, and even rehearsal-based methods like DER++ (with a 500-image buffer) only managed 35.6%.
  • Efficiency: PEC reaches high performance with fewer training iterations and fewer parameters than generative alternatives.
  • Robustness: It remains effective even when task boundaries are "blurry" or when tasks contain only a single class—scenarios where traditional discriminative models often fail.

Limitations and Future Work

While powerful, PEC introduces a few trade-offs:

  • No Knowledge Transfer: Because class modules are completely isolated, the model cannot use knowledge from one class to help it learn another (no forward transfer).
  • Linear Scaling: The total number of parameters grows linearly with the number of classes. While each module is small, this could become an issue for datasets with thousands of classes.
  • Sensitivity to Imbalance: If one class has significantly more training data than another, its student might become "too good," leading to biased error scores. The authors proposed an "Equal budgets" strategy to mitigate this.

Future research could explore using pretrained models or perceptual hashes as teachers instead of random networks to further boost accuracy and potentially enable some form of inter-class knowledge transfer.

Summary updated

BibTeX
@inproceedings{zajac2024prediction,
  author = {Michał Zając and Tinne Tuytelaars and Gido M van de Ven},
  title = {{Prediction Error-based Classification for Class-Incremental Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=DJZDgMOLXQ},
}
Figure