Addressing the speed-accuracy simulation trade-off for adaptive spiking neurons

The adaptive leaky integrate-and-fire (ALIF) model is fundamental within computational neuroscience and has been instrumental in studying our brains $\textit{in silico}$. Due to the sequential nature of simulating these neural models, a commonly faced issue is the speed-accuracy trade-off: either accurately simulate a neuron using a small discretisation time-step (DT), which is slow, or more quickly simulate a neuron using a larger DT and incur a loss in simulation accuracy. Here we provide a solution to this dilemma, by algorithmically reinterpreting the ALIF model, reducing the sequential simulation complexity and permitting a more efficient parallelisation on GPUs. We computationally validate our implementation to obtain over a $50\times$ training speedup using small DTs on synthetic benchmarks. We also obtained a comparable performance to the standard ALIF implementation on different supervised classification tasks - yet in a fraction of the training time. Lastly, we showcase how our model makes it possible to quickly and accurately fit real electrophysiological recordings of cortical neurons, where very fine sub-millisecond DTs are crucial for capturing exact spike timing.

Paper

References (77)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer Fo7F5/10 · confidence 3/52023-07-06

Summary

This paper focus on addressing the speed-accuracy tradeoff in adaptive spiking neurons. They utilize the existence of the absolute refractory period (ARP), and the fact that a neuron can spike at most once within this period, which could reduce the complexity to O(1), and develop an algorithmic reformulation of the adaptive ALIF model. Their model is simulated in blocks of time, instead of simulating network dynamics step by step. Their model achieves ~40x speed up in inference and ~53x speed up in training without the sacrificing the accuracy. And the model is also tested on real electrophysiological recording.

Strengths

1. Motivation: The paper is well-motivated, and addressing the speed-accuracy tradeoff in the biological simulation is an important question. And using the fact that neuron can spike at most once within the absolute refractory period (ARP) to speed up the computation is novel. 2. Evaluation: Two levels of evaluations were properly designed, one is to train SNN on spiking classification tasks (N-MNIST, SHD datasets), and the other one is to fit real neural recordings. 3. Result: Their method is mathematically proved that significantly improve the speed without sacrificing the accuracy, and it's also evaluated by multiple experiments at the same time.

Weaknesses

1. Generalization: One major weakness is that the proposed algorithm using the sparse firing in ARP to speed up the computation is quite limited to one particular type pf SNN, and hard to be generalized to other variants of neural network simulation. 2. Method: The method's performance depends on the value of hyper parameters ARP and DT, and their values are manually tuned for different experiments, which is not practical for real applications, where the ARP is typically unknown and varied across neurons. The method will be more efficient if these hyperparameters could be automatically optimized and learned. 2. Evaluation: No additional baseline was evaluated and compared under the same experiments.

Questions

1. How does this method could be generalized to standard spiking neurons models (leaky integrate-and-fire model without adaptive firing threshold, Hodgkin–Huxley model, etc.)? 2. How does the speed compared to continuous neural dynamical models such as neural ODE? 3. What's the additional overhead time and memory cost to use this algorithm?

Rating

5: Borderline accept: Technically solid paper where reasons to accept outweigh reasons to reject, e.g., limited evaluation. Please use sparingly.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

2 fair

Presentation

2 fair

Contribution

2 fair

Limitations

1. No potential societal impact of the work. 2. The ARP hyperparameters is not addressed, an automatically tuning algorithm might be potentially helpful.

Reviewer 9z9h5/10 · confidence 4/52023-07-07

Summary

