Abstract
Online Continual Learning (OCL) requires models to learn from high-frequency data streams while operating under strict and often fluctuating memory limits. Ferret is a novel framework designed to address the "double bind" of latency and memory constraints in OCL. By integrating fine-grained pipeline parallelism with a new iterative gradient compensation algorithm, Ferret achieves up to 3.7× lower memory overhead than existing methods while maintaining superior online accuracy across diverse benchmarks.
Introduction
In real-world scenarios, data arrives in high-frequency streams with shifting distributions. Online Continual Learning (OCL) aims to enable models to learn from this data in real-time without catastrophic forgetting. However, OCL systems face significant challenges: processing latency can cause models to miss time-sensitive information, and memory constraints on edge devices often fluctuate. Existing frameworks like PyTorch or Ray are not optimized for the extreme throughput and memory elasticity required for OCL. Ferret addresses these bottlenecks by optimizing the underlying framework architecture, specifically focusing on model partitioning and data movement.
The Ferret Framework
Ferret introduces a three-pronged approach to optimize OCL performance, balancing high-speed processing with resource efficiency.
1. Fine-grained Pipeline Parallelism and Gradient Compensation
To handle high-frequency data, Ferret breaks the model into stages and processes different data samples across multiple workers simultaneously. This keeps hardware utilization high and reduces latency. However, parallelism typically introduces "stale gradients," where workers update the model based on outdated parameters. Ferret mitigates this using an Iterative Gradient Compensation algorithm. By applying a first-order Taylor expansion and the Fisher Information Matrix (FIM), the framework mathematically corrects gradients to match the current model state, ensuring stable learning even at high speeds.
2. Automated Resource Management (T1-T4)
Ferret dynamically adapts to tight memory budgets using four specific tactics:
- T1: Activation Recomputation: Trading computation time for reduced memory usage.
- T2: Gradient Accumulation: Reducing the frequency of model updates.
- T3: Back-propagation Omission: Skipping updates for certain layers to save memory.
- T4: Worker Removal: Scaling down the number of parallel processes.
3. Bi-level Optimization
The framework automatically solves a complex optimization problem to determine the optimal model partitioning scheme ($L^*$) and pipeline configuration ($C^*$) based on the specific memory budget provided, ensuring the best possible accuracy within available resources.
Experimental Evaluation
The authors evaluated Ferret across 20 benchmarks, including standard vision datasets (MNIST, CIFAR), continual learning specific datasets (CORe50, CLEAR), and tabular data (Covertype). The framework was tested on various architectures, including ResNet-18 and MobileNet.
Key Results
- Efficiency: Ferret reached the same online accuracy as state-of-the-art methods while using up to 3.7× less memory.
- Superior Accuracy: Across diverse memory budgets, Ferret consistently outperformed existing OCL frameworks like Camel and LifeLearner.
- Staleness Mitigation: The "Iter-Fisher" compensation method significantly outperformed standard techniques (like Step-Aware or Gap-Aware) in maintaining model stability during high-frequency parallel processing.
- Scalability: The framework demonstrated a linear relationship between increased memory budget and improved online accuracy, proving its ability to effectively utilize available resources.
Conclusion
Ferret demonstrates that framework-level optimizations are as critical as algorithmic improvements in the field of Online Continual Learning. By providing an elastic and high-throughput environment, Ferret enables robust learning in dynamic, resource-constrained real-world settings. Future work may explore its application to multi-modal data streams and more complex, architecture-growing algorithms.
Summary updated