NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Improving Online Continual Learning Performance and Stability with Temporal Ensembles

Albin Soutif-Cormerais, Antonio Carta, Joost van de Weijer

Abstract

Neural networks are very effective when trained on large datasets for a large number of iterations. However, when they are trained on non-stationary streams of data and in an online fashion, their performance is reduced (1) by the online setup, which limits the availability of data, (2) due to catastrophic forgetting because of the non-stationary nature of the data. Furthermore, several recent works showed that replay methods used in continual learning suffer from the stability gap, encountered when evaluating the model continually (rather than only on task boundaries). In this article, we study the effect of model ensembling as a way to improve performance and stability in online continual learning. We notice that naively ensembling models coming from a variety of training tasks increases the performance in online continual learning considerably. Starting from this observation, and drawing inspirations from semi-supervised learning ensembling methods, we use a lightweight temporal ensemble that computes the exponential moving average of the weights (EMA) at test time, and show that it can drastically increase the performance and stability when used in combination with several methods from the literature.

Introduction: The Challenges of Online Learning

In Online Continual Learning (OCL), a neural network learns from a continuous stream of data where the distribution changes over time. This setup faces two major hurdles: Catastrophic Forgetting, where new data overwrites old knowledge, and the Stability Gap. The stability gap refers to the sudden, massive performance drops that occur immediately after a task transition, even if the model eventually recovers.

While ensembling multiple models is a classic way to boost performance and robustness, it is typically too expensive for OCL. Storing dozens of model checkpoints violates the strict memory constraints inherent in lifelong learning. This research explores a way to achieve ensemble-like benefits—diversity and robustness—without the massive storage cost.

Methodology: Temporal Ensembles via EMA

The proposed solution is using an Exponential Moving Average (EMA) of the model's weights as a "temporal ensemble." Instead of just evaluating the active model ($\theta^t$), researchers maintain a second set of weights that tracks a running average: $$\theta^t_{ema} = \lambda \theta^{t-1}_{ema} + (1-\lambda)\theta^t$$

This approach is highly memory-efficient, requiring only one extra set of weights regardless of the number of tasks. Because online learning moves in small steps, the weights remain close enough in space for averaging to be mathematically sound. This creates a single model that "contains" knowledge from across the entire training trajectory, naturally counteracting the task-recency bias that plagues standard OCL models.

The Power of Ensembling

The motivation for this approach stems from the observation that even naive ensembling provides significant gains. As shown in Figure 1, as the number of tasks covered by an ensemble increases, the accuracy gains over a single model grow substantially, reaching up to 40%.

Figure 1: Accuracy gains from naively ensembling checkpoints across multiple tasks.

Key Results and Stability Improvements

The addition of EMA provided consistent gains across standard benchmarks like Split-CIFAR100 and Split-MiniImageNet. The most striking finding is how EMA handles task transitions. While standard models exhibit violent "zig-zags" in accuracy when a new task begins, the EMA-enhanced model remains remarkably steady.

Figure 4: Comparison of ER-ACE and ER-ACE + EMA across Accuracy, AAA, and Worst-Case Accuracy (WC-Acc). Note the significant smoothing of the stability gap in the EMA version.

As illustrated in Figure 4, the Worst-Case Accuracy (WC-Acc)—a metric measuring the lowest performance point during training—saw massive jumps. On Split-CIFAR10, this improvement reached 32.3%. Furthermore, on Split-MiniImageNet, adding EMA to the RAR method increased final accuracy by 9.3%, moving OCL performance significantly closer to the "offline" gold standard.

Conclusion

Temporal ensembles via EMA represent a "free lunch" for online continual learning, offering drastic improvements in both final accuracy and training stability with negligible memory overhead. By smoothing out the stability gap, this method provides a more reliable path for agents learning in non-stationary environments. Future work will investigate more robust distillation techniques to further bridge the gap between active and ensemble models.

Summary updated

BibTeX
@inproceedings{soutifcormerais2023improving,
  author = {Albin Soutif-Cormerais and Antonio Carta and Joost van de Weijer},
  title = {{Improving Online Continual Learning Performance and Stability with Temporal Ensembles}},
  booktitle = {CoLLAs},
  year = {2023},
  url = {https://openreview.net/forum?id=Kk6EGYIL8A},
}
Figure