Rethinking Skip Connections in Spiking Neural Networks with Time-To-First-Spike Coding

Youngeun Kim, Adar Kahana, Ruokai Yin, Yuhang Li, Panos Stinis, George Em Karniadakis, Priyadarshini Panda · DOI

Abstract

Time-To-First-Spike (TTFS) coding in Spiking Neural Networks (SNNs) offers significant advantages in terms of energy efficiency, closely mimicking the behavior of biological neurons. In this work, we delve into the role of skip connections, a widely used concept in Artificial Neural Networks (ANNs), within the domain of SNNs with TTFS coding. Our focus is on two distinct types of skip connection architectures: (1) addition-based skip connections, and (2) concatenation-based skip connections. We find that addition-based skip connections introduce an additional delay in terms of spike timing. On the other hand, concatenation-based skip connections circumvent this delay but produce time gaps between after-convolution and skip connection paths, thereby restricting the effective mixing of information from these two paths. To mitigate these issues, we propose a novel approach involving a learnable delay for skip connections in the concatenation-based skip connection architecture. This approach successfully bridges the time gap between the convolutional and skip branches, facilitating improved information mixing. We conduct experiments on public datasets including MNIST and Fashion-MNIST, illustrating the advantage of the skip connection in TTFS coding architectures. Additionally, we demonstrate the applicability of TTFS coding on beyond image recognition tasks and extend it to scientific machine-learning tasks, broadening the potential uses of SNNs.

Introduction

Spiking Neural Networks (SNNs) represent a paradigm shift in energy-efficient computing, drawing inspiration from the biological brain's use of discrete spikes for communication. Among various coding schemes, Time-To-First-Spike (TTFS) coding is particularly notable for its ultra-low power consumption, as each neuron fires at most once per inference. However, integrating modern architectural innovations like skip connections into TTFS SNNs presents unique challenges due to the temporal nature of the information.

The Timing Mismatch in TTFS Skip Connections

In TTFS coding, information is encoded in the exact timing of a spike: an earlier spike signifies higher importance or intensity. Skip connections, which are vital for training deep networks by allowing gradients to bypass layers, disrupt this delicate timing in two primary ways:

  1. Addition-based shortcuts (ResNet style): Summing spike times leads to a cumulative delay that increases significantly with network depth.
  2. Concatenation-based shortcuts (ShuffleNet style): While faster, these create a "timing gap" where the shortcut path is much quicker than the convolutional path.
Membrane potential V(t) of a TTFS neuron showing the integration of inputs until a spike is triggered at threshold 1.0.

As shown in Figure 1, a neuron's membrane potential $V(t)$ integrates incoming signals until it reaches a threshold. Because TTFS neurons are "one and done"—firing once and then becoming inactive—the faster shortcut path often triggers a spike before the slower, more feature-rich convolutional path can contribute its information. This prevents effective information mixing.

Proposed Solution: Learnable Delays

To resolve the timing gap, we propose a Concatenation-based Skip Connection with a Learnable Delay. By inserting a delay block into the shortcut path, we can synchronize the arrival of information from both branches.

Crucially, these delays are not static; they are governed by learnable parameters ($\theta$) optimized via backpropagation. To ensure effective information mixing, we introduce an Overlap Loss ($\mathcal{L}_{overlap}$), which penalizes the difference between the mean spike times of the shortcut and convolutional branches, encouraging them to converge.

Experimental Results and Discussion

We evaluated our approach on MNIST, Fashion-MNIST, and a wave equation source localization task for Scientific Machine Learning (SciML).

Spike timing distributions across different skip connection architectures. The shift in frequency peaks illustrates the latency differences between addition-based and concatenation-based methods.

As illustrated in Figure 4, the choice of skip connection significantly impacts the distribution of spike timings. Our proposed concatenation-based method with learnable delays achieved a latency of 1.88 on MNIST, significantly lower than the 4.57 observed with addition-based connections.

Key performance metrics include:

  • Accuracy: Reached 91.4% on Fashion-MNIST, surpassing previous state-of-the-art TTFS models (approx. 90.1%).
  • Energy Efficiency: The SNN architecture consumed only 13% to 14% of the energy required by an equivalent traditional ANN.
  • SciML Versatility: Successfully localized wave sources, demonstrating that the energy-saving properties of TTFS SNNs are applicable to complex physics simulations beyond simple image classification.

Conclusion

By rethinking skip connections through the lens of temporal synchronization, we have enabled deeper and more accurate TTFS SNNs. The introduction of learnable delays bridges the gap between the efficiency of spiking neurons and the representational power of modern deep learning architectures, paving the way for high-performance, brain-inspired hardware.

Summary updated

Abstract

Time-To-First-Spike (TTFS) coding in Spiking Neural Networks (SNNs) offers significant advantages in terms of energy efficiency, closely mimicking the behavior of biological neurons. In this work, we delve into the role of skip connections, a widely used concept in Artificial Neural Networks (ANNs), within the domain of SNNs with TTFS coding. Our focus is on two distinct types of skip connection architectures: (1) addition-based skip connections, and (2) concatenation-based skip connections. We find that addition-based skip connections introduce an additional delay in terms of spike timing. On the other hand, concatenation-based skip connections circumvent this delay but produce time gaps between after-convolution and skip connection paths, thereby restricting the effective mixing of information from these two paths. To mitigate these issues, we propose a novel approach involving a learnable delay for skip connections in the concatenation-based skip connection architecture. This approach successfully bridges the time gap between the convolutional and skip branches, facilitating improved information mixing. We conduct experiments on public datasets including MNIST and Fashion-MNIST, illustrating the advantage of the skip connection in TTFS coding architectures. Additionally, we demonstrate the applicability of TTFS coding on beyond image recognition tasks and extend it to scientific machine-learning tasks, broadening the potential uses of SNNs.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
FashionMNIST · Fashion-MNISTConcatenation-based skip connection (without delay)Accuracy90.6%Image Classification
Source quote
L253: Concatenation-based skip connection │ 90.6 │ 2.28
FashionMNIST · Fashion-MNISTConcatenation-based skip connection + Delay BlockLatency2.29Image Classification
Source quote
L254: Concatenation-based skip connection + Delay Block │ 91.4 │ 2.29
MNISTConcat-based Skip + Delay (Temporal coding)Accuracy98.5%Image Classification
Source quote
L279: Ours (Concat-based Skip + Delay) │ Temporal │ 98.5
FashionMNIST · Fashion-MNISTANNRelative Energy Cost1Image Classification
Source quote
L345: ANN │ 1 │ 92.27
FashionMNIST · Fashion-MNISTConcat-based skip + Delay (SNN)Relative Energy Cost0.13Image Classification · compressed
Source quote
L346: Concat-based skip + Delay │ 0.13 │ 91.41
Reported baseline / comparator measurements (1)
BenchmarkMethodMetricScoreProtocol / Evidence
FashionMNIST · Fashion-MNISTConcatenation-based skip connection + Delay Block baselineAccuracy91.4%Image Classification
Source quote
L254: Concatenation-based skip connection + Delay Block │ 91.4 │ 2.29
BibTeX
@inproceedings{kim2024rethinking,
  author = {Youngeun Kim and Adar Kahana and Ruokai Yin and Yuhang Li and Panos Stinis and George Em Karniadakis and Priyadarshini Panda},
  title = {{Rethinking Skip Connections in Spiking Neural Networks with Time-To-First-Spike Coding}},
  booktitle = {Frontiers in Neuroscience},
  year = {2024},
  doi = {10.3389/fnins.2024.1346805},
}
Figure