Abstract
Training spiking recurrent neural networks on neuronal recordings or behavioral tasks has become a popular way to study computations performed by the nervous system. As the size and complexity of neural recordings increase, there is a need for efficient algorithms that can train models in a short period of time using minimal resources. We present optimized CPU and GPU implementations of the recursive least-squares algorithm in spiking neural networks. The GPU implementation can train networks of one million neurons, with 100 million plastic synapses and a billion static synapses, about 1,000 times faster than an unoptimized reference CPU implementation. We demonstrate the code's utility by training a network, in less than an hour, to reproduce the activity of > 66, 000 recorded neurons of a mouse performing a decision-making task. The fast implementation enables a more interactive in-silico study of the dynamics and connectivity underlying multi-area computations. It also admits the possibility to train models as in-vivo experiments are being conducted, thus closing the loop between modeling and experiments.
1. Introduction
Cognitive functions involve networks of interconnected neurons with complex dynamics that are distributed over multiple brain areas. One of the fundamental missions of system neuroscience is to understand how complex interactions between large numbers of neurons underlie the basic processes of cognition.
An increasingly popular data-driven modeling approach for investigating the neural mechanisms that support behavioral tasks is to train neurons in an artificial neural network to reproduce the activity of recorded neurons in behaving animals (Hofer et al., ; Fisher et al., ; Rajan et al., ; Andalman et al., ; Daie et al., ; Finkelstein et al., ). Such network models can range from purely artificial networks that are far from being biological (Sussillo and Abbott, ; Rajan et al., ; Daie et al., ; Finkelstein et al., ), to biophysical neuronal networks that include spiking activity (Kim and Chow, ) of different cell types that operate in a brain-like dynamical state (Kim et al., ). The neural dynamics and the connectivity structure of the trained network can then be analyzed to gain insights into the underlying neural mechanisms. For instance, Rajan et al. () demonstrated that memory-related sequential activity can be produced in highly heterogeneous but partially structured recurrent neural networks, Finkelstein et al. () showed that decision-related information can be gated from distracting inputs by forming increasingly stable fixed points that move away from the decision boundary, and Kim et al. () provided general circuit mechanisms for spreading task-related neural activities from a small subset of trained neurons to the rest of neurons in the network.
With the increase in the size of experimentally recorded neural data sets, the ability to fit the activity of neurons in model networks is becoming a challenge. For example, the number of simultaneously recorded neurons in behaving animals has been increasing in the last few years at an exponential rate (Stevenson and Kording, ). At present, it is possible to simultaneously record in a single session about 1,000 neurons using electrophysiology, and up to 100,000 neurons using calcium imaging in behaving animals (Urai et al., ). When combining several sessions of recordings, the amount of data becomes huge and will likely grow to millions of recorded neurons in the near future.
Here, we developed a scalable implementation of the recursive least-squares algorithm (RLS) to train spiking neural networks of tens to hundreds of thousands of neurons to reproduce the activity of neural data. RLS (Haykin, ) was initially applied to train the outputs of a recurrent neural network for performing complex tasks, such as implementing 3-bit memory or generating motor movements (also known as FORCE; Sussillo and Abbott, ). Subsequently, RLS was adopted for training the individual neurons within a recurrent neural network to reproduce target neural activities. Examples of target activities include activity of neurons recorded from the brain (Rajan et al., ; Daie et al., ; Finkelstein et al., ), chaotic activity of a random network (Laje and Buonomano, ), teacher networks (DePasquale et al., ) and arbitrary functions (Kim and Chow, ). Although most existing studies apply RLS to rate-based networks, it can also be implemented in spiking neural networks for performing complex tasks (Nicola and Clopath, ) and reproducing neural activities (Kim and Chow, , ; Kim et al., ).
Starting with the code in Kim et al. (), we generalized it to include different models of single cell dynamics, as well as extended it to account for external noise. We then optimized it for run-time speed. Finally, we demonstrated its performance by training more than 66,000 spiking neurons to reproduce the activity of recordings from multiple brain areas of mice using Neuropixels probes (Jun et al., ) in a decision making task (Inagaki et al., ; Chen et al., ). Fitting these data, which were sampled at 20 ms for 3 s, takes about 10 h on a multi-core CPU and less than an hour on a GPU. The code is freely available.
2. Results
We implemented the RLS algorithm to train individual neurons within a large spiking recurrent neural network to reproduce a pre-determined target activity (Figure 1A). Specifically, we considered networks of integrate-and-fire spiking neurons connected by synapses with varying spike-filtering time scales but no explicit spike-propagation delays, in which the neurons could fire irregularly due either to recurrent interactions, known as the fluctuation-driven regime (Van Vreeswijk and Sompolinsky, ; Brunel, ; Amsalem et al., ), or to external noise, or both. We chose the standard leaky integrate-and-fire neuron as our model neuron. In the code, the cell model is a plugin, making it easy for users to customize, and we provide code that implements all five of the Generalized Leak Integrate and Fire (GLIF) models described in Teeter et al. ().
Figure 1
The learning objective was to train the synaptic current ui(t) of each neuron i = 1, ..., N such that it followed a target activity pattern fi(t) on a time interval t∈[0, T] (see Appendix: recursive least squares in Supplementary material). These activity patterns were extracted from the peri-stimulus time histograms (PSTHs) of recorded neurons in the brain (see Appendix: generating target trajectories in Supplementary material). To trigger a target response, each neuron in the network was stimulated by a constant input with random amplitude for a short duration. These external stimuli were applied to all neurons simultaneously, such that the network was set to a specific state at the end of stimulus duration. The synaptic weights were trained with this stimulated network state as the initial state, which allowed the trained network to produce the target response whenever the stimulus was applied to reset the network state. We treated every neuron's synaptic current as a read-out, which made our task equivalent to training N recurrently connected read-outs. For the current-based synapses considered in this study, neuron i's synaptic current ui can be expressed in terms of the spiking activities of other neurons rj, j = 1, ..., N through the exact relationship (see Equations A9 and A10 in Supplementary material for details). Therefore, we adjusted the incoming synaptic connections Wij, j = 1, ..., N to neuron i by the RLS algorithm in order to generate the target activity. Specifically, we randomly chose L plastic connections per neuron and trained only these connections. This training scheme allowed us to set up independent objective functions for each neuron and update them in parallel (see Appendix: recursive least-squares in Supplementary material). The linearity of u in terms of r makes it possible to directly apply the RLS algorithm to train the synaptic activity. Alternatively, the firing rates of neurons can also be trained if an appropriate F-I curve (Equation A1 in Supplementary material) for the neuron model is used in the RLS algorithm. This procedure, however, involves differentiating the non-linear F-I curve, which can slow down learning during subthreshold activity, as shown previously (Kim and Chow,
Besides the plastic connections, each neuron can also receive an average of K pre-synaptic static inputs. These connections are referred to as “static” because they remain unchanged during the learning process. The average static synaptic weights were chosen such that the network was in the balanced state (see Appendix in Supplementary material and Kim et al.,
In the case where the neurons are driven by external noise and there are no static connections (K = 0, σ>0), the number of plastic weights (L) is only bounded by N (and memory). However, in the presence of static weights, we follow our previous work (Kim et al.,
Starting with a working implementation of the algorithm (Kim et al.,
2.1. Optimization strategies
We used the Julia programming language (Bezanson et al.,
2.1.1. Parallel updates of the state variables
Pre-synaptic weights and neuronal voltages can be updated in parallel as they are independent of each other. Synaptic currents can also be updated in parallel, except during an action potential, when different threads might overwrite each others updates to a post-synaptic neuron's current if multiple of its pre-synaptic neurons spike simultaneously. In the CPU code, we used multiple threads to loop over the neurons to update the weights, voltages, and the exponential decay of currents. As Julia does not support atomic operations on elements of a vector, and locking mechanisms can be slow, a subsequent non-threaded loop was used to update the post-synaptic currents to avoid the race condition when a spike occurred.
We benchmarked CPU multi-threading on a machine with 48 physical cores and found that performance plateaued after 16 threads for a large model (Figure 1D). For small network models there was an optimal number of threads, and using more threads was actually slower. As there is no communication between threads, the optimum number is presumably determined by the balance between the overhead in launching each thread and the time spent performing computations therein. There is also a dependence of loop times on spike rate, due to the second non-threaded loop, the slope of which is proportional to K + L (Figure 1F).
Given that GPUs are purpose-built to thread well, we investigated whether the RLS algorithm would scale better with them. Since accessing individual elements in a vector is very slow on a GPU, due to each kernel call incurring a large overhead, we made a functionally equivalent copy of the CPU code and refactored it to use vector operations instead of for-loops over elements. Specifically, to reset the membrane potential in a performant way when a spike occurs, we replaced the for-loops in the CPU code, and the if-statements therein, with a broadcasted ifelse statement that inputs a boolean vector indicating which neurons spiked. Doing so results in the membrane potential of all of the neurons which do not spike being “reset” to its current value, but this is still faster even for low spike rates. To update the post-synaptic neurons, we moved the for-loop to be inside a custom GPU kernel where CUDA atomic instructions are available to handle the race condition. Just one kernel call is hence made, thereby minimizing the overhead. A dependency of loop time on spike rate also exists, just like in the CPU code, due to the atomic locking.
Whereas, the CPU run times were linear with model size, GPU performance was flat below a certain size. This is likely because models that are sufficiently small don't use all the parallelism that the GPU provides. The NVIDIA A100, for example, has 108 multiprocessors and each one can execute 32 threads simultaneously, yielding a total of 3,456 threads.
2.1.2. Symmetric and packed arrays
The RLS algorithm uses the running estimate of the inverse of the correlation matrix of the activity of the pre-synaptic neurons (plus regularization terms), which for each of the N neurons is a symmetric matrix of size L × L that we denote as P (see Equation A18 in Supplementary material). To perform mathematical operations on P, as well as other state variables, we utilized Basic Linear Algebra Subprograms (BLAS), a highly-engineered library of mathematical operations commonly used in high-performance computing. While some BLAS routines specialized to operate on symmetric matrices are faster, others are slower. Consider the function syr, for example, which computes A = αxxT + A, where A is a symmetric matrix, x is a vector, and α is a scalar. Here, A is being updated, and since it is symmetric, there are only half as many elements to update compared to ger which computes the non-symmetric counterpart. syr is hence typically faster than ger. Conversely, symv computes y = αAx + βy, where A is a symmetric matrix, x and y are vectors and α and β are scalars. Here, every element of A must be accessed to update y. Since extra logic must be used to ensure that indexing operations only access a particular triangle, symv is typically slower than gemv. We found that on balance it was slightly faster to use routines which operate on the symmetric P matrices (Figures 1D, E), particularly for models with large number of plastic synapses.
Further, P consumes by far more memory than any other variable since its footprint scales as N × L2. All other state variables are only one or two dimensional. Packing the columns of just the upper or lower triangle by concatenating them into a vector saves close to half the memory, thereby permitting models to be proportionately larger. Though a bit slower on the GPU overall compared to their unpacked counterparts (symv and syr; Figure 1E), BLAS routines specialized for packed symmetric matrices (spmv and spr) are much faster on the CPU (Figure 1D) for large models. We speculate that this performance difference is due to the sophisticated hierarchical caches on a CPU being better utilized with packed matrices, compared to a GPU.
2.1.3. BLAS, pre-allocated memory, and pre-computed division
We found that simple refactorings of our CPU code to directly use BLAS resulted in substantial performance gains. For example, the RLS algorithm computes k = Pr, which is a product of the symmetric matrix, P, and the presynaptically filtered spike trains, r (see Equations A9 and A18 in Supplementary material). Preallocating and reusing k and then calling mul!(k, P, r), which is a thin wrapper around BLAS' gemv matrix-vector multiplication function, is faster and uses less memory than doing the dot product directly.
A further performance improvement was realized by using Intel's Math Kernel Library (MKL: https://software.intel.com/en-us/intel-mkl) for the CPU, which is a superset of BLAS hand-crafted for the x86 architecture, instead of the default cross-platform OpenBLAS. Decrements in loop times were most pronounced for models with K > 0. Specifically, for a model with N = 32, 768, K = 1, 638, L = 81 we saw a 59% reduction using MKL, whereas for N = 32, 768, K = 0, L = 128 there was only a 5.8% improvement, about 10-fold less.
BLAS functions frequently input multiplicative constants, forcing the user to manually do a division ahead of time if the constant is in the denominator. Following this lead for the sections of code that do not use BLAS directly, we precomputed, just once, the inverse of the synaptic currents and membrane voltage time constants as they are in the denominator of the equations that govern the neural dynamics. Loop times were about 2% quicker performing this multiplication, instead of the corresponding division, for the CPU code.
For the GPU version of our code we wrote our own GPU kernels which batched several BLAS routines, specifically gemv and ger plus their symmetric (symv, syr) and packed symmetric equivalents (spmv, spr). Such batched GPU kernels are critical to our learning algorithm since we apply the RLS algorithm to each of the N trained neurons, and calling a non-batched kernel N times would incur a huge performance penalty due to the overhead of calling functions on GPUs. The solution was to write new BLAS kernels that internally iterate over N, which was necessary as NVIDIA only provides batched implementations of gemm, gemv, and trsm.
2.1.4. Reduced precision number formats
Our original reference code in Kim et al. (
Our custom batched BLAS kernels for the GPU can operate on floating point numbers of any precision, and even integers, unlike the CPU BLAS libraries. To further reduce memory consumption, and hence increase model size, we tried Float16, whose range is only 6.5 × 104 and machine epsilon is 9.7 × 10−4, and found that models can be trained almost as accurately as with 64 and 32 bits. To see if the small decrement in correlation could be recovered with a different partitioning of the bits between the exponent and the fraction, we tried BFloat16, which uses eight bits for the exponent, just like Float32, and hence has the same range, instead of Float16's five. Correlation coefficients for BFloat16 were worse. As there are no hardware-supported 16-bit floating point formats that allocate more bits to the fraction, we tried scaling P by 214 and storing it in a 16-bit integer, effectively giving us 14 fractional bits. There is no overflow with this scheme, as P typically ranges from -1 to 2. Scaled 16-bit integers had correlations that were indistinguishable from Float32 and Float64. Furthermore, there is no speed penalty with 16-bit integers.
Modern hardware does not support 8-bit floats (though see the forthcoming NVIDIA H100 GPU), but they can be simulated in software with, for example, MicroFloatingPoint.jl. We tried 8-bit floats with two, three, four, or five exponential bits and found that correlations were best with four and reached a peak around half that of 32 and 64 bits and then declined. Scaling P by 26 and storing it in an Int8 resulted in a correlation peak of similar height. While Int8 required more iterations to reach the peak than Float8, the wall clock time was actually less as the loop times were much shorter due to native hardware support.
There is also no direct hardware support for 12-bits, but given the large difference between our 8 and 16 bit results, we simulated them in software by using an Int16 [sic] scaled by 210. Since the magnitude of P is less than two, the four most significant bits here are entirely unused, and the 10 least significant are used as the fraction. As with scaled Int8, we observed a peak in the correlation coefficient, this time a bit larger at about two-thirds that of 32 and 64 bits, followed by decline. A 12-bit integer is not an unreasonable type to imagine using to reduce memory consumption, as two Int12 will pack into three bytes. In fact, UInt12Arrays.jl is a Julia package which does precisely this for unsigned 12-bit integers.
In summary, we recommend using Float32 unless the model does not fit in memory, in which case Int16 can be used. If it still does not fit and a drop in correlation can be tolerated, we recommend using Int8, or, time permitting, developing a proper Int12 package.
2.2. Application
With a fast RLS codebase in hand, we next demonstrated that large models can be successfully trained to recapitulate the dynamics in real-world big data sets. We used 66,002 peri-stimulus time histograms (PSTHs) of neurons, recorded using Neuropixels probes (Jun et al.,
Figure 2

Application to Neuropixels data. (A) Top: Schematic of experimental setup. Mice learned to lick to one of two directions (left/right) after a delay period, depending on which of two tones were played. Bottom: Multiple Neuropixels probes, each with hundreds of recording sites, were placed in the brain while a mouse was performing the task (Chen et al.,
We then used the RLS algorithm to train the neurons in the spiking network to follow the target functions. The correlation between the learned and target synaptic currents increased with the number of plastic inputs (L), and reached a plateau in half an hour (Figure 2B). 256 plastic synapses was the largest that would fit in the 80 GB of memory in an A100 GPU with N = 66,002. For comparison, a model of that size would take multiple days on a single thread of a CPU using the reference code of Kim et al. (
Note that in this experiment each trained neuron successfully learned two activity patterns corresponding to lick right and lick left trials. Learning more than two patterns would likely require additional plastic synapses, which could potentially limit the task complexity that can be achieved using a single GPU.
3. Discussion
We present optimized CPU and GPU implementations of the recursive least-square (RLS) algorithm for training spiking neural networks. Our code can simulate and train a spiking network consisting of about one million neurons and 100 million synapses on a single modern high-end workstation.
Our updated code is significantly faster than the previous version (Kim et al.,
While we used simple integrate-and-fire neurons, our code can be easily extended to include more realistic neurons using a cell-model plugin system that provides users the means to provide custom code. A simple integrate-and-fire neuron allowed us to easily convert PSTHs to synaptic currents using the known F-I curve (Equation A1 in Supplementary material; Roxin et al.,
Additionally, although the plastic weights in our networks were random, our framework does not exclude adding complexity to the network architecture, such as including layered cortical networks or even different cell types, or using known mesoscopic connectivity when initializing the plastic weights in the network. This flexibility is again achieved through a set of plugins through which the user can provide custom code to define the adjacency matrices.
The RLS algorithm is designed to minimize the discrepancy between the PSTHs generated by the model neurons and the recorded neurons. It does not optimize for other spiking statistics, such as the coefficients of variation for interspike-intervals or Fano factors. These statistics can be influenced by adjusting the network's hyper-parameters, such as the level of noise applied to each neuron (σ). Tools are available to assess the network's performance against these other measures while varying the hyper-parameters (e.g., https://github.com/INM-6/NetworkUnit).
The size of the networks is limited by memory usage, which mainly depends on the size of the matrix P used in the RLS algorithm (see Equation A18 in Supplementary material). This matrix scales linearly with the number of neurons and quadratically with the number of plastic synapses (N × L2). We found that about L ≈ 100 synapses per neuron suffices to train the network to reproduce the activity of neurons recorded in mice performing a delayed response task (Figure 2B). However, the number of plastic synapses needed to train the network is expected to increase with the number of tasks to be learned, as well as the complexity of neuronal dynamics in each task. Therefore, how large the network model would have to be could depend on the number and the complexity of the tasks to be learned.
Advances in GPU computing and strong interest in neuromorphic computing have led to various efficient implementations of spiking neural networks. Recent work that implements simulations of spiking neural networks in GPUs include the following: a code-generation based system that generates CUDA code for GPU (GeNN, Knight and Nowotny,
Finally, our code implementation was tailored to be used on a single computer, instead of on multiple computers, such as in Jordan et al. (
Statements
Data availability statement
Publicly available datasets were analyzed in this study. Our code can be found here: https://github.com/SpikingNetwork/TrainSpikingNet.jl; https://github.com/JaneliaSciComp/BatchedBLAS.jl; https://github.com/JaneliaSciComp/SymmetricFormats.jl.
Author contributions
CK and RD conceived of the algorithm. CK provided and helped understand the reference implementation. BA optimized the code for performance, with the assistance of CK and RD and prepared the figures. SC did the experiments and collected and analyzed the Neuropixels data. BA, CK, SP, and RD wrote the manuscript. All authors contributed to the article and approved the submitted version.
Funding
This work was supported by the Howard Hughes Medical Institute, the Visiting Scientist Program at Janelia Research Campus, and the Intramural Research Program of National Institute of Diabetes and Digestive and Kidney Diseases at the National Institutes of Health.
Acknowledgments
We would like to thank Shaul Druckmann, Nuo Li, Yi Liu, and Karel Svoboda for sharing the Neuropixels data set.
Conflict of interest
The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
Supplementary material
The Supplementary Material for this article can be found online at: https://www.frontiersin.org/articles/10.3389/fninf.2023.1099510/full#supplementary-material
References
1
AleviD.StimbergM.SprekelerH.ObermayerK.AugustinM. (2022). Brian2CUDA: flexible and efficient simulation of spiking neural network models on GPUs. Front. Neuroinform.16, 883700. 10.3389/fninf.2022.883700
2
AmsalemO.InagakiH.YuJ.SvobodaK.DarshanR. (2022). Sub-threshold neuronal activity and the dynamical regime of cerebral cortex. bioRxiv. 10.1101/2022.07.14.500004
3
AndalmanA. S.BurnsV. M.Lovett-BarronM.BroxtonM.PooleB.YangS. J.et al. (2019). Neuronal dynamics regulating brain and behavioral state transitions. Cell177, 970–985. 10.1016/j.cell.2019.02.037
4
BezansonJ.EdelmanA.KarpinskiS.ShahV. B. (2017). Julia: a fresh approach to numerical computing. SIAM Rev.59, 65–98. 10.1137/141000671
5
BrunelN. (2000). Dynamics of sparsely connected networks of excitatory and inhibitory spiking neurons. J. Comput. Neurosci.8, 183–208. 10.1023/A:1008925309027
6
ChenS.LiuY.WangZ.ColonellJ.LiuL. D.HouH.et al. (2023). Brain-wide neural activity underlying memory-guided movement. bioRxiv. 10.1101/2023.03.01.530520
7
DaieK.SvobodaK.DruckmannS. (2021). Targeted photostimulation uncovers circuit motifs supporting short-term memory. Nat. Neurosci.24, 259–265. 10.1038/s41593-020-00776-3
8
DarshanR.Van VreeswijkC.HanselD. (2018). Strength of correlations in strongly recurrent neuronal networks. Phys. Rev. X8, 031072. 10.1103/PhysRevX.8.031072
9
DaviesM.SrinivasaN.LinT.-H.ChinyaG.CaoY.ChodayS. H.et al. (2018). Loihi: a neuromorphic manycore processor with on-chip learning. IEEE Micro38, 82–99. 10.1109/MM.2018.112130359
10
DePasqualeB.CuevaC. J.RajanK.EscolaG. S.AbbottL. (2018). full-force: a target-based method for training recurrent networks. PLoS ONE13, e0191527. 10.1371/journal.pone.0191527
11
FinkelsteinA.FontolanL.EconomoM. N.LiN.RomaniS.SvobodaK. (2021). Attractor dynamics gate cortical information flow during decision-making. Nat. Neurosci.24, 843–850. 10.1038/s41593-021-00840-6
12
FisherD.OlasagastiI.TankD. W.AksayE. R.GoldmanM. S. (2013). A modeling framework for deriving the structural and functional architecture of a short-term memory microcircuit. Neuron79, 987–1000. 10.1016/j.neuron.2013.06.041
13
FurberS. B.GalluppiF.TempleS.PlanaL. A. (2014). The spinnaker project. Proc. IEEE102, 652–665. 10.1109/JPROC.2014.2304638
14
GewaltigM.-O.DiesmannM. (2007). Nest (neural simulation tool). Scholarpedia2, 1430. 10.4249/scholarpedia.1430
15
GuoZ. V.LiN.HuberD.OphirE.GutniskyD.TingJ. T.et al. (2014). Flow of cortical activity underlying a tactile decision in mice. Neuron81, 179–194. 10.1016/j.neuron.2013.10.020
16
HaykinS. (1996). Adaptive Filter Theory, 3rd Edn.. Upper Saddle River, NJ: Prentice-Hall, Inc.
17
HoferS. B.KoH.PichlerB.VogelsteinJ.RosH.ZengH.et al. (2011). Differential connectivity and response dynamics of excitatory and inhibitory neurons in visual cortex. Nat. Neurosci.14, 1045–1052. 10.1038/nn.2876
18
InagakiH. K.ChenS.RidderM. C.SahP.LiN.YangZ.et al. (2022). A midbrain-thalamus-cortex circuit reorganizes cortical dynamics to initiate movement. Cell185, 1065–1081. 10.1016/j.cell.2022.02.006
19
JordanJ.IppenT.HeliasM.KitayamaI.SatoM.IgarashiJ.et al. (2018). Extremely scalable spiking neuronal network simulation code: from laptops to exascale computers. Front. Neuroinform.12, 2. 10.3389/fninf.2018.00002
20
JunJ. J.SteinmetzN. A.SiegleJ. H.DenmanD. J.BauzaM.BarbaritsB.et al. (2017). Fully integrated silicon probes for high-density recording of neural activity. Nature551, 232–236. 10.1038/nature24636
21
KimC. M.ChowC. C. (2018). Learning recurrent dynamics in spiking networks. eLife7, e37124. 10.7554/eLife.37124
22
KimC. M.ChowC. C. (2021). Training spiking neural networks in the strong coupling regime. Neural Comput.33, 1199–1233. 10.1162/neco_a_01379
23
KimC. M.FinkelsteinA.ChowC. C.SvobodaK.DarshanR. (2023). Distributing task-related neural activity across a cortical network through task-independent connections. Nature Communications. 14:2851. 10.1101/2022.06.17.496618
24
KnightJ. C.NowotnyT. (2018). GPUs outperform current HPC and neuromorphic solutions in terms of speed and energy when simulating a highly-connected cortical model. Front. Neurosci.12, 941. 10.3389/fnins.2018.00941
25
LajeR.BuonomanoD. V. (2013). Robust timing and motor patterns by taming chaos in recurrent neural networks. Nat. Neurosci.16, 925–933. 10.1038/nn.3405
26
MerollaP. A.ArthurJ. V.Alvarez-IcazaR.CassidyA. S.SawadaJ.AkopyanF.et al. (2014). A million spiking-neuron integrated circuit with a scalable communication network and interface. Science345, 668–673. 10.1126/science.1254642
27
NicolaW.ClopathC. (2017). Supervised learning in spiking neural networks with force training. Nat. Commun.8, 2208. 10.1038/s41467-017-01827-3
28
RajanK.HarveyC. D.TankD. W. (2016). Recurrent network models of sequence generation and memory. Neuron90, 128–142. 10.1016/j.neuron.2016.02.009
29
RoxinA.BrunelN.HanselD.MongilloG.van VreeswijkC. (2011). On the distribution of firing rates in networks of cortical neurons. J. Neurosci.31, 16217–16226. 10.1523/JNEUROSCI.1677-11.2011
30
SteffenL.KochR.UlbrichS.NitzscheS.RoennauA.DillmannR. (2021). Benchmarking highly parallel hardware for spiking neural networks in robotics. Front. Neurosci.15, 667011. 10.3389/fnins.2021.667011
31
StevensonI. H.KordingK. P. (2011). How advances in neural recording affect data analysis. Nat. Neurosci.14, 139–142. 10.1038/nn.2731
32
StimbergM.GoodmanD. F.NowotnyT. (2020). Brian2GENN: accelerating spiking neural network simulations with graphics hardware. Sci. Rep.10, 410. 10.1038/s41598-019-54957-7
33
SussilloD.AbbottL. (2009). Generating coherent patterns of activity from chaotic neural networks. Neuron63, 544–557. 10.1016/j.neuron.2009.07.018
34
TeeterC.IyerR.MenonV.GouwensN.FengD.BergJ.et al. (2018). Generalized leaky integrate-and-fire models classify multiple neuron types. Nat. Commun.9, 709. 10.1038/s41467-017-02717-4
35
UraiA. E.DoironB.LeiferA. M.ChurchlandA. K. (2022). Large-scale neural recordings call for new insights to link brain and behavior. Nat. Neurosci.25, 11–19. 10.1038/s41593-021-00980-9
36
Van VreeswijkC.SompolinskyH. (1996). Chaos in neuronal networks with balanced excitatory and inhibitory activity. Science274, 1724–1726. 10.1126/science.274.5293.1724
Summary
Keywords
integrate and fire neuron, dynamical system, Neuropixels dense silicon probe, balanced networks, excitation-inhibition
Citation
Arthur BJ, Kim CM, Chen S, Preibisch S and Darshan R (2023) A scalable implementation of the recursive least-squares algorithm for training spiking neural networks. Front. Neuroinform. 17:1099510. doi: 10.3389/fninf.2023.1099510
Received
15 November 2022
Accepted
05 June 2023
Published
27 June 2023
Volume
17 - 2023
Edited by
Matthias H. Hennig, University of Edinburgh, United Kingdom
Reviewed by
Russell Jarvis, Western Sydney University, Australia; Hans Ekkehard Plesser, Norwegian University of Life Sciences, Norway
Updates

Check for updates
Copyright
© 2023 Arthur, Kim, Chen, Preibisch and Darshan.
This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Benjamin J. Arthur arthurb@janelia.hhmi.org
†Present address: Ran Darshan, Department of Physiology and Pharmacology, Sackler Faculty of Medicine, Tel Aviv University, Tel Aviv, Israel; Sagol School of Neuroscience, Tel Aviv University, Tel Aviv, Israel; The School of Physics and Astronomy, Tel Aviv University, Tel Aviv, Israel
‡ORCID: Benjamin J. Arthur orcid.org/0000-0003-3545-8807
Christopher M. Kim orcid.org/0000-0002-1322-6207
Susu Chen orcid.org/0000-0002-5065-1157
Stephan Preibisch orcid.org/0000-0002-0276-494X
Ran Darshan orcid.org/0000-0003-3078-4857
Disclaimer
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.