Chapter 10 · Circuits
Physical units and biology
Every input so far has added a fixed current. A real synapse opens channels, and what flows through them depends on the membrane's own voltage. This chapter puts in the conductances, the receptors and the channels that make a spike, and shows what each one changes.
A synapse is a door, not a pump
Since chapter 1, every input has added a fixed current, like a pump that pushes the same charge whatever the membrane is doing. A real synapse is closer to a door. Transmitter opens channels that let certain ions through, and the ions flow down their gradient. The flow stops at the channel’s reversal potential, where the electrical pull on the ions balances the difference in their concentration, and it reverses beyond it.
So the current through a synapse depends on where the membrane is. An excitatory channel that reverses at 0 mV pushes hard on a membrane at −80 mV and not at all on one at 0 mV. An inhibitory channel that reverses at −80 mV pulls a membrane at −50 mV down and leaves one at −80 mV where it is. sparx reads AMPA and NMDA receptors, the fast and slow excitatory ones, against 0 mV, and GABA-A receptors, the fast inhibitory ones, against −80 mV, the values of Brette et al.’s simulator benchmarks.
The membrane with conductances
Chapter 2’s membrane gains one term per receptor. Each conductance , in nS, jumps by its synapse’s weight when a spike arrives and decays with its own time constant, and passes the current :
Collect the terms in and the equation is chapter 2’s again:
The membrane still relaxes exponentially, with two differences. Its target is an average of the reversal potentials, weighted by how open each channel is. And its time constant is , so the more channels are open, the faster it forgets. sparx holds each conductance at its exact average over the step and then solves the membrane exactly, as chapter 2 did with a held current.
Held at different potentials
Here are three copies of chapter 2’s membrane: 200 pF, a 10 nS leak, rest at −60 mV. Spiking is switched off, as an experimenter switches it off with the sodium-channel blocker TTX, and a current holds all three at the same potential. Every 150 ms each receives one input. The first is a current that peaks at 180 pA. The second is 3 nS of AMPA conductance, which at −60 mV, 60 mV from its reversal potential, also passes 180 pA at its peak. The third is 3 nS of GABA-A. Each trace is drawn as its change from the held potential.
Peak change: 180 pA current … · 3 nS AMPA … ·3 nS GABA-A … · membrane time constant 20.0 ms
Move the held potential. The current input lifts the membrane by 2.83 mV wherever it is held. The AMPA input lifts it by 3.67 mV at −80 mV, by 1.84 mV at −40 mV, and not at all at 0 mV. The GABA-A input does nothing at −80 mV and pulls harder the higher the membrane sits: 0.92 mV at −60 mV, 1.84 mV at −40 mV. Each conductance input is proportional to the distance from its reversal potential.
Now add background inhibition: a steady GABA-A conductance, like the one that ongoing activity in a living cortex provides. In anesthetized cats, during network activity like that of the waking state, Destexhe and Paré found that synaptic input lowered pyramidal neurons’ input resistance about fivefold. A 40 nS background does that here, and the membrane’s time constant falls from 20 ms to 4 ms. Every input shrinks to about half, the current one included: 1.47 mV instead of 2.83, 1.45 mV instead of 2.75 for AMPA, and −0.48 mV instead of −0.92 for GABA-A. The charge an input brings now leaks out within a few milliseconds, before much of it has built up, and each input is over sooner. Inhibition that barely moves the voltage but divides every other input is called shunting.
import jaximport jax.numpy as jnp
import sparxfrom sparx.dynamics import ( Arrivals, Exponential, LeakyIntegrateAndFire, PointNeuron, Receptor,)
jax.config.update("jax_enable_x64", True)dt, steps, arrive = 0.1, 5000, 4000 # one input at 400 ms
def psp(receptor, kind, weight, held): """The input's peak effect (mV) on a membrane held at `held`.""" cell = PointNeuron(LeakyIntegrateAndFire(v_th=jnp.inf), # no spikes {receptor: Receptor(Exponential(5.0), kind)}) current = jnp.full((steps,), 10.0 * (held + 60.0)) # g_L is 10 nS spikes = jnp.zeros(steps).at[arrive].set(weight) (_, v), _ = sparx.run(cell, Arrivals(current, {receptor: spikes}), dt=dt, record=lambda s: s.neuron.v) change = v[arrive:] - v[arrive - 1] peak = float(change[jnp.argmax(jnp.abs(change))]) return round(peak, 2) + 0.0 # no -0.00
# 3 nS of AMPA at rest, 60 mV from its reversal, passes 180 pA.for held in (-80.0, -60.0, -40.0, -20.0, 0.0): current = psp("ex", "current", 180.0, held) ampa = psp("ampa", "conductance", 3.0, held) gaba = psp("gaba_a", "conductance", 3.0, held) print(f"held at {held:3.0f} mV: 180 pA {current:+.2f} mV," f" AMPA {ampa:+.2f} mV, GABA-A {gaba:+.2f} mV")PointNeuron puts a neuron model together with the synapses onto it, by receptor name. Receptor(Exponential(5.0), "conductance") makes a synapse that decays in 5 ms and acts as a conductance, read against the reversal potential the neuron keeps for that name. The run prints the numbers above:
held at -80 mV: 180 pA +2.83 mV, AMPA +3.67 mV, GABA-A +0.00 mVheld at -60 mV: 180 pA +2.83 mV, AMPA +2.75 mV, GABA-A -0.92 mVheld at -40 mV: 180 pA +2.83 mV, AMPA +1.84 mV, GABA-A -1.84 mVheld at -20 mV: 180 pA +2.83 mV, AMPA +0.92 mV, GABA-A -2.75 mVheld at 0 mV: 180 pA +2.83 mV, AMPA +0.00 mV, GABA-A -3.67 mVAt −60 mV the AMPA input lifts the membrane by 2.75 mV, a little less than the current’s 2.83 mV, because as the membrane rises its distance from 0 mV shrinks.
NMDA: a receptor that needs two signals
Glutamate opens a second receptor beside AMPA. The NMDA receptor’s channel also reverses near 0 mV, but at negative potentials magnesium ions from outside the cell are drawn into its pore and block it (Mayer, Westbrook and Guthrie; Nowak et al., both 1984). Jahr and Stevens fitted the fraction of channels left unblocked at a magnesium concentration in mM and a membrane potential in mV:
Between −80 mV and about −27 mV, depolarizing the membrane increases the NMDA current, though the distance from its reversal potential falls. So the receptor passes current only when glutamate has bound and the membrane is already depolarized, by other inputs or by the neuron’s own spike. It signals that a neuron’s input and its activity coincided, the coincidence chapter 7’s STDP rewards. sparx gates any receptor named nmda by MgBlock(), 1 mM by default, at the voltage at the start of each step.
Where the spike comes from
Every neuron so far has had a threshold written into it. Real neurons have none. Their spike comes from two more conductances, sodium and potassium, which open and close with the voltage. Hodgkin and Huxley measured them in the squid’s giant axon and wrote them down in 1952:
Each gate is the fraction of its subunits in the open position, and its rates and depend on the voltage. Sodium’s activation is fast and opens as the membrane depolarizes. Sodium’s inactivation and potassium’s activation are slow: closes with depolarization and opens. A small depolarization opens a few sodium channels, sodium flows in, the membrane depolarizes further, and more channels open: a runaway toward sodium’s reversal potential at +50 mV. Then shuts the sodium channels while opens potassium’s, and the membrane is pulled back down toward potassium’s reversal potential at −77 mV, below where it started.
sodium · potassium conductance · 100 pF · dt 0.1 ms in substeps of 0.01 ms · …
Watch a spike unfold. The sodium conductance, orange, rises first, to about 2,200 nS at 800 pA. The potassium conductance, violet, rises after it to about 1,200 nS and outlasts it, and the membrane undershoots to −75 mV before it recovers.
Then lower the current, 10 pA at a time. The neuron keeps firing down to 630 pA, at about 50 Hz, and at 620 pA it stops. From rest the boundary is the same: press “Start from rest” at 620 pA and it fires three spikes and falls silent, at 630 pA it fires steadily at 52 Hz. But a run that raises the current slowly from rest, 10 pA every 200 ms, does not start firing until 1,040 pA. Between 630 and 1,040 pA the neuron can rest or fire, depending on how it got there: a sudden step throws it into firing, and a slow ramp does not.
import jaximport jax.numpy as jnp
import sparxfrom sparx.dynamics import HodgkinHuxley, SynapticInput
jax.config.update("jax_enable_x64", True)cell = HodgkinHuxley() # NEST's hh_psc_alpha, 100 pFdt, steps = 0.1, 20_000 # 2 s
def rate(pA): """Spikes per second over the last second of a constant current.""" out, _ = sparx.run(cell, SynapticInput(jnp.full((steps,), pA)), dt=dt) return out.value[steps // 2:].sum()
currents = jnp.arange(0.0, 1501.0, 50.0)for i, r in zip(currents, jax.vmap(rate)(currents), strict=True): print(f"{int(i):5d} pA: {int(r):3d} Hz")Each current is a step from rest, and the rate is counted over the second second. Up to 600 pA it is 0 Hz. At 650 pA it is 55 Hz, and it rises only to 79 Hz at 1,500 pA. Chapter 3’s leaky integrate-and-fire neuron starts at 0 Hz at its rheobase and fires as slowly as you like just above it. Hodgkin and Huxley’s never fired steadily below 50 Hz in these runs.
sparx’s HodgkinHuxley uses NEST’s hh_psc_alpha parameters, for a 100 pF membrane. It steps in substeps of 0.01 ms, and in each it solves the gates with the voltage held and the voltage with the gates held, each exactly. Chapter 11 looks at why that matters.
Simpler neurons that keep what matters
Hodgkin and Huxley’s equations cost about a hundred times what chapter 3’s Izhikevich neuron does. Brette and Gerstner’s adaptive exponential integrate-and-fire neuron, AdEx, keeps the start of the sodium runaway as an exponential term and folds the slow currents into one adaptation current :
At each spike resets and grows by . Fitted to a detailed conductance-based model, it predicted 96% of that model’s spikes within 2 ms. Naud et al. gave parameters for eight firing patterns, from tonic spiking to bursts to chaos. sparx’s AdEx fires seven of them within 0.8 ms of NEST’s spikes over 500 ms, and the eighth, which is chaotic, irregularly, as NEST does.
From parts to circuits
Chapter 9 wired neurons at random. Real circuits are wired by measurement. Potjans and Diesmann built 1 mm² of cortex from anatomical and physiological data: 77,169 neurons in eight populations, an excitatory and an inhibitory one in each of four layers, joined by about 0.3 billion synapses with connection probabilities measured for each pair of populations. sparx.graph.models.microcircuit builds it. At a fifth of its size, 15,435 neurons and 12 million synapses, sparx and NEST fire the same 12,689 spikes in its first 300 ms, in float64, when NEST is given the network sparx draws, edge by edge. The fly brain of chapter 9 goes further: its wiring is FlyWire’s, a whole adult fly brain reconstructed synapse by synapse from electron microscope images.
Try this
- At what held potential does the GABA-A input do nothing? Why does that make it different from a negative current?
- Hold the membrane at −60 mV and raise the background to 40 nS. By what factor does the time constant fall? Why does the current input shrink, when nothing about it changed?
- With 1 mM of magnesium, what fraction of NMDA channels conduct at −80 mV? What would a neuron at rest need before its NMDA synapses matter?
- In the Hodgkin-Huxley figure, set 620 pA and press “Start from rest”, then do the same at 630 pA. What changes? Can you find a current at which it fires steadily at 10 Hz?
Answers
- At −80 mV, its reversal potential, where no current flows through the open channels. A negative current would pull the membrane down at any potential; the conductance pulls it toward −80 mV, so above −80 mV it inhibits and below it, it excites.
- Five times, from ms to ms. The current input injects the same charge, but the membrane now has five times the conductance to lose it through, so the charge leaves while it is still arriving and the peak is about half as high, 1.47 mV instead of 2.83.
- 2.4%, . Depolarization, from other inputs or its own spike: at −40 mV nearly a quarter of the channels conduct.
- At 620 pA it fires three spikes and stops; at 630 pA it fires steadily at about 52 Hz. No current gives 10 Hz. Its rhythm is set by how fast its channels open and close after a spike, not by how long the input takes to charge the membrane, so firing starts near that rhythm. A leaky integrate-and-fire neuron’s interval is the time its input takes to charge the membrane to threshold, which grows without limit as the current falls to the rheobase.
Summary
A synapse opens channels, and its current depends on how far the membrane is from their reversal potential: excitation weakens as the membrane depolarizes, inhibition near its reversal potential divides rather than subtracts, and NMDA receptors conduct only on a depolarized membrane. The spike itself is two voltage-gated conductances, sodium then potassium, which AdEx reduces to an exponential term and one adaptation current. The next chapter asks how a simulator steps all of this through time, and how to tell whether two simulators agree.
References
- A. L. Hodgkin and A. F. Huxley, “A quantitative description of membrane current and its application to conduction and excitation in nerve”, The Journal of Physiology 117, 1952, doi:10.1113/jphysiol.1952.sp004764.
- M. L. Mayer, G. L. Westbrook and P. B. Guthrie, “Voltage-dependent block by Mg2+ of NMDA responses in spinal cord neurones”, Nature 309, 1984, doi:10.1038/309261a0.
- L. Nowak, P. Bregestovski, P. Ascher, A. Herbet and A. Prochiantz, “Magnesium gates glutamate-activated channels in mouse central neurones”, Nature 307, 1984, doi:10.1038/307462a0.
- C. E. Jahr and C. F. Stevens, “Voltage dependence of NMDA-activated macroscopic conductances predicted by single-channel kinetics”, Journal of Neuroscience 10, 1990, doi:10.1523/JNEUROSCI.10-09-03178.1990. Equation 5.
- A. Destexhe and D. Paré, “Impact of network activity on the integrative properties of neocortical pyramidal neurons in vivo”, Journal of Neurophysiology 81, 1999, doi:10.1152/jn.1999.81.4.1531.
- R. Brette and W. Gerstner, “Adaptive exponential integrate-and-fire model as an effective description of neuronal activity”, Journal of Neurophysiology 94, 2005, doi:10.1152/jn.00686.2005.
- R. Naud, N. Marcille, C. Clopath and W. Gerstner, “Firing patterns in the adaptive exponential integrate-and-fire model”, Biological Cybernetics 99, 2008, doi:10.1007/s00422-008-0264-7.
- R. Brette et al., “Simulation of networks of spiking neurons: a review of tools and strategies”, Journal of Computational Neuroscience 23, 2007, doi:10.1007/s10827-007-0038-6.
- T. C. Potjans and M. Diesmann, “The cell-type specific cortical microcircuit: relating structure and activity in a full-scale spiking network model”, Cerebral Cortex 24, 2014, doi:10.1093/cercor/bhs358.
- S. Dorkenwald et al., “Neuronal wiring diagram of an adult brain”, Nature 634, 2024, doi:10.1038/s41586-024-07558-y.