spiking neural network neuromorphic
**Spiking Neural Networks: Event-Driven Computation — neuromorphic hardware and efficient inference via spike-based dynamics**
Spiking Neural Networks (SNNs) model neurons as leaky integrate-and-fire (LIF) units that emit discrete spikes, mimicking biological neurons. SNNs achieve energy efficiency and temporal computation on neuromorphic hardware (Intel Loihi, IBM TrueNorth).
**Leaky Integrate-and-Fire Neuron Model**
LIF neuron: membrane potential V(t) decays with time constant τ_m: dV/dt = (-V + I_in) / τ_m. Spike emitted when V > V_th (threshold); reset V ← V_reset. Refractory period: neuron unresponsive briefly post-spike (biological constraint, computational shortcut for stability). Discrete timesteps: V[t+1] = αV[t] + βI[t] (α = exp(-Δt/τ_m), β related to input gain). Efficiency: spike events (sparse, binary) require minimal computation versus dense activations in ANNs.
**Spike Timing Dependent Plasticity (STDP)**
STDP: synaptic weight adjusts based on spike timing: if pre-spike precedes post-spike → strengthen (Δw > 0), if post precedes pre → weaken. Implement local learning rule (no backprop needed), matching biological synaptic plasticity. Unsupervised learning: spike correlations drive weight updates without labels. Supervised learning: combine STDP with reward signals (reinforcement learning frameworks).
**Surrogate Gradient Training and Backpropagation**
Spikes are discontinuous (0 or 1), breaking automatic differentiation. Surrogate gradient trick: replace discontinuous spike function with smooth approximation during backpropagation (e.g., sigmoid surrogate for Heaviside step). Forward pass: exact spike computation; backward pass: smooth approximation. snnTorch (Jason Eshraghian, UC Davis): PyTorch extension enabling surrogate gradient training, enabling SNNs trained via backpropagation-through-time (BPTT).
**Rate vs. Temporal Coding**
Rate coding: information in spike frequency (high firing rate = high activation). SNNs reduce to ANNs across long observation windows (integrate spike counts). Temporal coding: precise spike timing carries information (microsecond precision). Temporal coding exploits spiking dynamics, but training is challenging. Hybrid: typically rate-dominated (easier to train/optimize).
**Hardware and Applications**
Intel Loihi 2: 128 neuromorphic cores, each with 4,096 spiking neurons, all-to-all connectivity (144 million synapses). Direct SNN execution: spikes routed on-chip, no GPU transfer. Energy: ~100x efficient vs. GPUs for sparse workloads (few spikes). Applications: event-based vision (DVS—Dynamic Vision Sensor), temporal pattern recognition, robot control. Latency-accuracy tradeoff: fewer timesteps enable low latency but reduced accuracy; inference requires inference latency budgets matching application requirements.