First-spike based visual categorization using reward-modulated STDP

Milad Mozafari, Saeed Reza Kheradpisheh, Timothée Masquelier, Abbas Nowzari-Dalini, Mohammad GanjtabeshIEEE TNNLS 2017 · DOI

Abstract

Reinforcement learning (RL) has recently regained popularity with major achievements in complex gaming and decision-making. This paper demonstrates that RL can be used efficiently to train a spiking neural network (SNN) to perform object recognition in natural images without an external classifier. Using a feedforward convolutional SNN and a temporal coding scheme, the network ensures that the most strongly activated neurons fire first. In the highest layers, each neuron is assigned to an object category; the stimulus category is determined by the first neuron to fire. Through reward-modulated STDP (R-STDP), the network reinforces correct classifications and applies anti-STDP to incorrect ones, encouraging the learning of discriminative features. Evaluated on Caltech, ETH-80, and NORB datasets, R-STDP outperformed classic unsupervised STDP and proved suitable for online learning and hardware-efficient implementation.

Introduction

Spiking Neural Networks (SNNs) are highly regarded for their biological plausibility and energy efficiency on neuromorphic hardware. However, they typically face two major hurdles in computer vision: the "Blind Feature Problem," where standard unsupervised learning (STDP) extracts frequent but not necessarily useful features, and the "Readout Problem," where SNNs often require external non-spiking classifiers to make final decisions. This research bridges the gap by integrating a reinforcement signal directly into the spiking mechanism, allowing the network to perform end-to-end classification using at most one spike per neuron.

Architecture and Temporal Coding

The system utilizes a four-layer feedforward convolutional SNN architecture designed to mimic the rapid categorization capabilities of the human visual system.

The four-layer convolutional SNN architecture, showing the progression from edge detection (S1/C1) to category-specific decision layers (S2/C2).
  • S1 & C1 Layers: These layers perform initial edge detection using Gabor filters followed by local pooling. A temporal coding scheme (intensity-to-latency) is employed, where higher contrast edges result in earlier spikes.
  • S2 Layer (Trainable): Composed of Integrate-and-Fire (IF) neurons, this is the primary site of synaptic weight modification.
  • C2 Layer (Decision): Neurons here represent specific object categories. The network's classification is determined by the first neuron in this layer to fire.

Learning via Reward-Modulated STDP (R-STDP)

The core innovation is the application of R-STDP to the S2 layer. Unlike traditional STDP, which is purely unsupervised, R-STDP uses a global reinforcement signal:

  1. Reward: If the first neuron to fire in C2 matches the correct image category, the S2 neurons that contributed to that spike are reinforced via STDP.
  2. Punishment: If the network makes an incorrect guess, it receives a punishment signal. This triggers anti-STDP, weakening the active synapses and forcing the neuron to "unlearn" non-discriminative features in favor of more diagnostic ones.
Comparison of features learned by standard STDP versus R-STDP. While STDP learns repetitive patterns (b, left), R-STDP focuses on discriminative features (b, right and c) necessary for accurate classification.

As shown in the figure above, R-STDP allows the network to ignore features that appear in multiple classes and instead focus on those that uniquely identify a category.

Key Results and Insights

The R-STDP approach consistently outperformed standard unsupervised STDP across several benchmarks:

  • Caltech Face/Motorbike: Achieved 98.9% accuracy.
  • ETH-80: Reached 89.5%, significantly higher than the 84.5% achieved by standard STDP paired with an SVM.
  • Small NORB: Achieved 88.4%, a substantial improvement over the 66% seen with standard unsupervised methods.

Beyond accuracy, the model demonstrated remarkable online adaptability. When labels were permuted (e.g., swapping "Face" and "Motorbike"), the R-STDP rule allowed the network to rapidly unlearn old associations and acquire new ones. Furthermore, because each neuron fires at most once per image, the system is extremely hardware-friendly, avoiding complex multiply-accumulate operations in favor of simple timing and addition.

Conclusion

This work demonstrates that reward-modulated STDP is a powerful alternative to backpropagation for shallow spiking architectures. By utilizing first-spike coding and reinforcement signals, the network achieves high discriminative power while maintaining the energy efficiency inherent to SNNs. Future work will focus on extending R-STDP to deeper hierarchical layers and improving the model's ability to group highly dissimilar views of the same object into single semantic categories.

Summary updated

BibTeX
@article{mozafari2017first,
  author = {Milad Mozafari and Saeed Reza Kheradpisheh and Timothée Masquelier and Abbas Nowzari-Dalini and Mohammad Ganjtabesh},
  title = {{First-spike based visual categorization using reward-modulated STDP}},
  journal = {IEEE Trans. Neural Networks Learn. Syst.},
  year = {2017},
  doi = {10.1109/tnnls.2018.2826721},
}
Figure