You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PyNN's multicompartment (MC) backends discretise neurites with different, hardcoded, non-user-configurable rules. As a result the same standard model can produce different results on different backends.
Evidence
Running examples/mc/current_injection_mc.py on NEURON and Arbor: the soma-voltage and gating-variable panels overlay closely (< 0.06 mV RMS), but the dendrite-voltage panel differs by ~0.44 mV RMS. The difference is purely spatial discretisation: the soma is a single isopotential compartment in both, so it matches; the extended dendrite is not.
backend
soma
500 µm dendrite
rule
NEURON
1 seg
29 segs
d_lambda 0.1 @ 100 Hz (pyNN/neuron/cells.py)
Arbor
1 CV
~50 CVs
cv_policy_max_extent(10 µm) (pyNN/arbor/cells.py)
Neither rule is exposed to the user, and the two are neither matched to each other nor fully converged. A quick Arbor CV sweep shows the dendrite trace is converged by ~3 µm; the 10 µm default is ~0.25 mV off, and NEURON's d_lambda result sits a further ~0.2 mV from the converged solution.
Design direction
The MC API intentionally abstracts discretisation away from the user (doc/mc_api.txt: "hides details of the spatial discretization"), so the aim is an optional refinement knob with a matched, sensible default, expressed in backend-neutral terms and resolved to each simulator's native mechanism, mirroring how PyNN already handles ion-channel distributions and region selectors.
with a small family of backend-neutral specs (e.g. max compartment length, compartments per section, single compartment, d_lambda), each mapping to NEURON nseg and Arbor cv_policy.
Open questions for discussion
Default rule Geometric max-length (simple and predictable, but over-refines short thick sections such as the soma) vs d_lambda (biophysically adaptive, keeps NEURON's current behaviour, but Arbor has no native d_lambda and would need to emulate it)?
Spec family Which discretisation specs should we support initially?
d_lambda on Arbor Arbor has no native d_lambda policy and there is a long-standing open request for one (d-lambda CV policy arbor-sim/arbor#1546, help wanted, unscheduled), so PyNN would have to emulate it. Emulate faithfully via explicit CV boundaries computed by PyNN (mirroring NEURON's equal branch division), or approximate with a region-scoped max-extent? (Note d-lambda CV policy arbor-sim/arbor#1546 discusses a heterogeneity-aware variant that would not match NEURON's equal division.)
Placement A MultiCompartmentNeuron parameter, a setup() global default, or both?
Granularity Whole-cell only, or per-region ({region: spec}) using the existing region-filter machinery (MorphologyFilter / Morphology.section_groups)?
Backwards-compatibility — changing NEURON's default away from d_lambda is a behaviour change; acceptable given MC support is currently flagged experimental?
Compare current_injection_mc_neuron.png and current_injection_mc_arbor.png: panels 1/3/4/5 overlay; panel 2 (dendrite Vm) diverges. Recording v at soma and dendrite on both backends and taking the RMS difference on a common time grid gives the ~0.44 mV figure above.
Summary
PyNN's multicompartment (MC) backends discretise neurites with different, hardcoded, non-user-configurable rules. As a result the same standard model can produce different results on different backends.
Evidence
Running
examples/mc/current_injection_mc.pyon NEURON and Arbor: the soma-voltage and gating-variable panels overlay closely (< 0.06 mV RMS), but the dendrite-voltage panel differs by ~0.44 mV RMS. The difference is purely spatial discretisation: the soma is a single isopotential compartment in both, so it matches; the extended dendrite is not.pyNN/neuron/cells.py)cv_policy_max_extent(10 µm)(pyNN/arbor/cells.py)Neither rule is exposed to the user, and the two are neither matched to each other nor fully converged. A quick Arbor CV sweep shows the dendrite trace is converged by ~3 µm; the 10 µm default is ~0.25 mV off, and NEURON's d_lambda result sits a further ~0.2 mV from the converged solution.
Design direction
The MC API intentionally abstracts discretisation away from the user (
doc/mc_api.txt: "hides details of the spatial discretization"), so the aim is an optional refinement knob with a matched, sensible default, expressed in backend-neutral terms and resolved to each simulator's native mechanism, mirroring how PyNN already handles ion-channel distributions and region selectors.Illustrative sketch:
with a small family of backend-neutral specs (e.g. max compartment length, compartments per section, single compartment, d_lambda), each mapping to NEURON
nsegand Arborcv_policy.Open questions for discussion
help wanted, unscheduled), so PyNN would have to emulate it. Emulate faithfully via explicit CV boundaries computed by PyNN (mirroring NEURON's equal branch division), or approximate with a region-scoped max-extent? (Note d-lambda CV policy arbor-sim/arbor#1546 discusses a heterogeneity-aware variant that would not match NEURON's equal division.)MultiCompartmentNeuronparameter, asetup()global default, or both?{region: spec}) using the existing region-filter machinery (MorphologyFilter/Morphology.section_groups)?Reproduction
Compare
current_injection_mc_neuron.pngandcurrent_injection_mc_arbor.png: panels 1/3/4/5 overlay; panel 2 (dendrite Vm) diverges. Recordingvat soma and dendrite on both backends and taking the RMS difference on a common time grid gives the ~0.44 mV figure above.