The submitted manuscript proposed a method to speedup simulations of adaptive leaky integrate-and-fire (ALIF) neurons on a GPU by using the fact that during the absolutely refractory period ARP, neurons don't exchange any information and thus "blocks" on dt/ARP can be parallelized on GPU. This approach is then used to both train ALIF neurons on typical machine learning tasks and to fit individual ALIF neuron parameters to experimentally measured membrane potentials/currents/spike trains from the Allen Institute, with demonstrate a speedup achieved by the algorithm. Overall, the submission is well-written and the numerical experiments seem to be executed with due diligence. Unfortunately, no code is provided, which makes the claims and simulations not reproducible. The core idea to parallelize the time of the ARP is not new and has been used by other simulators (e.g. the NEST simulator for MPI parallelization as described here: https://nest-simulator.readthedocs.io/en/v2.20.0/guides/running_simulations.html). However, I have not seen it explicitly used for GPU parallelization and training. While the novelty of the submission seems to be minor, I would still think that it can be a useful contribution to the field once the code is made available and the implementation is benchmarked against existing implementations. Once the code is made available and benchmarks are added, I am willing to improve my score and recommend the paper for publication at NeurIPS. UPDATE POSTREBUTTAL: The code is now made available. While the originality of the contribution is somewhat limited, the preliminary benchmarks suggest that it might be a useful contribtion to the spiking network community.

Strengths

* The manuscript is written clearly. * The manuscript is relevant for both the 'spiking machine learning' community (with the ML tasks) and the neuroscience community with the neuron-fitting examples. * The implementation might be helpful for the community, as this trick seems not to be widely used yet. * figure 4.2 is great

Weaknesses

* The core idea seems not to be new: As described above, the idea to parallelize the time of the ARP was used by other simulators (e.g. the NEST simulator for MPI parallelization as described here: https://nest-simulator.readthedocs.io/en/v2.20.0/guides/running_simulations.html). It would be crucial to cite this previous work and/or describe what is new/different here. * The NEST parallelization seems to scale close to linear, thus the presented manuscript might even be not state of the art. * For the fitting of neuron models, ALIF is not state of the art (see for example Pozzorini et al. for a more recent benchmark of fitting different neuron models 2015 https://doi.org/10.1371/journal.pcbi.1004275). Currently, the manuscript claims "ALIF neurons have been shown to accurately fit real neural recordings." in line 32, and cites a paper from 2008 that is not state-of-the-art. Please reference a more recent paper and mention the caveat that the ALIF is not state-of-the art for fitting neuronal dynamics. * The notation O(T) compared to (T/T_R) slightly confusing. It seems to compare quantities with different units (assuming T and T_R have units of time). Does the speedup not also depend on DT? After reading more carefully, I guess what you actually want to claim is that the computational costs scale proportional to T and that during blocks of size T_R/DT no communication between threads has to occur which can lead to a theoretical maximal speedup of min(N_threads,T_R/DT) where is the number of parallel threads of the GPU or CPU. Minor issues: fix latex of N^in

Questions

* How does the speedup depend on the number of parallel threads and on dt? * Put the value of ARF in the caption of Figure 4a. Was it 100 steps, so 10 ms?? How biologically realistic is an ART of 10ms? * * Figure 4.3 time axis labels missing! Can you put a zoomed-in version in the supplement with finer time-axis so the artifacts introduced by large ART are easier to see? * Figure 5c: does ETV stand for? Please write in the caption, it is only defined in the supplement. * figure 5d: What is ETV for Dt=0.05ms? Maybe you have even better performance (and better speedup according to the reasoning above) for smaller dt? ;) * Why in 5f is blocks better than standard? shouldn't they be the same? * 5e: What happens for shorter ARP?

Rating

5: Borderline accept: Technically solid paper where reasons to accept outweigh reasons to reject, e.g., limited evaluation. Please use sparingly.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

3 good

Presentation

4 excellent

Contribution

2 fair

Limitations

* No code is provided, therefore the numerical results are unfortunately not reproducible. Also, the code will make the submission substantially more useful for the community. If code is provided during the review, I will reconsider my score. * ALIF is not state-of-the-art (see above). * using ARP for parallelization speedup is not strictly new (see above)

Area Chair JUfv2023-08-18

Code

Dear reviewer, the authors shared the code at an anonymized GitHub repository: Link to anonymized Github repo: https://github.com/webstorms/Blocks Best regards, The area chair

Reviewer x3Zh7/10 · confidence 3/52023-07-12

