SparCL: Sparse Continual Learning on the Edge

Zifeng Wang, Zheng Zhan, Yifan Gong, Geng Yuan, Wei Niu, Tong Jian, Bin Ren, Stratis Ioannidis, Yanzhi Wang, Jennifer G. Dy

Abstract

Continual Learning (CL) on resource-constrained edge devices is hindered by the high computational and memory costs associated with training dense, over-parameterized models. We present SparCL, the first unified framework to enable cost-effective CL by leveraging a "triple threat" of sparsity: weight, data, and gradient sparsity. By combining Task-aware Dynamic Masking (TDM), Dynamic Data Removal (DDR), and Dynamic Gradient Masking (DGM), SparCL achieves up to a 23× reduction in training FLOPs while improving state-of-the-art accuracy by up to 1.7%. Our evaluation on mobile hardware demonstrates significant training acceleration and a reduced memory footprint, proving that sparsity can simultaneously enhance efficiency and performance in real-world edge scenarios.

Introduction

Continual Learning (CL) aims to mimic human intelligence by learning a sequence of tasks without forgetting previous ones—a challenge known as catastrophic forgetting. While researchers have made significant strides in preserving accuracy across tasks, the training efficiency of these systems has largely been ignored. Most existing CL methods rely on training dense models or progressively growing architectures, both of which are computationally expensive and memory-intensive.

This lack of efficiency makes it nearly impossible to deploy CL on "edge" devices, such as smartphones or IoT sensors, where battery life and memory are strictly limited. SparCL addresses this gap by providing a framework that is both memory-light and computationally fast, ensuring that models can retain old knowledge without the overhead of traditional dense training.

Methodology

SparCL achieves its efficiency through the synergy of three dynamic components designed to sparsify the learning process:

1. Task-aware Dynamic Masking (TDM)

Instead of training a full dense network, SparCL maintains a sparse sub-network. It utilizes a "Continual Weight Importance" (CWI) metric, which evaluates weight magnitude, current task gradients, and gradients from a small rehearsal buffer of historical data to determine weight retention. SparCL employs a "shrink-and-expand" strategy during tasks and an "expand-and-shrink" strategy during task transitions, ensuring the model maintains sufficient capacity to learn new information while remaining sparse.

2. Dynamic Data Removal (DDR)

Recognizing that not all training data is equally informative, SparCL tracks the classification difficulty of individual samples. "Easy-to-learn" samples that are consistently classified correctly are removed from the training set. This reduces the overall workload and helps balance the training process between the high volume of new task data and the limited samples available in the rehearsal buffer.

3. Dynamic Gradient Masking (DGM)

To further reduce computation and prevent the overwriting of critical old knowledge, SparCL sparsifies the backpropagation process. By only updating the most important gradients, DGM protects the weights most critical to previous tasks, effectively mitigating forgetting while saving on FLOPs.

Experimental Setup

The framework was evaluated on two representative CL benchmarks:

  • Split CIFAR-10: A standard dataset split into 5 tasks with 2 classes each.
  • Split Tiny-ImageNet: A complex dataset split into 10 tasks with 20 classes each.

Both datasets were tested in Class-Incremental Learning (Class-IL) and Task-Incremental Learning (Task-IL) settings. To validate real-world utility, the authors performed hardware testing on a Samsung Galaxy S20 smartphone (Snapdragon 865 CPU) to measure actual acceleration and memory usage.

Key Results and Insights

Efficiency and Accuracy

SparCL achieved up to 23× fewer training FLOPs compared to DER++, a state-of-the-art CL method. Surprisingly, this reduction in computation did not come at the cost of performance; SparCL improved SOTA accuracy by up to 1.7% on Split CIFAR-10. This suggests that sparsity acts as a form of regularization, preventing the model from over-fitting to a single task and thereby mitigating catastrophic forgetting.

On-Device Performance

In real-world mobile testing, SparCL achieved a 3.1× training acceleration and reduced the memory footprint by approximately 50%. Furthermore, the resulting sparse models were significantly faster during inference, reaching speeds of ~5.85ms per image on Tiny-ImageNet, compared to ~18.5ms for traditional dense models.

The Power of Synergy

The research demonstrates that weight, data, and gradient sparsity are highly complementary. While each component improves efficiency individually, their combined use provides the optimal balance of speed and knowledge retention. DDR, in particular, serves as a strategic tool for data balancing, allowing the model to focus on "hard" samples and the limited rehearsal buffer.

Conclusion and Future Work

SparCL proves that efficiency and performance are not mutually exclusive in the context of Continual Learning. By leveraging triple sparsity, the framework enables the deployment of sophisticated learning systems on resource-constrained hardware.

Future research will focus on expanding SparCL beyond computer vision to domains such as Natural Language Processing (NLP). Additionally, while SparCL currently utilizes a rehearsal buffer, future iterations may explore its performance in purely buffer-free scenarios. Finally, the authors note that there is an upper bound to efficiency; when sparsity ratios exceed 95%, accuracy begins to decline as the model loses the capacity to represent complex features.

Summary updated

BibTeX
@inproceedings{wang2022sparcl,
  author = {Zifeng Wang and Zheng Zhan and Yifan Gong and Geng Yuan and Wei Niu and Tong Jian and Bin Ren and Stratis Ioannidis and Yanzhi Wang and Jennifer G. Dy},
  title = {{SparCL: Sparse Continual Learning on the Edge}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
}
Figure