arXiv:2504.11026cs.LG2025-04中稿 · the 20th Internati…被引 1

开源兼容PyTorch的脉冲编码框架,助力低功耗神经形态计算。

A PyTorch-Compatible Spike Encoding Framework for Energy-Efficient Neuromorphic Applications

  • 提供多种脉冲编码算法,支持嵌入式部署
  • 步进前向编码误差最低,能效与速度最优
  • 适合机器学习与强化学习中的神经形态应用

脉冲神经网络(SNNs)在处理稀疏脉冲信号时具有显著的能耗优势。然而,其与传统以向量批为单位的数据集不兼容,需高效编码方法。本文提出一个开源、兼容PyTorch的脉冲编码框架,适用于机器学习与强化学习中的神经形态应用。框架支持漏积分-发放(LIF)、步进前向(SF)、脉宽调制(PWM)及本氏脉冲算法(BSA)等多种编码方法,以及群体编码和强化学习场景下的专用策略。通过C/C++实现,在嵌入式硬件上评估了各方法的能量消耗、计算时间、脉冲稀疏度与重建精度。结果表明,步进前向编码通常具有最低重建误差,能效最高,编码速度最快,仅次于最佳稀疏度;其他方法则依信号特性表现各异。该框架与实证分析为选择高效编码策略提供了重要参考。

原文摘要 · Abstract (English)

Spiking Neural Networks (SNNs) offer promising energy efficiency advantages, particularly when processing sparse spike trains. However, their incompatibility with traditional datasets, which consist of batches of input vectors rather than spike trains, necessitates the development of efficient encoding methods. This paper introduces a novel, open-source PyTorch-compatible Python framework for spike encoding, designed for neuromorphic applications in machine learning and reinforcement learning. The framework supports a range of encoding algorithms, including Leaky Integrate-and-Fire (LIF), Step Forward (SF), Pulse Width Modulation (PWM), and Ben's Spiker Algorithm (BSA), as well as specialized encoding strategies covering population coding and reinforcement learning scenarios. Furthermore, we investigate the performance trade-offs of each method on embedded hardware using C/C++ implementations, considering energy consumption, computation time, spike sparsity, and reconstruction accuracy. Our findings indicate that SF typically achieves the lowest reconstruction error and offers the highest energy efficiency and fastest encoding speed, achieving the second-best spike sparsity. At the same time, other methods demonstrate particular strengths depending on the signal characteristics. This framework and the accompanying empirical analysis provide valuable resources for selecting optimal encoding strategies for energy-efficient SNN applications.

脉冲神经网络低功耗神经形态计算PyTorch

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。