Summary

The authors implement an adaptive leaky integrate-and-fire model in a parallelized way on GPUs by incorporating a fixed refractory period that enables a window of time (‘block’) to be processed in one go. This accelerates the inference and training of spiking neuron models, while retaining accuracy, as shown by the authors.

Strengths

The authors provide an impressive array of results for speedups for training and inference of spiking neural networks (SNNs) and real neural recordings. The accuracy does not seem to decrease although a refractory period is introduced. This may have great implications for future inference of SNNs. The paper on the whole is written clearly.

Weaknesses

It is unclear why the accuracy does not go down in the empirical results presented. If the input signal is not being integrated in the case of the refractory period, then that part of the signal is forever lost. This should naturally lead to a decrease in accuracy by the network. Please elaborate why this is not happening. Is this something specific to the tasks that you are performing, and how is the accuracy impacted in general? Simple simulations with a couple of neurons may help here, while varying the ARP. This may also give some intuition as to how to pick this number to minimize loss of accuracy while still obtaining speedups.

Questions

See ‘Weaknesses’.

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

2 fair

Presentation

3 good

Contribution

3 good

Limitations

The limitations are adequately discussed.

Reviewer gA8o7/10 · confidence 4/52023-07-28

Summary

Spiking neural networks can be computationally expensive to implement because of their history dependence. However, spikes can't occur at any time whatsoever; instead, after spiking, there is a refractory period during which they cannot spike again. While this period is ~1-2ms, to attain precise dynamical inferences the typical time step is ~0.1ms. The authors leverage the former fact, creating a block design, each block length equaling 1 ARP, to substantially reduce the number of required sequential simulation steps while maintaining generally high performance on both ML and neural-fitting tasks.

Strengths

This appears to be an important and very simple pragmatic algorithm that can benefit the field by greatly reducing SNN simulation times. The general presentation is clear.

Weaknesses

Minor: Fig 5: b) A timescale bar is needed, as is the ARP used. Given that there is very little performance change with DT=0.1ms, ARP=8ms (e), it would be helpful to visualize this here as well d-f) Bar graphs that do not go to zero and have no broken axis can lead to confusion. One or the other should be done. I also would advocate for reversing the ordering: f, e, d. f and e are the most compelling graphs, and f (left) provides an excellent overview comparison to begin with. d, while relevant, is also not surprising and could be better left as a final, expected finding. Wording: Lines 266 and 270, "computational neuroscientists" and "biologists." I understand where the authors are coming from; however, both are of interest to computational neuroscientists (who might do theory, computational studies, and/or data analysis), while "biologists" is overly broad. I would suggest simply indicating that both are of interest to computational and experimental neuroscientists, or to change "biologists" to "computational and experimental neuroscientists". Line 290: I'm not sure this is a fair characterization of your impressive findings in Fig 5e. The larger ARPs had little performance effect in that particular figure, while larger DTs had a large effect.

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

4 excellent

Presentation

3 good

Contribution

4 excellent

Limitations

Y

Reviewer 9z9h2023-08-14

acknowledgement of rebuttal // final question

The detailed responses are appreciated. * Code Availability: The reviewer has not been able to access the provided code. It is recommended that the area chair be contacted to ensure the code is made available for review. * Parallelization of ARP: The differentiation from the NEST simulator is appreciated. It is essential that the NEST algorithm is cited appropriately in the manuscript. * State of the Art: Reservations remain due to the absence of benchmarking against other spiking network simulators and AD implementations. However, the benefit of the doubt is given. A more detailed implementation and benchmarking would enhance the manuscript's strength. * Neuron Model Fitting: The absence of ALIF in Pozzorini is noted. For points 5 to 11, the clarifications and additional experiments conducted have addressed the concerns. Computational Graph Differences: The rebuttal mentions potential differences in the computational graphs between methods, leading to different gradients. An elaboration on the specific differences in the computational graph would be beneficial. In conclusion, while there are a few remaining reservations, significant efforts have been made to address the majority of the concerns raised.

