Vanilla spiking neurons in Spiking Neural Networks (SNNs) use charge-fire-reset neuronal dynamics, which can only be simulated serially and can hardly learn long-time dependencies. We find that when removing reset, the neuronal dynamics can be reformulated in a non-iterative form and parallelized. By rewriting neuronal dynamics without reset to a general formulation, we propose the Parallel Spiking Neuron (PSN), which generates hidden states that are independent of their predecessors, resulting in parallelizable neuronal dynamics and extremely high simulation speed. The weights of inputs in the PSN are fully connected, which maximizes the utilization of temporal information. To avoid the use of future inputs for step-by-step inference, the weights of the PSN can be masked, resulting in the masked PSN. By sharing weights across time-steps based on the masked PSN, the sliding PSN is proposed to handle sequences of varying lengths. We evaluate the PSN family on simulation speed and temporal/static data classification, and the results show the overwhelming advantage of the PSN family in efficiency and accuracy. To the best of our knowledge, this is the first study about parallelizing spiking neurons and can be a cornerstone for the spiking deep learning research. Our codes are available at \url{https://github.com/fangwei123456/Parallel-Spiking-Neuron}.
翻译:脉冲神经网络(SNN)中的传统脉冲神经元采用电荷-放电-重置的神经动力学机制,该机制仅能串行仿真且难以学习长时依赖关系。我们发现,去除重置机制后,神经动力学可重构为非迭代形式并实现并行化。通过将无重置的神经动力学重写为通用公式,我们提出了并行脉冲神经元(PSN),其生成与先前状态无关的隐藏状态,从而实现可并行的神经动力学与极快的仿真速度。PSN中的输入权重采用全连接结构,最大化利用时序信息。为避免逐步推理时使用未来输入,可对PSN的权重施加掩码,形成掩码PSN。基于掩码PSN进行跨时间步权重共享,进一步提出滑动PSN以处理可变长度序列。我们在仿真速度与时序/静态数据分类任务上评估PSN系列模型,结果表明该系列在效率与精度方面具有压倒性优势。据我们所知,这是首项关于脉冲神经元并行化的研究,可成为脉冲深度学习研究的基石。我们的代码开源在\url{https://github.com/fangwei123456/Parallel-Spiking-Neuron}。