This chapter describes another foundational concept in neuromorphic computing: Encoding & Decoding. Spiking networks work with discrete spikes (generally binary, i.e., 0 and 1); however, the real-world data are (almost always) continuous valued. Therefore, the real-world data need to be converted to discrete spikes to work with spiking networks. Likewise, one also needs to convert the discrete spikes back to continuous values to make real-world sense.
The conversion of real-world continuous data to spikes is called Encoding, while the conversion of spikes to continuous values is called Decoding. Herein, we present a few popular methods of Encoding and Decoding in spiking networks, and recommend the readers to read Panzeri et al., 2010 and Auge et al., 2021 for an in-depth knowledge on various encoding/decoding methodologies. Let’s dig a bit deeper into these conversion methodologies.
Encoding¶
When one wishes to input data to their spiking network, they must ensure that the data are discrete events/spikes. If the input data are already discretized, e.g., obtained from Event-based Sensors (DVS Cameras, etc.), then it’s all set to be fed to the spiking network. However, if the data are continuous-valued (which is mostly the case), then one must employ some sort of encoding methodology to convert the continuous-valued data to input events/spikes. Therefore, this encoding process can be considered as the task of the Input layer in an SNN. The encoding methods fall under two broad categories: Rate Encoding and Temporal Encoding; in this chapter, we will discuss them both.
Decoding¶
Spiking neurons output spikes, and use that to communicate with each other; they do not output their internal voltage and current states. Therefore, for operations that involve discrete spikes as input and continuous-values as output e.g., at the output layer of an SNN for classification or regression, we need to decode the spikes. In other words, when we need to extract some meaningful information from spikes, we decode them. Similar to encoding, there are multiple decoding approaches that can be broadly placed in two categories: Rate Decoding and Temporal Decoding; we will discuss both of these in this chapter.
Before we begin with this chapter, we here introduce the concept of a Spike Generator:
Spike Generators are used for various tasks, e.g.,
to stimulate/inhibit connected neuron(s)
to study the implemented spiking behaviour
to encode an input signal to binary/graded spikes
This bring us to define the term Encoder:
Cite this chapter
Gaurav, Ramashish; Pedersen, Jens Egholm; Bogdan, Petrut (2026). What is Encoding & Decoding?. In Practical Spiking Neural Networks. Version 0.8. Open Neuromorphic. https://snnbook.net/topics/1_3_encdec
@incollection{snnbook2026-encdec,
author = {Gaurav, Ramashish and Pedersen, Jens Egholm and Bogdan, Petrut},
title = {{What is Encoding & Decoding?}},
booktitle = {{Practical Spiking Neural Networks}},
publisher = {Open Neuromorphic},
year = {2026},
edition = {Version 0.8},
url = {https://snnbook.net/topics/1_3_encdec},
}- Panzeri, S., Brunel, N., Logothetis, N. K., & Kayser, C. (2010). Sensory neural codes using multiplexed temporal scales. Trends in Neurosciences, 33(3), 111–120.
- Auge, D., Hille, J., Mueller, E., & Knoll, A. (2021). A survey of encoding techniques for signal processing in spiking neural networks. Neural Processing Letters, 53(6), 4693–4710.