arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.12136cs.CV
收藏

资源受限硬件上脉冲神经网络的压缩与推理

Compression and Inference of Spiking Neural Networks on Resource-Constrained Hardware

AGH University of Science and Technology(AGH科技大学);Institute of Computer Science(计算机科学研究所);Faculty of Computer Science, Electronics and Telecommunications(计算机科学、电子与电信系);Institute of Electronics(电子研究所)

Karol C. Jurzec, Tomasz Szydlo, Maciej Wielgosz

AI总结:

针对资源受限硬件上脉冲神经网络(SNNs)训练与部署的挑战,提出轻量级C语言推理运行时系统及优化方法,通过紧凑C表示转换、稀疏活动修剪等手段,在保证精度的同时减少延迟和内存,实现边缘设备高效部署。

摘要:

脉冲神经网络(SNNs)通过时间上的离散脉冲而非连续激活进行通信。其事件驱动特性为资源受限硬件上的时间处理和能效提供了优势,但训练和部署仍具挑战。我们提出了一种轻量级的基于C语言的运行时系统,用于边缘设备上的SNN推理,并通过优化在不牺牲精度的情况下减少延迟和内存占用。从SNNTorch导出的训练模型被转换为紧凑的C表示;静态、缓存友好的数据布局和预分配避免了解释器和分配开销。我们进一步利用稀疏脉冲活动修剪非活动神经元和突触,缩减上游卷积层的计算量。在N-MNIST和ST-MNIST数据集上的实验表明,该方法与Python基线功能相当,同时在桌面CPU上实现约10倍的速度提升,且通过修剪获得额外收益,大幅减少内存占用,使微控制器(如Arduino Portenta H7)部署成为可能。结果表明,当与优化的运行时系统和脉冲驱动的模型压缩相结合时,SNNs可在传统嵌入式平台上高效执行。代码:https://github.com/karol-jurzec/snn-generator/

英文摘要:

Spiking neural networks (SNNs) communicate via discrete spikes in time rather than continuous activations. Their event-driven nature offers advantages for temporal processing and energy efficiency on resource-constrained hardware, but training and deployment remain challenging. We present a lightweight C-based runtime for SNN inference on edge devices and optimizations that reduce latency and memory without sacrificing accuracy. Trained models exported from SNNTorch are translated to a compact C representation; static, cache-friendly data layouts and preallocation avoid interpreter and allocation overheads. We further exploit sparse spiking activity to prune inactive neurons and synapses, shrinking computation in upstream convolutional layers. Experiments on N-MNIST and ST-MNIST show functional parity with the Python baseline while achieving ~10 speedups on desktop CPU and additional gains with pruning, together with large memory reductions that enable microcontroller deployment (Arduino Portenta H7). Results indicate that SNNs can be executed efficiently on conventional embedded platforms when paired with an optimized runtime and spike-driven model compression. Code: https://github.com/karol-jurzec/snn-generator/

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