Introduction
Continual Learning (CL) represents a fundamental challenge in artificial intelligence: the ability of a model to sequentially acquire new knowledge without succumbing to "catastrophic forgetting." Despite significant research interest, the field remains a fragmented landscape characterized by inconsistent frameworks, varying data pipelines, and heterogeneous evaluation protocols. This fragmentation makes it difficult to ascertain whether performance gains in new algorithms stem from genuine innovation or specific hyperparameter tuning.
To address these challenges, we introduce LibContinual, an open-source library designed to standardize CL research and shift the focus toward "real-world" rigor. By providing a unified, modular framework for 19 diverse algorithms, LibContinual exposes the limitations of current CL benchmarks and proposes a more realistic evaluation paradigm.
The Realism Gap in Continual Learning
Mainstream CL evaluation often relies on three "idealized" assumptions that rarely hold true in practical applications:
- Offline Data Access: Many protocols allow models to iterate over the same data multiple times (multiple epochs). In real-world scenarios, such as a robot navigating a dynamic environment, data is typically encountered as a single-pass stream.
- Uncounted Memory Usage: Research often measures memory in terms of the "number of stored images," ignoring the actual hardware footprint of model snapshots, abstract features, or prompts.
- Semantic Task Grouping: Standard benchmarks group classes into semantically related tasks (e.g., all vehicles in one task, all animals in another). This allows models to exploit semantic shortcuts rather than learning robust, generalized representations.
LibContinual: A Modular Architecture
LibContinual is built on a "high-cohesion, low-coupling" architecture that decouples the experimental workflow into four core modules:
- Trainer: Manages the overall execution logic and training loops.
- Model: Contains the implementation of the CL algorithms, covering five major categories: Regularization, Replay, Optimization, Representation, and Architecture-based methods.
- Buffer: Handles the storage and retrieval of past information, whether in the form of raw pixels or latent features.
- DataModule: Manages the data stream and ensures consistent preprocessing across different experiments.
This modularity allows researchers to easily integrate new algorithms or datasets while maintaining a consistent evaluation pipeline.
Redefining Evaluation Protocols
To bridge the gap between theory and practice, LibContinual implements several strict protocols:
- Strict Online CL: Models are restricted to a single-pass data stream (Epoch=1), simulating real-time learning constraints. This reveals the "Online Collapse" of traditional methods like EWC, which often drop to near-random accuracy (~10%) under these conditions.
- Unified Memory Budget: All storage requirements—including raw pixels, model snapshots, and prompts—are converted into a single quantitative metric: Megabytes (MB). This provides a transparent view of the resource efficiency of different methods.
- Category-Randomized Setting: This novel mode shuffles classes from different domains into heterogeneous tasks. By stripping away semantic groupings, it tests the model's ability to handle disorganized knowledge streams.
Key Insights and Empirical Analysis
Our extensive benchmarking using LibContinual reveals several critical insights into the current state of CL:
The Pre-trained Model (PTM) Advantage
Pre-trained Models (PTMs) emerge as the clear leaders in realistic settings. We identified a "sweet spot"—typically under 20MB of extra memory—where PTM-based methods like RanPAC and CodaPrompt achieve state-of-the-art results with minimal overhead. For instance, RanPAC achieved a remarkable 90.59% accuracy on CIFAR-100 using only 16.0 MB of additional memory.
The Efficiency of Prompting
The study highlights significant disparities in memory efficiency. While L2P consumed over 440 MB of memory, it was consistently outperformed by CodaPrompt, which utilized less than 4% of that memory. This suggests that future research should prioritize "accuracy per megabyte" rather than simply increasing buffer sizes.
Semantic Fragility and MoE Robustness
One of the most striking findings is the "semantic fragility" of high-performing models. When tasks were randomized (mixing digits with animals), the accuracy of top-tier methods like RanPAC dropped by a staggering 29%, indicating a heavy reliance on task-level semantic patterns. Conversely, Mixture-of-Experts (MoE) architectures showed a performance increase of 23.84% in randomized settings. The MoE routing mechanism naturally assigns different experts to handle diverse clusters within a single task, effectively turning disorganized data into an opportunity for specialization.
Conclusion and Future Work
LibContinual provides the tools necessary to move CL research toward practical utility. Our findings suggest that the field should move away from memory-intensive replay and toward intelligent, low-cost mechanisms for adapting large foundation models. Future work must address the limitations of architecture-based methods in "Class-Incremental" settings, where the absence of a task oracle remains a significant hurdle. By focusing on resource-constrained, online, and disorganized data streams, the CL community can develop AI that truly learns and adapts in the real world.
Summary updated