Title: Unlocking spiking neural networks for machine learning research
Funder: Engineering and Physical Sciences Research Council

Abstract: In the last decade there has been an explosion in artificial intelligence research in which artificial neural networks, emulating biological brains, are used to solve problems ranging from obstacle avoidance in self-driving cars to playing complex strategy games. This has been driven by mathematical advances and powerful new computer hardware which has allowed large 'deep networks' to be trained on huge amounts of data. For example, after training a deep network on 'ImageNet' - which consists of over 14 million manually annotated images - it can accurately identify the content of images. However, while these deep networks have been shown to learn similar patterns of connections to those found in the parts of our brains responsible for early visual processing, they differ from real brains in several important ways, especially in how the individual neurons communicate. Neurons in real brains exchange information using relatively infrequent electrical pulses known as 'spikes', whereas, in typical artificial neural network models, the spikes are abstracted away and values representing the 'rates' at which spikes would be emitted are continuously exchanged instead. However, neuroscientists believe that large amounts of information is transmitted in the precise times at which spikes are produced. Artificial 'spiking neural networks' can harness these properties, making them useful in applications which are challenging for current models such as real-world robotics and processing data with a temporal component, such as video. However, spiking neural networks can only be used effectively if suitable computer hardware and software is available. While there is existing software for simulating spiking neural networks, it has mostly been designed for studying real brains, rather than building AI systems. In this project, I am going to build a new software package which bridges this gap. It will use abstractions and processes familiar to machine learning researchers, but with techniques developed for brain simulation, allowing exciting new SNN models to be used by AI researchers. We will also explore how spiking models can be used with a special new type of sensors which directly outputs spikes rather than a stream of images. In the first phase of the project, I will focus on using Graphics Processing Units to accelerate spiking neuron networks. These devices were originally developed to speed up 3D games but have evolved into general purpose devices, widely used to accelerate scientific and AI applications. However, while these devices have become incredibly powerful and are well-suited to processing lots of data simultaneously, they are less suited to 'live' applications such as when video must be processed as fast as possible. In these situations, Field Programmable Gate Arrays - devices where the hardware itself can be re-programmed - can be significantly faster and are already being used behind the scenes in data centres. In this project, by incorporating support for FPGAs into our new software, we will make these devices more accessible to AI researchers and unlock new possibilities of using biologically-inspired spiking neural networks to learn in real-time. As well as working on these new research strands, I will also dedicate time during my fellowship to advocate for research software engineering as a valuable component of academic institutions, both via knowledge exchange and research funding. In the shorter term, I will work to develop a community of researchers involved in writing software at Sussex by organising an informal monthly 'surgery' as well as delivering specialised training on programming Graphics Processing Units and more fundamental computational and programming training for new PhD students. Finally, I will develop internship and career development opportunities for undergraduate students, to gain experience in research software engineering.

Lay abstract: Spiking Neural Networks (SNNs) are already seen as the third generation of neural networks, especially for the processing of spatiotemporal data such as video. However, research in this area is hampered by lack of suitable tools. In this project, we will unlock the potential of SNNs by developing new software and FPGA accelerators for spike-based ML. This program of RSE activity will act as a foundation for the development of RSE culture at Sussex (where there are currently no RSEs) and, combined with a program of community building activities, will accelerate the establishment of a self-sustaining RSE group. Objective 1: New library to unlock the power of SNNs for ML researchers Many SNN-based ML researchers have chosen to stick with tools (eg PyTorch) designed for standard rate-based artificial neural networks (ANNs). While these tools are highly-optimised for such ANNs, they do not exploit the properties of SNNs that biological systems take advantage of. In this objective, using the GeNN library as a foundation, I will develop a Python-based framework which provides familiar abstractions and processes to ML researchers but, 'under the hood', uses efficient spike-based algorithms developed for large-scale computational neuroscience simulations. The library will use code-generation to train large SNNs via back-propagation through time and provide native support for cutting-edge sensors such as the Dynamic Vision Sensor. These features will make the library valuable for exploring SNNs and prototyping algorithms for specialised neuromorphic hardware which is starting to be deployed in applications ranging from automotive to space exploration. Objective 2: FPGA accelerators for low latency SNN training and inference GPUs are powerful, flexible and readily available but, to use them efficiently, training and inference must be performed on 'batches' of data making them less suitable for low-latency processing of live data, for example in edge-computing. Field Programmable Gate Arrays (FPGAs) are devices whose hardware can be reprogrammed and are already used to deliver low-latency inference in the cloud. We will develop efficient FPGA implementations of the algorithms used by GeNN, bringing the full flexibility of GeNN's code generation-based simulation engine to FPGAs using runtime reconfiguration and a vector processor architecture. To enable low-power inference and training, this architecture will support low-precision weights with stochastic rounding, resulting in a spike-based ML accelerator which can be deployed at scales from the edge to the data-centre. Objective 3: Developing RSE capacity at Sussex There are currently no RSEs or RSE community at Sussex but establishing both is a key University-wide strategic aim. Dedicated RSEs and targeted computational training would be particularly valuable at Sussex as, not only is it a research intensive university, but one famous for its plethora of interdisciplinary research - the computational aspects of which are often undertaken by researchers without computational backgrounds. With the support of staff who oversaw RSE development at other universities, I will develop RSE capacity at Sussex, disseminating good practice and working towards a self-funded group. In order to establish the need for dedicated RSEs and to better understand the needs of the research community, I will establish a monthly 'RSE surgery' where researchers from across the University can seek software engineering advice and meet in a friendly and open environment. I will then engage with Professional Services to define business processes and workflows to support the inclusion of RSE support in future grants, allowing a team of dedicated RSEs to be sustainably funded from forecasted grant income. Additionally, building on existing training frameworks, I will deliver computational training for PhD students and deliver a 2 day GPU computing workshop for staff, students and external participants.

Research activity codes: 2.5 RESEARCH DESIGN AND METHODOLOGIES (AETIOLOGY)
Health categories: NEUROLOGICAL