Abstract
Continual learning (CL) trains NN models incrementally from a continuous stream of tasks. To remember previously learned knowledge, prior studies store old samples over a memory hierarchy and replay them when new tasks arrive. Edge devices that adopt CL to preserve data privacy are typically energy-sensitive and thus require high model accuracy while not compromising energy efficiency, i.e., cost-effectiveness. Our work is the first to explore the design space of hierarchical memory replay-based CL to gain insights into achieving cost-effectiveness on edge devices. We present Miro, a novel system runtime that carefully integrates our insights into the CL framework by enabling it to dynamically configure the CL system based on resource states for the best cost-effectiveness. To reach this goal, Miro also performs online profiling on parameters with clear accuracy-energy trade-offs and adapts to optimal values with low overhead. Extensive evaluations show that Miro significantly outperforms baseline systems we build for comparison, consistently achieving higher cost-effectiveness.
Introduction
Continual Learning (CL) is a vital paradigm for privacy-sensitive edge devices, such as smart home hubs and wearables, allowing them to learn from data streams incrementally. However, CL is plagued by "catastrophic forgetting," where new data overwrites previously acquired knowledge. While Episodic Memory (EM)—storing a subset of old samples for replay—is a standard mitigation strategy, edge devices are severely constrained by limited RAM.
To address this, researchers have proposed Hierarchical Episodic Memory (HEM), which utilizes large but slow flash storage to supplement fast RAM. Despite its potential, existing HEM systems often prioritize raw accuracy while ignoring the significant energy drain of training on mobile devices. Miro is a novel system runtime designed to bridge this gap by treating cost-effectiveness (Accuracy Gain / Energy Usage) as a primary optimization metric.
System Design and Methodology
Miro operates as a dynamic runtime that manages the memory hierarchy to maximize utility. It intelligently balances the allocation of memory between new data (the Stream Buffer) and old samples (Episodic Memory) based on real-time resource availability.
Miro utilizes a four-phase dynamic state machine to maintain optimal performance:
- Profile: When a new task arrives, Miro runs lightweight "mini-training" sessions on sub-sampled data. This process is 346x faster than an exhaustive search, allowing the system to estimate the accuracy and energy costs of various configurations.
- Probe: The system monitors I/O and memory states at the end of every training epoch.
- Estimate: If Miro detects I/O congestion or changes in available memory, it calculates new optimal parameters.
- Adapt: The system reconfigures itself on the fly, adjusting parameters like the ratio of samples swapped from storage to RAM.
To prevent the selection of low-performing configurations, Miro employs a "Cutline" strategy, filtering out candidates that fail to meet a minimum accuracy threshold before selecting the one with the highest utility.
Key Insights and Trade-offs
The development of Miro was informed by several critical insights into how hardware components consume power during the training process.
- Negligible I/O Energy Cost: A major finding was that while the GPU dominates power consumption, the I/O operations required to swap data between storage and RAM are almost "free" in terms of energy. This justifies aggressive data swapping to improve model accuracy.
- Diminishing Returns of Memory: Simply maximizing RAM allocation does not always yield better results. Blindly committing full capacity to new data can actually hurt accuracy and waste energy.
- The Swapping "Knee Point": Accuracy gains from swapping samples between storage and RAM tend to plateau quickly, typically around a 15-20% swap ratio. Miro exploits this "knee point" to avoid over-taxing the I/O bus once the benefit diminishes.
Experimental Results
Miro was evaluated across diverse domains, including image classification (CIFAR100, Tiny-ImageNet, ImageNet1k), audio classification (UrbanSound8K), and human activity recognition (DSADS).
Compared to the state-of-the-art CarM system and several heuristic baselines, Miro demonstrated significant improvements:
- Energy Efficiency: Miro consumed 7% to 66% less energy than baseline systems across various memory budgets.
- Accuracy: The system achieved 1.35% to 15.37% higher accuracy in small-to-medium experiments. On the massive ImageNet1k dataset, Miro outperformed CarM by 23.37% in accuracy while saving 46.05% in energy.
- Low Overhead: The profiling and adaptation mechanisms add only 7–10% overhead, which is quickly offset by the energy savings gained from choosing more efficient training configurations.
Conclusion
Miro demonstrates that cost-effective on-device continual learning is achievable through intelligent, profile-driven management of the memory hierarchy. By prioritizing the utility of every joule spent, Miro enables edge devices to maintain high accuracy over time without compromising battery life. Future work will focus on smart eviction policies for long-term deployments and optimizing for data with high temporal locality, such as video analytics.
Summary updated