Supervised learning of spatial features with STDP and homeostasis using Spiking Neural Networks on SpiNNaker

arXiv:2312.02659 · cs.NE, cs.AI · Submitted 2023-12-05 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.

Tom: I'm Tom.

Jane: And I'm Jane, here with Lu, Meng and our in-house large language model, Lalam.

Tom: Today's paper: "Supervised learning of spatial features with STDP and homeostasis using Spiking Neural Networks on SpiNNaker".

Jane: The gist: This paper shows a new method to perform supervised learning on SNNs, using Spike Timing Dependent Plasticity (STDP) and homeostasis,

Tom: First, who's behind it and why it matters.

Paper summary: Tom: So, wrapping up this look at "Supervised learning of spatial features with STDP and homeostasis using Spiking Neural Networks on SpiNNaker", the authors are showing a way to get supervised learning running on SNNs using STDP and homeostasis for spatial pattern detection.

Jane: They found that this works on the SpiNNaker digital architecture, and they demonstrated that while a single trained pattern gives perfect accuracy, multiple patterns' accuracy scales with their similarity.

Lu: The implications are that we have a fundamental building block here for training SNNs to recognize spatial features without needing traditional backpropagation in the same way.

Meng: It shifts the focus from just raw temporal evolution to learning static spatial structures directly through spike timing dynamics and homeostasis.

Tom: The authors emphasize that this method could be applied to packet classification in computer networks, where each packet is encoded as a spatial pattern feature.

Jane: And they note that by using multiple classifiers, you can use techniques like polychronization to identify the sequence of traffic streams.

Lu: So, the core message is establishing a training framework for SNNs that handles spatial patterns effectively through these specific biological-inspired learning rules.

Meng: From an engineering standpoint, it tells us how to encode packet features into spikes for real-time identification in a production environment on platforms like SpiNNaker.

Tom: The paper shows the mechanics of how STDP and homeostasis collaborate to train this SNN architecture effectively. That’s a solid starting point for more complex temporal pattern recognition systems.

Conclusion: Tom: So, this paper is all about training Spiking Neural Networks to spot spatial patterns using Spike Timing Dependent Plasticity and homeostasis on SpiNNaker hardware.

Jane: It’s tackling a problem where traditional learning methods struggle with these SNNs, so they introduced this new method for supervised learning.

Lu: The authors present a way to teach the network to recognize one or more spatial patterns by combining STDP and homeostasis.

Meng: So, what’s the actual result? Can it actually do this on the hardware they tested?

Tom: They did test it on SpiNNaker, and they showed that for a single pattern, the network acts like a perfect detector with one hundred percent accuracy.

Jane: That sounds great, but how does it hold up when you have multiple patterns? The paper suggests something different there.

Lu: When you train on more than one pattern, the identification accuracy depends directly on how similar those patterns are to each other.

Tom: So, if the patterns are very different from each other, the network struggles to tell them apart accurately.

Meng: That means we can't just throw a bunch of random stuff at it; it has to be structured correctly beforehand.

Jane: They mention that this training method could actually help with things like packet classification in computer networks.

Lu: Exactly, you encode bits from a packet into spikes, and this method helps extract those features for identification.

Tom: The authors suggest using multiple of these trained SNNs together to handle different traffic streams sequentially.

Jane: And they point out that by dropping a pattern that’s too far away—too high Hamming Distance—you actually improve the overall accuracy because you cut down on false positives.

Lu: That inverse relationship between the homeostatic factor and accuracy is something interesting, where you have to be careful not to let it get too aggressive.

Meng: So what does this mean for production? Can we deploy this kind of training pipeline reliably at scale?

Tom: It gives us a framework for encoding spatial features into spikes, which is a key step before deploying these types of classifiers in real-time systems.

Jane: And it sets the stage for using these SNNs not just for simple recognition, but maybe even handling sequences with tools like polychronization.

Lu: The fundamental building block here is converting specific input features into spikes, which opens up more complex systems that combine spatial and temporal patterns later on.

Department of Computing and Mathematics at Manchester Metropolitan University · APT group, School of Computer Science, The University of Manchester

cs.NE, cs.AI

Submitted: 2023-12-05

Updated: 2024-06-24

Comments: 14 pages, 6 figures (figure 6 has 9 sub-figures) for a total of 14 images, 10 tables, submitted to the Journal of Neural Networks

DOI: 10.1016/j.neucom.2024.128650

Code: https://github.com/sergiodavies/SpiNNakerSpati

License: http://creativecommons.org/licenses/by/4.0/

Importance score: 83/100

The gist: The gist: This paper shows a new method to perform supervised learning on SNNs, using Spike Timing Dependent Plasticity (STDP) and homeostasis, aiming at training the network to identify spatial

