Continual Learning by Modeling Intra-Class Variation

Longhui Yu, Tianyang Hu, Lanqing Hong, Zhen Liu, Adrian Weller, Weiyang Liu

Introduction

Neural networks frequently suffer from "catastrophic forgetting," where learning new tasks causes the model to lose performance on previously acquired knowledge. This phenomenon is a major hurdle for lifelong learning systems. While memory-based methods—storing a small buffer of past examples for replay—have become a standard countermeasure, they often fail to capture the full distribution of past classes. This paper introduces MOCA (Modeling Intra-Class Variation), a framework designed to artificially diversify the representations of stored data, preventing the model from over-specializing on a limited set of examples.

The Challenge: Representation and Gradient Collapse

A significant issue in memory-based continual learning is representation collapse. Because the memory buffer is extremely small relative to the original dataset, the network tends to overfit to these few "prototypes." Instead of learning a broad semantic concept, the internal representations of old classes shrink into narrow lines or single points in the feature space.

This collapse leads to gradient collapse, where the feedback signals used to update the model become uninformative. Consequently, the network cannot maintain clear decision boundaries between old and new classes, leading to rapid forgetting.

Comparison of feature distributions: (a) standard Experience Replay (ER) shows collapsed representations, while (b) Model-based MOCA maintains diverse intra-class variation.

Proposed Framework: MOCA

MOCA is a "plug-and-play" component that injects "smart" perturbations ($\Delta f$) into the latent feature space of stored prototypes during replay. By doing so, it simulates a much larger and more diverse dataset than what is actually stored in memory.

Hyperspherical Modeling

The authors utilize Hyperspherical Modeling, projecting features onto a unit sphere. This approach prioritizes the angular relationship between features, which is often more semantically meaningful for classification than magnitude. MOCA explores two primary strategies for generating perturbations:

  1. Model-Agnostic MOCA: Employs standard statistical distributions like Gaussian or von Mises-Fisher (vMF) noise to perturb features.
  2. Model-Based MOCA: Leverages the current state of the network to create intelligent variations. This includes Dropout-based Augmentation (DOA), Weight-Adversarial Perturbation (WAP)—which finds "hard" versions of features near decision boundaries—and Variation Transfer (VT).

Experimental Results

The framework was evaluated on standard benchmarks including CIFAR-10, CIFAR-100, and TinyImageNet across offline, online, and proxy-based settings.

Performance Gains

MOCA, particularly the WAP variant, demonstrated significant improvements over state-of-the-art baselines. On CIFAR-100 (Offline), adding MOCA to standard Experience Replay (ER) increased accuracy from 22.14% to 30.16% with a minimal 200-image buffer. It consistently improved other baselines like DER++ and ER-ACE by 5-10%.

Discriminative Power and Angular Deviation

A key metric for MOCA's success is the Average Intra-Class Angular Deviation. By diversifying representations, MOCA forces the model to maintain larger angular separations between different classes.

Average Intra-Class Angular Deviation across different methods. MOCA variants significantly increase the diversity of both old and new class representations compared to standard baselines.

As shown in the figure above, MOCA-trained models exhibit much higher intra-class variation. This prevents the "collapse" into narrow points, ensuring that the decision boundaries remain robust even as new tasks are introduced.

Conclusion

MOCA addresses a fundamental flaw in memory-based continual learning by modeling intra-class variation. By diversifying feature representations, it prevents representation collapse and ensures informative gradients during training. While the adversarial variants (WAP) introduce some computational overhead, the substantial gains in accuracy and stability make it a powerful tool for building more resilient lifelong learning systems.

Summary updated

BibTeX
@article{yu2023continual,
  author = {Longhui Yu and Tianyang Hu and Lanqing Hong and Zhen Liu and Adrian Weller and Weiyang Liu},
  title = {{Continual Learning by Modeling Intra-Class Variation}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2023},
  url = {https://openreview.net/forum?id=i3PpSbKHNI},
}
Figure