Continuum: Simple Management of Complex Continual Learning Scenarios

Arthur Douillard, Timothée LesortarXiv 2021

Abstract

Continual learning is a machine learning sub-field specialized in settings with non-iid data. Hence, the training data distribution is not static and drifts through time. Those drifts might cause interferences in the trained model and knowledge learned on previous states of the data distribution might be forgotten. Continual learning's challenge is to create algorithms able to learn an ever-growing amount of knowledge while dealing with data distribution drifts. One implementation difficulty in these field is to create data loaders that simulate non-iid scenarios. Indeed, data loaders are a key component for continual algorithms. They should be carefully designed and reproducible. Small errors in data loaders have a critical impact on algorithm results, e.g. with bad preprocessing, wrong order of data or bad test set. Continuum is a simple and efficient framework with numerous data loaders that avoid researcher to spend time on designing data loader and eliminate time-consuming errors. Using our proposed framework, it is possible to directly focus on the model design by using the multiple scenarios and evaluation metrics implemented. Furthermore the framework is easily extendable to add novel settings for specific needs.

Introduction

In standard machine learning, the prevailing assumption is that data is "i.i.d." (independent and identically distributed). This allows models to be trained on shuffled, static datasets. However, real-world applications often break this assumption. Continual Learning (CL) addresses settings where a model encounters data in a sequence of tasks, and the underlying distribution drifts over time—for example, learning to recognize digits today and vehicles tomorrow.

The primary challenge in CL research is not just the model architecture, but the complex data pipeline required to simulate these shifts. Small inconsistencies in data ordering or preprocessing can lead to "catastrophic forgetting"—where a model loses previously acquired knowledge—that is difficult to reproduce across different labs. Continuum is an open-source Python library designed to standardize this "plumbing," allowing researchers to focus on algorithmic innovation rather than debugging error-prone data loaders.

The Continuum Framework

Continuum follows the Unix philosophy: "do one thing and do it well." It focuses exclusively on data loading and evaluation, remaining agnostic to whether the user prefers PyTorch, TensorFlow, or another backend. The library organizes data management into a clear three-level hierarchy:

  1. Datasets: The raw data sources (e.g., MNIST, CIFAR10).
  2. Scenarios: The "curriculum" defining how data is presented (e.g., Class-Incremental or Domain-Incremental).
  3. Tasksets: The specific subsets of data fed to the model at any given time, including task-specific transformations.
Overview of the Continuum framework: transforming a static dataset into a sequence of tasks.

By decoupling the data source from the learning scenario, researchers can swap datasets or modify the curriculum with minimal code changes. This separation of concerns is vital for rigorous experimentation and ensuring that results are comparable across different research papers.

Supported Benchmarks and Scenarios

Continuum supports a wide array of standard and specialized benchmarks. This includes traditional datasets like MNIST and CIFAR, as well as transformation-based variants like Rotation-MNIST. It also supports specialized CL datasets like CORe50, which provides metadata for "New Instances and Classes" (NIC) scenarios.

Example of a class-incremental scenario task involving ship and truck categories.

The library handles both implicit and explicit task labels. In some settings, the model is told which task it is performing; in others, it must infer the task from the data itself. Continuum’s flexibility allows for testing models under various levels of supervision and task-specific constraints.

Evaluation and Reproducibility

Beyond data loading, Continuum includes a Logger class to automate the calculation of specialized CL metrics. Metrics such as Average Incremental Accuracy, Remembering, and Positive Backward Transfer (how new learning improves performance on old tasks) are often tedious to implement manually. By centralizing this logic, Continuum ensures that evaluation is consistent and reproducible across the community. The paper demonstrates that a complex class-incremental MNIST scenario can be set up in roughly 15 lines of code, significantly reducing the entry barrier for new researchers.

Conclusion

Continuum lowers the barrier to entry for Continual Learning research. By providing a modular, easy-to-use framework for complex data streams, it eliminates common errors and accelerates the development of more robust AI models. While currently focused on Computer Vision, future work aims to expand into text and audio domains, further cementing its role as a foundational tool for the CL community.

Summary updated

BibTeX
@misc{douillard2021continuum,
  author = {Arthur Douillard and Timothée Lesort},
  title = {{Continuum: Simple Management of Complex Continual Learning Scenarios}},
  year = {2021},
  eprint = {2102.06253},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2102.06253},
}
Figure