Threshold Modulation for Online Test-Time Adaptation of Spiking Neural Networks
Kejie Zhao, Wenjia Hua, Aiersi Tuerhong, Luziwei Leng, Yuxin Ma, Qinghai Guo
TL;DR
This work tackles the challenge of online test-time adaptation for spiking neural networks deployed on neuromorphic hardware under distribution shifts. It introduces Threshold Modulation (TM), a neuromorphic-chip-friendly mechanism that adapts firing thresholds through membrane-potential normalization via Membrane Potential Batch Normalization (MPBN) and online statistic updates, enabling adaptation without changing weights or inputs. The TM framework yields two variants, TM-NORM and TM-ENT, and demonstrates robust improvements on CIFAR-10-C, CIFAR-100-C, ImageNet-C, and digit-transfer tasks with only modest energy overhead compared to pure inference. The results offer practical guidance for designing energy-efficient on-chip adaptation strategies and inform future neuromorphic chip architectures that support neuron-level normalization and threshold modulation. The accompanying code provides a concrete starting point for researchers to reproduce and extend these ideas.
Abstract
Recently, spiking neural networks (SNNs), deployed on neuromorphic chips, provide highly efficient solutions on edge devices in different scenarios. However, their ability to adapt to distribution shifts after deployment has become a crucial challenge. Online test-time adaptation (OTTA) offers a promising solution by enabling models to dynamically adjust to new data distributions without requiring source data or labeled target samples. Nevertheless, existing OTTA methods are largely designed for traditional artificial neural networks and are not well-suited for SNNs. To address this gap, we propose a low-power, neuromorphic chip-friendly online test-time adaptation framework, aiming to enhance model generalization under distribution shifts. The proposed approach is called Threshold Modulation (TM), which dynamically adjusts the firing threshold through neuronal dynamics-inspired normalization, being more compatible with neuromorphic hardware. Experimental results on benchmark datasets demonstrate the effectiveness of this method in improving the robustness of SNNs against distribution shifts while maintaining low computational cost. The proposed method offers a practical solution for online test-time adaptation of SNNs, providing inspiration for the design of future neuromorphic chips. The demo code is available at github.com/NneurotransmitterR/TM-OTTA-SNN.