Authorsrebuttal2023-08-15

Thank you for your response. We have reminded the area chair to share the code with you and the other reviewers. We now cite the NEST framework and key papers (Morrison et al., 2005; 2007) in the related work section of the paper. PyTorch - the machine learning framework we used - creates a computational graph for a given model, where every node therein contains one mathematical expression of the model. These graphs are then used to automatically calculate the gradients in a model with respect to a given loss function. Although the standard model (Section 2) and our model (Section 3) implement exactly the same ALIF dynamics, they are composed of different mathematical expressions (contrast standard Equations 1-5 with our block equations 6 onwards), which thus results in different computational graphs and potentially slightly different gradients. However, graph differences have little or no effect on the trained model, as evidenced by the block and the standard models having very similar performance scores (original Figure 5f). We thank you again for your readiness to raise your score and to recommend the paper for publication at NeurIPS. We hope our clarifications and further experiments are sufficient to merit a score raise.

Authorsrebuttal2023-08-20

Dear reviewer, with the discussion period coming to an end, we hope we were able to address your remaining reservations, and hopefully with access to our code, you are now willing to recommend the paper for publication. We thank you for your time.

Reviewer 9z9h2023-08-21

acknowledgement of code // reservations persist

I acknowledge that the code is now made public. After briefly inspecting the code, my reservations persist: * The idea to parallelize the time of the ARP is not new and is already being used for many years. Even if details of the implementation are different, the overall idea is the same. Thus, my reservations regarding originality persist. The fact that the authors now used the established trick also in the backward pass using automatic differentiation is for me not a major conceptual innovation. * Benchmarks missing: It still remains unclear if the methods is actually competitive to other implementations both for the forward pass and for training (backward pass). Without comparison to existing implementations (e.g. Norse (https://github.com/norse/norse) or GeNN (https://github.com/genn-team/genn) or SpikingJelly (https://github.com/fangwei123456/spikingjelly), the practical relevance of the suggested method remains unclear. Benchmarking would enhance the manuscript's strength.

Authorsrebuttal2023-08-21

Unfortunately, we were unable to find any technical reports detailing the use of the ARP to speedup SNN simulation and training on GPUs. Our method runs considerably faster than the Norse and SpikingJelly implementations which you have listed (we did not have time to run GeNN as this requires a long list of installation steps). We benchmarked a simple one layer SNN network of 100 units on the forward pass, over 1000 simulation steps with 200 input units (with a batch size of 128), and obtained the following results: Norse: 0.30s SpikingJelly: 0.18s Standard SNN (our implementation): 0.33s Blocks (our model – using 50 steps for ARP): 0.016s As expected, we found the Norse and SpikingJelly to obtain a similar time to our standard SNN implementation, with the SpikingJelly running slightly faster (as they are all governed by the same sequential time complexity), whereas our Blocks model runs over an order of magnitude faster. You can find a notebook of the results, with the code, on the original link posted.

Reviewer 9z9h2023-08-22

acknowledgement of code and benchmark

Thank you for the detailed explanation, code and benchmarks! Based on the authors' recent experiments and additional clarifications, I'm pleased to adjust my rating!

Reviewer x3Zh2023-08-14

Response to rebuttal

Thanks for the clarification! I am happy to increase my rating based on the authors' new experiments and clarifications. Useful paper!

Reviewer Fo7F2023-08-14

Thanks for the reviewers' response. Most of my concerns has been adequately addressed, especially related to overall improvement of speed without significant sacrifice in accuracy, robustness of hyperparameters on accuracy. Future extensions to more recent or other variants of spiking-models would still be valuable. Therefore, I changed my score to borderline accept accordingly.

Authorsrebuttal2023-08-15

Reminder to AC to share code

Dear AC, reviewer 9z9h has not been able to access the provided code. Could we please request for this to be made available? Thank you.

Reviewer gA8o2023-08-21

Thank you for addressing the minor comments I had. My score remains a 7.

Program Chairsdecision2023-09-21

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC