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)中的传统脉冲神经元采用“充电-放电-重置”的神经元动力学机制,该机制仅能串行模拟且难以学习长时依赖关系。我们发现,当去除重置操作后,神经元动力学可被重新表述为非迭代形式并实现并行化。通过将无重置的神经元动力学重写为通用公式,我们提出了并行脉冲神经元(Parallel Spiking Neuron, PSN),其生成的隐藏状态独立于先前状态,从而实现可并行的神经元动力学与极高的模拟速度。PSN中的输入权重为全连接结构,最大化了对时序信息的利用。为避免在逐步推理中使用未来输入,可对PSN的权重施加掩码,形成掩码PSN。基于掩码PSN在时间步间共享权重,进一步提出滑动PSN以处理变长序列。我们在模拟速度与时序/静态数据分类任务上对PSN家族进行了评估,结果表明PSN家族在效率和准确性上具有压倒性优势。据我们所知,这是首个关于并行化脉冲神经元的研究,可为脉冲深度学习研究奠定基础。我们的代码已在\url{https://github.com/fangwei123456/Parallel-Spiking-Neuron}开源。