Key concepts

Spike Timing Dependent Plasticity (STDP)
STDP is a learning rule where synaptic weights change based on the precise timing of spikes between neurons. If a spike follows another, the connection strengthens (LTP); if it precedes it, the connection weakens (LTD). This mechanism allows the network to learn correlations between input and output spikes.
Homeostasis
Homeostasis is a re-scaling factor applied after training to adjust synaptic weights. It ensures that each trained pattern results in exactly one output spike, regardless of the initial weight values. This factor helps control the network's overall firing rate and improves pattern detection accuracy.
Spatial Patterns
In this context, spatial patterns are defined as spike patterns that lack a time component; they represent simultaneous spike events. These are used for tasks like classifying static images or analyzing computer network packets where features within the data need to be recognized without relying on temporal sequences.
SpiNNaker Architecture
SpiNNaker is the digital architecture used to test and implement the SNN model. The paper notes that conventional learning methods are difficult on this architecture due to local memory restrictions, necessitating specialized techniques like 'save neurons' to trigger STDP calculations.

Terminology

Summary

The gist: This paper shows a new method to perform supervised learning on SNNs, using Spike Timing Dependent Plasticity (STDP) and homeostasis, aiming at training the network to identify spatial patterns.

Introduction and Background

Artificial Neural Networks (ANN) have gained significant popularity thanks to their ability to learn using the well-known backpropagation algorithm Conversely, Spiking Neural Networks (SNNs), despite having broader capabilities than ANNs, have always posed challenges in the training phase. The paper introduces a method to train an SNN to recognize one or multiple patterns by presenting the desired pattern only once and then training with multiple patterns. This method may be applied to pattern recognition in static images or traffic analysis in computer networks.

Learning Mechanisms

The training relies on two learning algorithms acting on different time-scales collaborating to achieve a task. These are Spike Timing Dependent Plasticity (STDP) and homeostasis.

** STDP is a form of learning whereby the weight of a synapse between two neurons is either potentiated (LTP) or depressed (LTD) dependent upon whether a post-synaptic spike follows or precedes a pre-synaptic spike. On SpiNNaker, the plasticity mechanism for STDP is also only activated when the post-synaptic neuron receives the second (pre-synaptic) spike: at least two pre-synaptic spikes are, therefore, required for the calculations to take place. This is because conventional methods are difficult on SpiNNaker due to local memory restrictions. A “save neuron” emits a final spike whose only effect is to trigger the execution of the STDP learning rule on plastic synapses. The STDP algorithm employed in this case is the nearest neighbour spike pair rule, which is only triggered when at least one pre-synaptic spike and one post-synaptic spike are already in memory at the point when an new incoming pre-synaptic spike is received. The STDP parameters used for the weight update rule are specified as tau+ = 5, A+ = 1 and A− = −1. The synaptic weights obtained during this training phase are used in the testing network in fig.5. The final value of the synaptic weights will be obtained by summing the weights resulting from training, synapseby-synapse. During this step, after summing all the weights from the various training iterations, homeostasis is applied. This is modeled as a multiplier factor that re-scales the synaptic weights to obtain the minimum scaling value for each training pattern that allows the output neuron to fire exactly once for each Davies, S. et al.: Preprint submitted to Elsevier Page 5 of 15> The search for the re-scaling factor is performed initially through a binary search in the interval between the values of 0.0001 and 1000. Once the homeostatic factor is determined to allow the network to spike once for every pattern presented, the process moves to the testing and validation phase. The homeostatic process re-scales all weights to obtain a specific required result. The resulting homeostasis factor is computed as 4.18817. This value is the homeostatic value from the single pattern experiment. In these conditions, it is possible to evaluate the network performance metrics in the detection of the patterns by testing all possible combinations. The precision and sensitivity parameters decrease rapidly as the number of false positives increases when the Hamming Distance between code words increases. The results show that a network trained with a single pattern acts as a perfect classifier, which only identifies spatial patterns that are identical to the trained one. When two or more patterns are trained on a single network, the accuracy of the identification task depends only on the Hamming Distance between the code words imprinted in the network. The ability of the network to select a specific pattern comes from the structure of the network: while excitatory synapses trigger the output neuron, inhibitory connections perform the selection of the pattern during the testing and validation phase. This article has presented a method to train a spiking neural network to detect spatial patterns which do not have a temporal component. These kind of patterns may be found, for example, in the analysis of computer network traffic packets. Performing such analysis would require to extract bits of information from the packet (from the header and/or from the payload) and encoding such information following the methodology presented above. Moreover, using multiple of these classifiers and considering that traffic streams have a typical sequence of packets in a stream, by using a technique such as polychronization (Izhikevich, 2006) it would be possible to identify the sequence and determine to which stream it belongs. The results of the experiments show that an accuracy is linked to the Hamming Distance between code words. However, when one code word is dropped from identification because its Hamming Distance is too high, the negative prediction and specificity parameters receive lower values, but the overall accuracy improves because the number of false positive identifications drastically reduces. The classification metrics presented in table 10 are also displayed graphically in fig.6. In particular, it is possible to notice also how there is an inverse relation between the homeostatic factor and the overall accuracy of the identification task. As the distance between code words increases, the number of synapses with overall contribution “0” (“don’t care” synapses) or small (“care little” synapses) increases, and these require a higher homeostatic factor to allow the remaining synapses to trigger an output spike. However, this also causes the number of false positive identifications to increase, which in turn reduces the overall accuracy of the identification task of the network. The classification metrics presented in table 10 are also displayed graphically in fig.6. In these graphs it is possible to notice how the closer the experiments are to the bottom left corner, the better the classification metrics that represent the outcome. Indeed, the bottom left corner represents experiments using three code words whose Hamming Distance among them is minimum. The results of the experiments show that a network trained with a single pattern acts as a perfect classifier, which only identifies spatial patterns that are identical to the trained one. The ability of the network to select a specific pattern comes from the structure of the network: while excitatory synapses trigger the output neuron, inhibitory connections perform the selection of the pattern during the testing and validation phase. This paper has presented a method to train a spiking neural network to detect spatial patterns which do not have a temporal component. These kind of patterns may be found, for example, in the analysis of computer network traffic packets. Performing such analysis would require to extract bits of information from the packet (from the header and/or from the payload) and encoding such information following the methodology presented above. Following the training, this methodology allows the extraction of features ideal for packet classification. Moreover, using multiple of these classifiers and considering that traffic streams have a typical sequence of packets in a stream, by using a technique such as polychronization (Izhikevich, 2006) it would be possible to identify the sequence and determine to which stream it belongs.

