SpikeCLR: Self-Supervised Contrastive Learning for Visual Representations with Spiking Neural Networks
Abstract
Spiking Neural Networks (SNNs) offer a promising alternative to traditional artificial neural networks by leveraging sparse, event-driven computation that closely mimics biological neurons. When deployed on neuromorphic hardware, SNNs enable substantial energy savings due to their temporal and asynchronous processing. However, training SNNs remains fundamentally difficult because the non-differentiable nature of spike generation breaks the bidirectional gradient flow required in modern self-supervised learning (SSL) frameworks. In this work, we introduce the first fully SSL framework for SNNs that scales to large-scale visual tasks without requiring labeled fine-tuning. Our method leverages intrinsic spike-time dynamics by aligning representations across time steps and augmented views. To address gradient mismatch during surrogate training, we propose the MixedLIF neuron model, which combines a spiking path with an antiderivative-based surrogate path during training to stabilize optimization, while retaining a fully spiking and energy-efficient architecture at inference. We also introduce two temporal objectives, Cross Temporal Loss and Boundary Temporal Loss, that align multi-time-step outputs to improve learning efficiency. Our approach achieves competitive performance across both ResNet- and Vision Transformer-based SNNs on both static and neuromorphic datasets. Our approach further generalizes through transfer learning from ImageNet-1K to downstream tasks. Notably, our self-supervised SNNs match or exceed the performance of some non-spiking SSL models, demonstrating both representational strength and energy efficiency.
Lay Summary
Artificial intelligence systems inspired by the brain, e.g., Spiking Neural Networks (SNNs) process information using brief electrical pulses, much like real neurons do. This makes them far more energy-efficient than conventional AI, especially on specialized low-power chips. However, teaching SNNs to learn from unlabeled data has remained an unsolved challenge, because the on-off nature of spikes breaks the mathematical tools that modern learning algorithms rely on. We present SpikeCLR, the first framework that enables SNNs to learn rich visual representations directly from unlabeled images, without any human annotation. Our key innovation is a novel neuron design that runs two parallel pathways during training (one spiking, one smooth) to stabilize learning, while keeping only the efficient spiking pathway at deployment. We also introduce two new training objectives that exploit the brain-like timing of spikes. The resulting models match or outperform some conventional self-supervised models, while consuming over 136 times less energy during inference.