Spiking neural networks (SNNs) offer a biologically inspired computing paradigm with significant potential for energy-efficient neural processing. Among neural coding schemes of SNNs, Time-To-First-Spike (TTFS) coding, which encodes information through the precise timing of a neuron's first spike, provides exceptional energy efficiency and biological plausibility. Despite its theoretical advantages, existing TTFS models lack efficient training methods, suffering from high inference latency and limited performance. In this work, we present a comprehensive framework, which enables the efficient training of deep TTFS-coded SNNs by employing backpropagation throuh time (BPTT) algorithm. We name the generalized TTFS coding method in our framework as latency coding. The framework includes: (1) a latency encoding (LE) module with feature extraction and straight-through estimators to address severe information loss in direct intensity-to-latency mapping and ensure smooth gradient flow; (2) relaxation of the strict single-spike constraint of traditional TTFS, allowing neurons of intermediate layers to fire multiple times to mitigating gradient vanishing in deep networks; (3) a temporal adaptive decision (TAD) loss function that dynamically weights supervision signals based on sample-dependent confidence, resolving the incompatibility between latency coding and standard cross-entropy loss. Experimental results demonstrate that our method achieves state-of-the-art accuracy in comparison to existing TTFS-coded SNNs with ultra-low inference latency and superior energy efficiency. The framework also demonstrates improved robustness against input corruptions. Our study investigates the characteristics and potential of latency coding in scenarios demanding rapid response, providing valuable insights for further exploiting the temporal learning capabilities of SNNs.
翻译:脉冲神经网络(SNNs)提供了一种受生物启发的计算范式,在节能神经处理方面具有巨大潜力。在SNNs的神经编码方案中,首脉冲时间(TTFS)编码通过神经元首次脉冲的精确时间编码信息,展现出卓越的能效和生物合理性。尽管具有理论优势,现有TTFS模型缺乏高效的训练方法,面临高推理延迟和性能受限的问题。本文提出一个综合框架,通过采用时间反向传播(BPTT)算法实现深度TTFS编码SNNs的高效训练。我们将该框架中广义的TTFS编码方法称为延时编码。该框架包括:(1)具有特征提取和直通估计器的延时编码(LE)模块,以解决直接强度到延时映射中的严重信息损失,并确保梯度流动顺畅;(2)放宽传统TTFS的严格单脉冲约束,允许中间层神经元多次发放以缓解深层网络中的梯度消失问题;(3)一种时间自适应决策(TAD)损失函数,根据样本依赖的置信度动态加权监督信号,解决延时编码与标准交叉熵损失之间的不兼容性。实验结果表明,与现有TTFS编码SNNs相比,我们的方法在超低推理延迟和优越能效下达到最先进精度。该框架还展现出更强的输入损坏鲁棒性。本研究探究了延时编码在快速响应场景中的特性和潜力,为进一步挖掘SNNs的时间学习能力提供了有价值的见解。