Sim Lab ·

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

Two panels of voltage traces: at the soma, four fast spikes then a pause; in the apical dendrite, a calcium spike. The GPU's dashed orange trace lies on NEURON's black one; NEURON's older method, in grey, misses the calcium spike.

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 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

Credits