Source-linked AI summary
Avalanche: an End-to-End Library for Continual Learning
Vincenzo Lomonaco, Lorenzo Pellegrini, Andrea Cossu, Antonio Carta, Gabriele Graffieti, Tyler L. Hayes, Matthias De Lange, Marc Masana, Jary Pomponi, Gido van de Ven, Martin Mundt, Qi She, Keiland Cooper, Jeremy Forest, Eden Belouadah, Simone Calderara, German I. Parisi, Fabio Cuzzolin, Andreas Tolias, Simone Scardapane, Luca Antiga, Subutai Amhad, Adrian Popescu, Christopher Kanan, Joost van de Weijer, Tinne Tuytelaars, Davide Bacciu, Davide Maltoni
TL;DR
Continual-learning algorithms are difficult to compare, reimplement, evaluate, and port across settings, limiting reproducible research workflows. Avalanche addresses this gap with an open-source, end-to-end PyTorch library and shared codebase for prototyping, training, and evaluation. Its design emphasizes reproducibility, modularity, portability, and collaborative extensibility, while current support is focused on supervised vision tasks and train/test streams.
Problem
Different assumptions, settings, and benchmarks make continual-learning algorithms difficult to compare, reimplement, evaluate, and port, while reproducing results is especially difficult in continual learning.
Method
Avalanche provides an open-source, end-to-end PyTorch library and shared codebase with modular support for continual-learning benchmarks, training, evaluation, models, and logging.
Results
Avalanche provides 11 continual-learning strategies and supports monitoring metrics including accuracy, loss, forgetting, confusion matrices, timing, resource usage, and computational cost.
Takeaways & Limitations
Avalanche aims to serve as a coherent, extendable shared resource for reproducible continual-learning research and development.
Takeaways & Limitations
The current Alpha version focuses on continual supervised learning for vision tasks and supports only train and test streams.
Abstract
from arXiv · showhide
Learning continually from non-stationary data streams is a long-standing goal and a challenging problem in machine learning. Recently, we have witnessed a renewed and fast-growing interest in continual learning, especially within the deep learning community. However, algorithmic solutions are often difficult to re-implement, evaluate and port across different settings, where even results on standard benchmarks are hard to reproduce. In this work, we propose Avalanche, an open-source end-to-end library for continual learning research based on PyTorch. Avalanche is designed to provide a shared and collaborative codebase for fast prototyping, training, and reproducible evaluation of continual learning algorithms.
1. Introduction
Continual learning is challenging and increasingly important, yet its algorithms are difficult to compare, reimplement, evaluate, and port across settings. Avalanche addresses this gap as an open-source, end-to-end PyTorch library for prototyping, training, evaluation, and reproducibility.
- Continual learning has become a fast-growing research area, particularly with gradient-based deep architectures.
- Different assumptions, settings, and benchmarks make continual learning algorithms difficult to compare and port across contexts.
- Avalanche is an open-source, end-to-end PyTorch library providing a shared codebase for prototyping, training, and evaluating continual learning algorithms.
- Avalanche is designed to reduce coding effort, improve reproducibility, support modularity and reusability, and increase efficiency, scalability, portability, impact, and usability.
- The project contributes a general framework, five-module library design, and collaboratively maintained open-source implementation involving more than 15 organizations.
2. Design Principles
Avalanche is guided by five principles intended to make continual-learning research comprehensive, usable, reproducible, modular, efficient, and scalable. These principles shape both the library’s architecture and its collaborative research workflow.
- Comprehensiveness and consistency: Avalanche prioritizes comprehensive, consistent end-to-end support that gives researchers and practitioners a unified access point across modules.
- Ease-of-Use: Its ease-of-use principle emphasizes simple solutions, an intuitive API, official documentation, notebooks, and executable examples.
- Reproducibility and Portability: Reproducibility and portability let researchers reproduce experiments, integrate original work into a shared codebase, and compare solutions with existing literature.
- Modularity and Independence: Modularity and independent modules support reusability, scalability, collaboration, and stand-alone use of individual functionalities.
- Efficiency and Scalability: Efficiency and scalability aim to provide a seamless experience across use cases and hardware platforms despite growing computational and memory requirements.
3. Continual Learning Framework
Avalanche formalizes continual learning around flexible, sequential experiences while minimizing assumptions about their content and organization. Algorithms process these experiences to update internal state and improve evaluation metrics on test streams.
- Avalanche favors minimal assumptions, using flexible building blocks without imposing strong nomenclature, constraining abstractions, or fixed settings.
- Data is modeled as an ordered sequence of usually non-iid learning experiences.
- Each learning experience contains one or more samples used to update the model and can represent a batch or task across supervised, reinforcement, and unsupervised learning.
- In supervised learning, an experience may contain input-target-task triplets ⟨x_i, y_i, t_i⟩, with task labels optionally available.
- Algorithms process experiences sequentially through training and evaluation modes, supporting model updates and testing on experience streams.
- The framework defines continual learning as sequentially updating an algorithm’s internal state from a non-stationary stream of experiences to improve test-stream metrics.
4. Main Modules
Avalanche organizes continual-learning experiments around benchmarks, training, evaluation, models, and logging modules. Its APIs support standard and customized experience streams, reusable strategies, broad metrics, and real-time experiment reporting.
- Avalanche organizes the library into Benchmarks, Training, Evaluation, Models, and Logging modules.These modules provide the main structure for creating, training, evaluating, and monitoring continual-learning experiments.
- Benchmarks: Benchmarks provide out-of-the-box loaders for common datasets and flexible APIs for creating customized continual-learning benchmarks.The benchmarks module includes classic loaders and supports benchmark definitions that do not fit existing categories.
- Benchmarks: Benchmark instances are modeled as compositions of streams of experiences, giving all benchmarks a shared access pattern without imposing semantic conventions.Avalanche currently supports train and test streams, while arbitrary streams are planned for future support.
- Training: The training module combines 11 available continual-learning strategies with abstractions for implementing custom algorithms.Strategies expose training and evaluation methods that operate on individual experiences or slices of the data stream.
- Evaluation and Logging: The evaluation and logging modules separate metric computation from result presentation, supporting metrics such as accuracy, forgetting, resource usage, and computational cost.Avalanche includes TextLogger, InteractiveLogger, and TensorboardLogger for reporting plugin metrics during experiments.
- Models: The models module supplies ready-to-use feedforward and convolutional networks plus a pretrained MobileNet v1.These architectures let users focus on Avalanche features instead of implementing basic model definitions.
5. Related Works
Related work highlights reproducibility and integration challenges in continual learning, while positioning Avalanche as a more comprehensive and consistent library combining benchmarks, strategies, and metrics.
- Continual learning experiments are difficult to reproduce because authors implement protocols, benchmarks, and strategies differently.
- Existing continual learning libraries improve reproducibility but lack Avalanche’s generality and consistency, particularly for complex benchmarks and sustained community support.
- Reinforcement learning libraries commonly provide environments and benchmarks, while baseline strategy libraries separately provide standard algorithms.
- Avalanche follows comprehensive machine-learning library designs while including benchmarks, strategies, and metrics for consistency across modules.
- Fine-grained logging records experiment runs and can integrate with dedicated bookkeeping and visualization tools such as Sacred and Weights and Biases.
6. Conclusion and Future Work
Avalanche addresses fragmented and difficult-to-integrate continual-learning implementations by providing a coherent, extensible shared library. Its current Alpha scope centers on supervised vision learning, with broader paradigms and application contexts planned for future integration.
- Public research code often remains difficult to run and integrate across environments, limiting reproducibility and scalability.
- Avalanche provides a coherent, end-to-end, extendable shared resource for continual-learning research and development.
- The current Alpha version focuses on continual supervised learning for vision tasks.
- Future plans include reinforcement or unsupervised learning, detection and segmentation, and applications such as natural language processing and speech recognition.
- The project aims to encourage a more collaborative and inclusive continual-learning research environment.