Biologically inspired spiking neural networks (SNNs) have garnered considerable attention due to their low-energy consumption and spatio-temporal information processing capabilities. Most existing SNNs training methods first integrate output information across time steps, then adopt the cross-entropy (CE) loss to supervise the prediction of the average representations. However, in this work, we find the method above is not ideal for the SNNs training as it omits the temporal dynamics of SNNs and degrades the performance quickly with the decrease of inference time steps. One tempting method to model temporal correlations is to apply the same label supervision at each time step and treat them identically. Although it can acquire relatively consistent performance across various time steps, it still faces challenges in obtaining SNNs with high performance. Inspired by these observations, we propose Temporal-domain supervised Contrastive Learning (TCL) framework, a novel method to obtain SNNs with low latency and high performance by incorporating contrastive supervision with temporal domain information. Contrastive learning (CL) prompts the network to discern both consistency and variability in the representation space, enabling it to better learn discriminative and generalizable features. We extend this concept to the temporal domain of SNNs, allowing us to flexibly and fully leverage the correlation between representations at different time steps. Furthermore, we propose a Siamese Temporal-domain supervised Contrastive Learning (STCL) framework to enhance the SNNs via augmentation, temporal and class constraints simultaneously. Extensive experimental results demonstrate that SNNs trained by our TCL and STCL can achieve both high performance and low latency, achieving state-of-the-art performance on a variety of datasets (e.g., CIFAR-10, CIFAR-100, and DVS-CIFAR10).
翻译:生物启发的脉冲神经网络(SNN)因其低能耗和时空信息处理能力而受到广泛关注。现有SNN训练方法大多先整合各时间步的输出信息,再采用交叉熵(CE)损失监督平均表示的预测。然而,本研究发现上述方法对SNN训练并不理想,因为它忽略了SNN的时间动态性,且随着推理时间步减少,性能会迅速下降。一种建模时间相关性的诱人方法是在每个时间步施加相同的标签监督,并同等对待这些监督信号。尽管该方法能在不同时间步获得相对一致的性能,但仍难以获得高性能的SNN。受此启发,我们提出时域监督对比学习(TCL)框架,这是一种通过将对比监督与时域信息相结合来获得低延迟、高性能SNN的新方法。对比学习(CL)促使网络在表示空间中辨别一致性与差异性,从而更好地学习判别性和泛化性特征。我们将这一概念扩展到SNN的时域,能够灵活且充分利用不同时间步表示之间的相关性。此外,我们提出孪生时域监督对比学习(STCL)框架,通过同时引入数据增强、时间约束和类别约束来增强SNN。大量实验结果表明,经TCL和STCL训练的SNN能同时实现高性能和低延迟,在多种数据集(如CIFAR-10、CIFAR-100和DVS-CIFAR10)上均达到了最优性能。