Improvements for AI systems

  1. A novel training paradigm for Spiking Neural Networks (SNNs) using STDP and homeostasis allows SNNs to learn spatial patterns, which are spike patterns without a time component, where all spike events occur simultaneously. This enables the network to perform pattern recognition in applications like static image analysis or traffic analysis in computer networks.

  2. The system can be trained to recognize multiple patterns, with performance metrics showing that the accuracy of identification is linked to the similarities between these patterns, and the homeostatic factor may enable the network to detect patterns with some degree of similarity, rather than only perfectly matching patterns.

  3. The improved SNN system can achieve high classification accuracy by leveraging the structure where excitatory synapses trigger the output neuron, inhibitory connections perform the selection of the pattern during the testing and validation phase.

  4. For complex pattern recognition involving three or more patterns, the network can be trained such that the final weight unit contribution to the output neuron is described in table 8, allowing it to classify combinations of code words based on their Hamming Distance.

  5. The system can adapt its detection capability dynamically; as demonstrated in Table 10, the homeostatic factor increases with the number of “don’t care” bits, and this mechanism ensures that the network correctly excludes patterns when their Hamming Distance is too high, leading to a reduction in False Positives.

Abstract

Artificial Neural Networks (ANN) have gained significant popularity thanks to their ability to learn using the well-known backpropagation algorithm. Conversely, Spiking Neural Networks (SNNs), despite having broader capabilities than ANNs, have always posed challenges in the training phase. This paper shows a new method to perform supervised learning on SNNs, using Spike Timing Dependent Plasticity (STDP) and homeostasis, aiming at training the network to identify spatial patterns. Spatial patterns refer to spike patterns without a time component, where all spike events occur simultaneously. The method is tested using the SpiNNaker digital architecture. A SNN is trained to recognise one or multiple patterns and performance metrics are extracted to measure the performance of the network. Some considerations are drawn from the results showing that, in the case of a single trained pattern, the network behaves as the ideal detector, with 100% accuracy in detecting the trained pattern. However, as the number of trained patterns on a single network increases, the accuracy of identification is linked to the similarities between these patterns. This method of training an SNN to detect spatial patterns may be applied to pattern recognition in static images or traffic analysis in computer networks, where each network packet represents a spatial pattern. It will be stipulated that the homeostatic factor may enable the network to detect patterns with some degree of similarity, rather than only perfectly matching patterns.The principles outlined in this article serve as the fundamental building blocks for more complex systems that utilise both spatial and temporal patterns by converting specific features of input signals into spikes.One example of such a system is a computer network packet classifier, tasked with real-time identification of packet streams based on features within the packet content

Related papers