Back to Projects

Deconstructing Spiking Neural Networks (SNNs)

Explore biological neuron models, surrogate-gradient training, pure PyTorch implementations, and energy-efficient benchmarks against standard ANNs.

Part 1

Biology & the LIF Model

From biological action potentials to the Leaky Integrate-and-Fire (LIF) model—and why the Heaviside spike function breaks standard backpropagation.

Part 2

PyTorch Implementation

Building a complete LIF layer with surrogate gradients in pure PyTorch—no SNN frameworks required.
View Code on GitHub

Part 3

Same Accuracy. Half the Energy.

Benchmarking the SNN against a parameter-identical ANN on MNIST, measuring firing-rate sparsity and computing the 51.7% energy reduction.