A neuron on the GPU, checked spike by spike against NEURON
A detailed layer 5 pyramidal cell, solved in the browser using 32-bit arithmetic on two graphics processors, passes every comparison in two tests against NEURON's 64-bit simulation.
in development · simulated
NEURON is a widely used simulator for detailed neuron models. Our Sim Lab also solves these models on a graphics processor, using 32-bit arithmetic. We compare the simulated voltages and spike times with NEURON's on fixed experiments. The allowed differences account for numerical rounding; six were loosened after examining these same GPU runs.
Under a 1 nA current step, Hay's layer 5 pyramidal cell fires four fast spikes, then a calcium spike in its apical dendrite. Our solver puts that calcium spike within 2 µs of NEURON's. Under backward Euler at 25 µs, NEURON's default fixed step and our solver's method until version 0.2.0, NEURON never fires that calcium spike.
The figure shows the earlier GPU run of the current-step test; the scores here apply the revised tolerances to those same values. The film records a 1 nA somatic step using the 64-bit CPU solver, which also runs the linked single-cell demo. A separate link opens the GPU column scene.
Explore the demo

This experiment needs WebGPU; the figure above shows the same step, solved on the GPU, against NEURON.
The result
Hay's cell passes on all tested CPU and GPU runs: 32 of 32 metrics under a current step, 71 of 71 under synaptic input.
- The float32 WebGPU solver passes all 32 metrics of the current-step case and all 71 of the synaptic case, on an NVIDIA A40 and an Apple M1 Max.
- The calcium spike lands 1.9 µs from NEURON's on the A40; under backward Euler at 25 µs, NEURON's default fixed step, NEURON never fires it.
- NEURON's neighbouring methods, finer Crank–Nicolson steps and CVODE, fail 16 of the current-step case's metrics and 34 of the synaptic case's.
- Four Allen Institute cells pass all 69 metrics of their case in 64-bit on three hosts; they have no 32-bit GPU solver yet.
- The first Allen browser run stopped on a file-URL error before producing a candidate. After the driver was corrected, all three hosts were run.
The GPU runs on an NVIDIA A40 and an Apple M1 Max, and the 64-bit CPU runs on three hosts, all pass every metric and every reference check. The cases are tight enough to tell methods apart: NEURON's own neighbouring methods fail 16 of the current-step case's metrics and 34 of the synaptic case's. These scores re-use the previous version's runs, which are bit-identical on each host; six tolerances were loosened after checking them against these same GPUs, so this is not yet an independent GPU test at the new tolerances.
Checks that passed
- Current-step case, GPU (A40, M1 Max)
- 32 of 32 metrics · each within its float32 tolerance · Closest: the calcium spike's time, 1.93 µs (A40) and 1.90 µs (M1 Max) of an 8.45 µs tolerance.
- Synaptic case, GPU (A40, M1 Max)
- 71 of 71 metrics · each within its float32 tolerance · Closest: a quiet tuft voltage, 0.0057 of 0.022 mV.
- Both cases, 64-bit CPU (three hosts)
- all metrics · same tolerances · Uses under 0.01 % of each tolerance.
- The case tells methods apart
- NEURON's neighbouring methods fail 16 and 34 metrics · must fail other methods
- Allen cells, 64-bit CPU (three hosts)
- 69 of 69 metrics · float32-sized tolerances
All listed result checks passed.
Methods
simulated
Hay et al. 2011's layer 5b pyramidal cell (ModelDB 139653) with a myelinated axon after Mainen and Sejnowski 1996, solved by Crank–Nicolson at 12.5 µs in WebGPU float32 and in 64-bit CPU code, scored against NEURON 9.0.2 with the same method on a current-step case (32 metrics) and a synaptic case (104 synapses, 71 metrics); Allen Cell Types all-active models of four cells on a step case (69 metrics)
Simulated neurons, scored against NEURON's simulation, not against recordings. The accuracy of the 12.5 µs step itself is a separate convergence study.
Sources
- Hay et al. (2011), PLoS Comput Biol 7:e1002107; ModelDB 139653 · published model
- Mainen and Sejnowski (1996), Nature 382:363–366, myelinated axon · published model
- NEURON 9.0.2 · BSD-3-Clause
- Allen Cell Types Database (Gouwens et al. 2018) · Allen Institute terms of use
- Carter et al. (2012), Neuron 75:1081–1093, NaV Markov scheme (Allen cells) · published model
Credits
- Hay, Hill, Schürmann, Markram and Segev · layer 5 pyramidal cell model
- Mainen and Sejnowski · myelinated axon model
- NEURON (Hines and Carnevale) · reference simulator
- Allen Institute for Brain Science · Allen Cell Types models
- Carter, Giessel, Sabatini and Bean · sodium channel scheme in the Allen models
Watch the GPU solver run a column of these cells The calcium spike against NEURON Synaptic volleys against NEURON