Table of Contents
Fetching ...

SAFA-SNN: Sparsity-Aware On-Device Few-Shot Class-Incremental Learning with Fast-Adaptive Structure of Spiking Neural Network

Huijing Zhang, Muyang Cao, Linshan Jiang, Xin Du, Di Yu, Changze Lv, Shuiguang Deng

TL;DR

SAFA-SNN tackles on-device few-shot class-incremental learning by integrating sparsity-aware dynamic neuronal dynamics, zeroth-order optimization for non-differentiable spikes, and fast adaptive prototype subspace projection. It introduces a channel-wise mask $ extbf{M}$ with $m_c=m{1}_{c \,\le\, \lfloor \eta C \rfloor}$ to keep most neurons stable while a subset learns new classes, and updates the threshold via $\boldsymbol{\Theta}_{t+1} = \boldsymbol{\Theta}_{t} - \mathbf{A}(\bar r_n - \bar r_b)$ with $\mathbf{A} = \beta(\mathbf{I}-\mathbf{M}) + \gamma\mathbf{M}$. For gradient estimation, it employs multi-point zeroth-order optimization with $\hat{\nabla} f(x) = \frac{\phi(d)}{\mu}\sum_{i=1}^b [f(x+\delta z_i) - f(x-\delta z_i)]$, enabling learning despite spike non-differentiability. Prototypes are adaptively combined through subspace projection using base and new prototypes ($\tilde B$, $\tilde C$) and matrices $G$, yielding $\tilde P = (1-\alpha)\tilde C + \alpha\tilde P_{proj}$ with $\tilde P_{proj}=\tilde C G$. Across CIFAR100, Mini-ImageNet, and three neuromorphic datasets, SAFA-SNN achieves superior last-session accuracy and reduced energy consumption on edge hardware, underscoring the practicality of sparsity-aware SNNs for continual learning on resource-constrained devices.

Abstract

Continuous learning of novel classes is crucial for edge devices to preserve data privacy and maintain reliable performance in dynamic environments. However, the scenario becomes particularly challenging when data samples are insufficient, requiring on-device few-shot class-incremental learning (FSCIL) to maintain consistent model performance. Although existing work has explored parameter-efficient FSCIL frameworks based on artificial neural networks (ANNs), their deployment is still fundamentally constrained by limited device resources. Inspired by neural mechanisms, Spiking neural networks (SNNs) process spatiotemporal information efficiently, offering lower energy consumption, greater biological plausibility, and compatibility with neuromorphic hardware than ANNs. In this work, we present an SNN-based method for On-Device FSCIL, i.e., Sparsity-Aware and Fast Adaptive SNN (SAFA-SNN). We first propose sparsity-conditioned neuronal dynamics, in which most neurons remain stable while a subset stays active, thereby mitigating catastrophic forgetting. To further cope with spike non-differentiability in gradient estimation, we employ zeroth-order optimization. Moreover, during incremental learning sessions, we enhance the discriminability of new classes through subspace projection, which alleviates overfitting to novel classes. Extensive experiments conducted on two standard benchmark datasets (CIFAR100 and Mini-ImageNet) and three neuromorphic datasets (CIFAR-10-DVS, DVS128gesture, and N-Caltech101) demonstrate that SAFA-SNN outperforms baseline methods, specifically achieving at least 4.01% improvement at the last incremental session on Mini-ImageNet and 20% lower energy cost over baseline methods with practical implementation.

SAFA-SNN: Sparsity-Aware On-Device Few-Shot Class-Incremental Learning with Fast-Adaptive Structure of Spiking Neural Network

TL;DR

SAFA-SNN tackles on-device few-shot class-incremental learning by integrating sparsity-aware dynamic neuronal dynamics, zeroth-order optimization for non-differentiable spikes, and fast adaptive prototype subspace projection. It introduces a channel-wise mask with to keep most neurons stable while a subset learns new classes, and updates the threshold via with . For gradient estimation, it employs multi-point zeroth-order optimization with , enabling learning despite spike non-differentiability. Prototypes are adaptively combined through subspace projection using base and new prototypes (, ) and matrices , yielding with . Across CIFAR100, Mini-ImageNet, and three neuromorphic datasets, SAFA-SNN achieves superior last-session accuracy and reduced energy consumption on edge hardware, underscoring the practicality of sparsity-aware SNNs for continual learning on resource-constrained devices.

Abstract

Continuous learning of novel classes is crucial for edge devices to preserve data privacy and maintain reliable performance in dynamic environments. However, the scenario becomes particularly challenging when data samples are insufficient, requiring on-device few-shot class-incremental learning (FSCIL) to maintain consistent model performance. Although existing work has explored parameter-efficient FSCIL frameworks based on artificial neural networks (ANNs), their deployment is still fundamentally constrained by limited device resources. Inspired by neural mechanisms, Spiking neural networks (SNNs) process spatiotemporal information efficiently, offering lower energy consumption, greater biological plausibility, and compatibility with neuromorphic hardware than ANNs. In this work, we present an SNN-based method for On-Device FSCIL, i.e., Sparsity-Aware and Fast Adaptive SNN (SAFA-SNN). We first propose sparsity-conditioned neuronal dynamics, in which most neurons remain stable while a subset stays active, thereby mitigating catastrophic forgetting. To further cope with spike non-differentiability in gradient estimation, we employ zeroth-order optimization. Moreover, during incremental learning sessions, we enhance the discriminability of new classes through subspace projection, which alleviates overfitting to novel classes. Extensive experiments conducted on two standard benchmark datasets (CIFAR100 and Mini-ImageNet) and three neuromorphic datasets (CIFAR-10-DVS, DVS128gesture, and N-Caltech101) demonstrate that SAFA-SNN outperforms baseline methods, specifically achieving at least 4.01% improvement at the last incremental session on Mini-ImageNet and 20% lower energy cost over baseline methods with practical implementation.

Paper Structure

This paper contains 38 sections, 1 theorem, 38 equations, 12 figures, 14 tables, 1 algorithm.

Key Result

Theorem 1

Let $p$ be a distribution and $p(t)$ its corresponding probability density function(PDF). Assume that the integrals $\int_{0}^{\infty} t^{\alpha} p(t) dt$ and $\int_{0}^{\infty} t^{\alpha+1} p(t) dt$ exist and are finite. Let further $\tilde{\lambda}$ be the distribution with corresponding PDF func where $c$ is the scaling constant such that$\int_{-\infty}^{\infty} \tilde{\lambda}(z) dz = 1$. The

Figures (12)

  • Figure 1: Top: the on-Device FSCIL scenario includes three stages: base data training, few-shot data collection and learning. Bottom: the comparison of SNN and ANN neuron on devices.
  • Figure 2: SAFA-SNN framework include three main components: (a) Training abundant data and selecting active and stable neurons by masks. (b) Top: forward propagation through FSCIL process; Bottom: backpropagation using zeroth-order optimization only in the base class training. (c) Freezing backbones and updating the prototypes by subspace projection in the incremental inference.
  • Figure 3: Accuracy in each session.
  • Figure 4: Training Energy Cost.
  • Figure 5: Average Training Time.
  • ...and 7 more figures

Theorems & Definitions (1)

  • Theorem 1