Getting started with Spike Encoding

Aabha Bothera
4 min readNov 30, 2022

--

When hearing about spikes, what’s the first thing that comes to your mind? A sharp increment, right!!!… You are somewhat in the correct direction. The literal meaning of a spike as stated by the Cambridge dictionary is “a very high amount, price, or level”. So, the question arises why we even need to know about spikes. To know that you should first have a brief knowledge of Spiking Neural Networks (SNN). It sounds truly muddled at the same time, don’t stress this blog will assist you with getting acclimated with what is SNN, what is the jobs of spike encoding, what are its various kinds, etc. So, let’s get started!!!…

Fig1: Spike Encoding

What is Spiking Neural Network?

Spiking Neural Networks are networks that resemble Biological Neural Networks. They closely mimic natural neural networks. In addition to synaptic and neuronal status, SNN involves time in their network. The neuron doesn’t transmit information at each cycle rather These events are triggered by spikes, or action potentials, which are electrical pulses. Spikes are created when a sensory neuron is stimulated by an event. In other words, SNNs are networks that are event-based. You must be thinking exactly why we are so much stressing about SNN. Actually, since SNNs are event-based with architecture like a brain which is considered to be the best network. Also, they are very efficient. To know more about SNNs read HERE.

Fig2: SNN

Role of Spike Encoding :

Our brain works on signals (spikes) generated by the neurons. Same as that SNN works on spikes. Encoding the input into spikes is the first step toward developing an SNN. Spike encoding is embedding the information in a certain pattern to pass it through a voltage spike or train of spikes.

Types of encoding schemes:

Our brain has many encoding schemes being a biologically inspired model, these techniques, are adopted by SNN. The type of encoding scheme used depends on the problem we are solving. The type of encoding scheme used can highly affect the results. Hence, choosing the correct encoding scheme is very important. Below is the list of all the encoding strategies:

· Count Rate
· Density Rate
· Population Rate
· Threshold Based Representation (TBR)
· Step-forward(SF)
· Moving-window (MW)
· Burst
· Sparse distributed representations (SDR)
· Binary (Parallel)
· Rank-order coding
· Time-to-first-spike
· Phase
· Binary (Sequential)
· Hough spiker algorithm (HSA)
· GAGamma
· Ben's spiker algorithm (BSA)

As there are many encoding schemes it is difficult to study them. So we have categorized them so it is easy to get the similarities and differences between the coding schemes.

Fig3: Types of Encoding

Difference Between Rate encoding and Temporal encoding:

Rate Encoding

Rate codes embed the information in the instantaneous or averaged rate of spike generation of a single or group of neurons. This leads to a value that describes the activity of a neuron, which is comparable to the activation value of ordinary non-spiking artificial neurons.

Fig4: Rate encoding

Temporal Encoding

In this technique, the precise timing of and between spikes is used to encode information. This includes the absolute timing in relation to a global reference, the relative timing of spikes emitted by different neurons, or simply the order in which a population of neurons generates specific spikes.

Fig 5: Temporal encoding

Conclusion:

Lastly, I would like to conclude that there are many encoding techniques and to get better results try to select the scheme which is best for their given problem. There is no best method. The best encoding method depends on the application. To read more about these schemes, read HERE.

For, getting started with hands-on Spike Encoding click HERE

In case of any questions or concerns, find me at https://aabhabothera.netlify.app.

About me:

Accelerated Masters Student in Computer Engineering | Computer Science Engineer | Software Engineer |Former Academic Intern at NUS | Former Academic Intern at HPE.

--

--