Introduction to Neuromorphic Computing¶
Introduction.
Objectives
Understand the basis of neuromorphic computing
Asses the strengths of neuromorphic computing as a programming paradigm
Learn which kinds of algorithms are appropriate for neuromorphic computing
Instructor note
20 min teaching
What is neuromorphic computing?¶
Neuromorphic computing (NMC) is a computational paradigm based on networks of spiking neurons (sometimes also known as SNN, spiking neuron networks). It attempts to emulate the behavior of biological neuron networks, which are arguably the best computers we know of (at least, for non purely numerical tasks!). A neuromorphic simulation usually consists of:
Keypoints
A neuron model: These can range from the very simple, such as the basic LIF model (Leaky Integrate and Fire neuron), to complex multi-segment models that simulate and track the neurotransmitter content of the cell step by step. These neurons are capable of emitting spikes (also known as synapses or pulses) when a given internal threshold has been reached.
A synapse model: This defines the connections in the network. Basic synapse models include a strength of the connection, and usually a time delay until a message is passed from one neuron to another. Connections can be excitatory or inhibitory (that is, they make the neuron receiving the message more or less likely to emit its own message, respectively).
The network: It is also relevant how the network is composed, that is, how many neurons are present in the network, how many groups of neurons are present, and how they are connected between them (at random, one to one, or specific connections to model a particular analogous problem or algorithm). Advanced simulations include dynamic networks, where connections between neurons can change as the simulation progresses.
Neuromorphic computing is a computational paradigm in and of itself. The same way classical boolean computing operates on bits, and quantum computing operates on qubits, NMC operates on simulated neurons. This provides certain advantages and inherent features when compared to other computational paradigms:
Keypoints
Low power: The simpler neuron models can be implemented with a small number of discrete electronic component, or programmed with a handful of FLOPs (floating point operations). As such, the power consumption of neuromorphic hardware and neuromorphic simulations can be kept low when compared to other platforms such as GPUs.
Sparsity: Communication events are rare, taking place only when a neuron generates a spike. In this way, communication is sparse and only takes place when required, diminishing the need for synchronization events and complex communication routines which waste compute cycles on other architectures and paradigms.
A bridge between discrete and analog computing: NMC involves features of both analog (the internal state of the neurons, be it voltage or neurotransmitter levels) and digital computing (the discrete spiking events, associated with a neuron being active or not). As such it inherits advantages of both models, such as the low power consumption of analog models (no cycles wasted converting analog and digital values in dedicated analog hardware, for example), and the (theoretical) universality of classical computing.
Coupling of compute and memory at the lowest level: At the lowest per-neuron level, computing (that is, updating the internal state of the neuron and deciding whether to emit a spike/pulse/synapse) is inherently and directly coupled with memory (the internal state of the neuron).
Inherent time component: Neuromorphic computations are simulated inherently with a time component, from tracking the internal state of neurons at each timestep to synapses with delays. As such, it is a natural paradigm for treating problems that require a time component, such as signal processing.
Discussion
Compare and contrast spiking neurons with one of the more common machine learning algorithms, ANNs (artificial neuron networks).
Look up information on the von Neumann bottleneck in computation, and its relation to memory/compute coupling.
How can we run neuromorphic computations?¶
Neuromorphic algorithms can be run on conventional hardware with various libraries that in effect simulate spiking neuron networks, as well as on dedicated hardware architectures. In this tutorial we will work with PyNN, a Python library, which is in effect an API for various other neuromorphic computing libraries. With PyNN, it is possible to set up a neuron network, that can then be actually simulated with a library of choice such as NEST or NEURON, or even on select dedicated hardware. Another Python library that functions as an intermediate between different neuromorphic hardware architectures and simulators (but more complex to work with) is NIR. Also available is snnTorch library extends to the popular PyTorch library to spiking neurons.
Dedicated hardware comes in two extreme versions: Analog implementations where each neuron is implemented directly with a number of electronic components, and digital implementations that use specially designed digital chips and spike-passing networks to simulate neurons. Analog neuromorphic computers are extremely energy efficient and fast since they require only a few electronic components per neuron, but are much harder to operate and program for, and are less universal on the type of algorithms that they can run. Dedicated digital architectures on the other hand still retain power consumption advantages when compared to traditional CPU/GPU architectures (up to 2-3 orders of magnitude depending on the application under consideration), but are easier to program and work with, and can run more types of programs. Both types of hardware are usually limited in the types of model they can run, the number of neurons and total synapses they can accommodate, or exhibit various numerical and algorithmical limitations related to their architecture. An example of an analog neuromorphic computing machine is BrainScaleS. Example of the digital machines include LoiHi and SpiNNaker.
Model of single neurons on PCBs from the Electronic Visions lab, that also works on the BrainScaleS analog neuromorphic computing machine.
SpiNNaker-2 boards, the digital neuromorphic computer from SpiNNcloud.
Discussion
Look up information on the mentioned neuromorphic hardware architectures. How many of them can be accessed for research purposes?
What algorithms can be run with neuromorphic computing?¶
The intrinsic features of NMC lend themselves well to a number of problems and algorithms. To mention a few:
Keypoints
Theoretical neuroscience simulations: An obvious first possibility is directly simulating collections of biological neurons, mimicking real nervous systems. This can be done mapping neurons one-to-one to real tissue, or at a more coarse grained level by generating random collections of neurons grouped into different layers. With these simulations it is possible to study the dynamics of neuron systems, test new biological models, and learn about complex biological processes such as plasticity and memory and learning.
Cellular automata: Cellular automata simulations can be used to treat a variety of problems such as spread of fire in a forest. They usually involve a discrete grid of cells that can each be in a concrete state (usually on or off), and rules for advancing the state of the simulation from one step to the next given the status of one cell and the surrounding cells. The similarities with spiking networks are straightforward.
Network simulations: The structure of a neuromorphic simulation is inherently dependant on the connections of the spiking neuron network. As such an application to simulating real life networks problems such as power grids or city connections is easily achieved.
ML/AI: You might have noticed the concept of spiking neurons is very similar to that of artificial or deep neural networks. As such many machine learning algorithms are easily transferable to a neuromorphic construction, and many others can be achieved starting from a purely neuromorphic point of view, such as the well known test case of spoken Heidelberg digits dataset.
Constraint, graph, and optimization problems: Once again, the basic configuration of a neuromorphic simulation is reminiscent of the situation presented in a variety of graph problems. Many optimization problems can be remapped into graph problems. Constraint optimization problems can for example be easily transformed into a spiking neuron network, as we will see in one of the exercises of this tutorial. For more complex algorithms, the QUBO optimization algorithm has been succesfully mapped into a neuromorphic simulation.
Live signal processing: One of the main functions of biological nuerons is the processing of live auditory and visual information. Systems of neuromorphic neurons can also be used for this purpose, and very efficient real-time processing can be achieved in this way. Examples range from basic digit recognition in the MNIST dataset, to spoken Heidelberg digit recognition, to video processing. Networks analogous to real nervous systems that perform this activity can also be built.
Control loops: As previously mentioned, neuromorphic simulations also include an analog component. As such, PID systems can be created out of neuron networks that can be used to control real world machines and robots, as well as more complex control loop algorithms that can also take into account and respond to external signals.
Low power algorithms and embedded architectures: As discussed in the previous sections, the characteristics of the neuromorphic paradigm result in energy efficient computation. This can be exploited to create low power chip architectures for distributed and embedded devices, that can then implement any of the other algorithms in this list, including AI/ML.
Systems of partial differential equations and finite element method simulations: Each neuron can be thought of as solving its own set of internal differential equations each timestep to calculate its internal status at the next timestep. This lends itself easily to solving problems of distributed and coupled partial differential equations through discrete approximation methods.
Discussion
How many neurons does a typical organism have in total? What is a connectome? Look up the connectomes of the C. elegans nematode and the D. melanogaster fruit fly. How many neurons are in a small mammal or bird? How many total connections between neurons and connections per neuron? What is the average spiking frequency of a biological neuron?
What optimization algorithms do you know? What about graph problems?
Are you interested in any algorithms that fall in the categories mentioned above?
The rest of this tutorial¶
This tutorial consists of the following sections:
Keypoints
Implementing the basic LIF model as an example in Python.
An introduction to PyNN, a Python library for setting up an running neuromorphic simulations. This serves also as an introduction to common neuromorphic terminology.
An implementation of the classical map coloring problem (a constraint optimization problem) in neuromorphic code.
Summary¶
Keypoints
Neuromorphic computing is its own computational paradigm, comparable to other better known paradigms such as classical/boolean computing, quantum computing, and analog computing.
A neuromorphic simulation usually consists of biologically inspired spiking neuron models, that are connected in some sort of network. The construction of the network and subsequent analysis decide which sort of problem can be studied with a NMC simulation.
Neuromorphic simulations can be run on common CPU/GPU hardware using libraries such as PyNN and NIR, or on dedicated hardware such as BrainScale, LoiHi and SpiNNaker.
Due to its intrinsic characteristics, neuromorphic computing shows advantages in multiple areas, such as low power algorithms and embedded devices, theoretical neuroscience simulations, optimization and constraint problems, live signal processing, systems of partial differential equations and finite element method simulations, among others.
See also
Open Neuromorphic, a large neuromorphic computing community and knowledge base.
The spoken Heidelberg digits dataset as a benchmark and repository of many SNN-based ML models.
A review of a previous revision of the SPiNNaker hardware architecture, which also provides a nice overview of many on-hardware applications.