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