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:
- Addition-based shortcuts (ResNet style): Summing spike times leads to a cumulative delay that increases significantly with network depth.
- Concatenation-based shortcuts (ShuffleNet style): While faster, these create a "timing gap" where the shortcut path is much quicker than the convolutional path.
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).
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