15.5 Reaction–Diffusion & Turing Patterns ended on a promise: a fast voltage variable and a slow recovery variable, diffusing in space, turn a front into a travelling pulse. This lesson builds the neuron versions of that pair. We start with the cheapest spiking model (a leaky capacitor with a reset), then the 1952 Hodgkin-Huxley equations, then the two-variable cartoon that lets us draw everything in a phase plane. The Hopf bifurcation we met in 15.4 Chemical Kinetics & Stiff Systems returns as the switch from silence to repetitive firing, and the cable equation gives the pulse a speed that we can measure.
Transcript
- The last lesson promised a pulse. A membrane is a capacitor with ion channels, C dV dt equals I minus I ion, and a single linear leak only relaxes, it never spikes. A fast voltage and a slow recovery, diffusing in space, should turn a front into a travelling pulse. So we need reaction terms: the cheapest spiking rule, the 1952 Hodgkin and Huxley equations, then a two variable cartoon we can draw in a plane. Each is a choice of I ion.
- Leaky integrate and fire keeps the leak and adds a rule: at threshold, spike and reset. The steady voltage is E L plus R I, so below the threshold current of 1.5 nanoamps it never fires. Above it, the exact solution reaches threshold at tau log of V infinity minus reset over V infinity minus threshold. At 2 nanoamps that is 13.86 milliseconds, 72.13 hertz, or 63.04 with a 2 millisecond refractory time. The rate rises continuously from zero, so arbitrarily slow firing is possible. The next model will not do this.
- Hodgkin and Huxley fitted three gates to the squid axon: sodium opens fast with m, inactivates slowly with h, and potassium opens slowly with n. Rest sits at minus 64.996 millivolts. A kick of 6.5 dies away, peaking at minus 56.0; a kick of 7 fires a spike to 37.1. The threshold is 6.505: all or none. A 10 millivolt kick peaks at 39.4 after 1.78 milliseconds, then undershoots to minus 76.2, near E K. For about 5 milliseconds a second kick cannot fire: it needs 46.5 at 6, 27 at 8, 17 at 10, 7 at 15, and 6 at 20.
- Now hold a current on. The rheobase is 2.240: one spike, then silence. Repetitive firing needs more. At I equal 6.2 the rate is zero; at 6.3 it is 52.37 hertz, and it cannot be slower. That is the class two onset, unlike integrate and fire. Beyond, 7 gives 58.33, 10 gives 68.32, and 20 gives 86.47. The Jacobian's leading pair crosses the imaginary axis at 9.7754, a Hopf bifurcation. But a spike train exists below it, down to 6.260, so rest and firing coexist and the Hopf looks subcritical. That last part is my inference.
- FitzHugh and Nagumo built a caricature: a fast cubic v and a slow linear recovery w. The v nullcline is a cubic, the w nullcline a line, and they cross at the rest point, minus 1.1994, minus 0.6243. Trace minus 0.5026 and determinant 0.1081 make a stable spiral. A kick of 0.5 peaks at minus 0.670 and dies; 0.6 peaks at 1.714 and fires. Bisection puts the threshold at 0.5555, a little right of the unstable middle root, minus 0.7863. Past it, v runs to the right branch, then w rises and returns.
- Linearise: the trace is 1 minus v star squared minus epsilon b, zero at v star squared equal 0.936. That gives two Hopf currents, 0.33128 and 1.41872, and between them the rest point is unstable and the system fires periodically. At I equal 0.5, 1.0 and 1.4 the amplitude is 3.82, 3.84 and 3.78, with periods 39.47, 36.70 and 45.61. A small Hopf oscillation would have period 22.8, but at 0.34 the sim shows 46.79: the full cycle appears almost at once. It even survives down to 0.3242.
- Current also flows sideways. The cable equation makes voltage diffuse with D equal r over 2 R i C, while the channels react: exactly last lesson's form, with only v diffusing. Start FitzHugh and Nagumo with v equal 2 on the left. A pulse forms and runs right, shape unchanged, at speed 0.803. Quadrupling D gives 1.617, a ratio of 2.01: speed goes as root D. It is not the Fisher speed: ahead of the pulse the rest state is stable, so the front is pushed. With recovery frozen the speed is 0.9630, and faster recovery slows the pulse.
- Run Hodgkin and Huxley at I equal 10. RK4 with step 0.001 gives the first spike at 1.9012 milliseconds, and seven spikes in 100. Euler is first order: its first spike comes at 1.9029, 1.9179 and 1.9809 for steps 0.001, 0.01 and 0.05, late by about 1.7 steps, while RK4 stays at 1.9012. At 0.1 both diverge. The cause is the upstroke, where the Jacobian's largest eigenvalue is 36.4 per millisecond at 2.28. That caps Euler near 0.055 and RK4 near 0.077; bisection found 0.0728 and 0.0939. This is mild stiffness.
- Hodgkin and Huxley describes one channel set in a squid axon at one temperature. Real neurons have dozens of channel types, dendrites, synapses and noise, so the threshold we found to nine digits is, in a cell, a probability. Every number here belongs to an equation set, not a neuron. A cable pulse moves by diffusion plus reaction, at a speed that goes as the square root of D. Next, traffic drops diffusion and asks about conservation: cars satisfy rho t plus the derivative of rho times v of rho equals 0. Waves steepen into shocks. What plays the role of the threshold?
The membrane as a circuit
A patch of membrane is a capacitor in parallel with ion channels. Charge conservation gives
with the injected current. Everything below is a choice of . A single linear leak gives the RC circuit of 14.2 Electrical Circuits: first order, relaxing to a steady voltage, never spiking. Spikes need nonlinear channels, or a rule added by hand.
Leaky integrate-and-fire
The cheapest model keeps the leak and adds a rule: when reaches , record a spike and reset to . With ,
If the voltage settles below threshold forever. So the threshold current is . Above it, the exact solution from is , which reaches at
with an optional refractory time during which the voltage is held at reset. Take ms, mV, mV, M. Then nA. At nA, mV and ms, so Hz; with ms, Hz.
| (nA) | (ms) | formula (Hz) | sim | numpy Euler |
|---|---|---|---|---|
The rate rises continuously from zero at (the logarithm diverges as ), so arbitrarily slow firing is possible; the next model will not do this. The model has no spike shape, and its reset is a discontinuity: a hybrid system, not a smooth ODE.
Hodgkin-Huxley
Hodgkin and Huxley (1952) fitted ODEs to voltage-clamp currents from the squid giant axon:
and each gating variable , a probability in , obeys . Sodium opens fast () then inactivates slowly (); potassium opens slowly (). Positive feedback from makes the upstroke; and are the delayed negative feedback that ends it.
I use the modern convention (rest near mV): F/cm, , , mS/cm, , , mV, with the standard rate functions, e.g. and . All of these constants are from memory. What I can check is what they produce: every number below comes from the sim (RK4) and an independent scipy or numpy solve.
Rest. Solving at steady-state gates gives mV with . Landing on suggests the constants are right.
All or none. A voltage kick from rest dies away for small and fires a full spike above mV: at the voltage never exceeds mV, at it reaches mV. A mV kick peaks at mV after ms, then undershoots to mV at ms, near because potassium is still open (scipy: and ).
Refractoriness. After a spike is small and large. I applied a second kick at a delay after the upward zero crossing and searched, in mV steps up to , for the smallest one that fires again:
| delay (ms) | |||||||
|---|---|---|---|---|---|---|---|
| smallest kick (mV) | none | none |
Sim and scipy agree on every entry: about ms of deafness, then gradual recovery as climbs back to .
Current steps. A sustained current (µA/cm) from rest gives a spike once (the rheobase over ms; sim and scipy ). At and a ms step gave a single spike, then silence. Repetitive firing needs more:
| rate (Hz) |
Between and the rate jumps from to about Hz and cannot be slower. Neurons like this are called class II (term from memory); integrate-and-fire is class I.
Which bifurcation? The Jacobian at the equilibrium has a leading eigenvalue pair that crosses the imaginary axis at (sim and scipy): a Hopf bifurcation, as in 3.9 Bifurcations and 7.9 Limit Cycles & Hopf Bifurcations. But firing exists below that. Start on the cycle at and lower the current: it survives down to (a saddle-node of cycles) and then vanishes. For stable rest and a stable spike train coexist, so the Hopf looks subcritical; I did not compute the unstable cycle between them, so that is an inference.
Reduction: FitzHugh-Nagumo
FitzHugh (1961) and Nagumo and colleagues (1962; dates from memory) built a caricature: a fast cubic voltage-like and a slow linear recovery ,
(the textbook constants, from memory). The -nullcline is the cubic , the -nullcline the line , as in 7.3 Phase Portraits & the Trace–Determinant Plane. They cross at the rest point; for these the root is unique.
Excitability. At the rest point is with trace , determinant and eigenvalues (1.7 Complex Eigenvalues & Rotation): a stable spiral. A kick peaks at ; peaks at . Bisection puts the threshold at , i.e. (sim and scipy to ). At the rest height the cubic has roots (rest), (the unstable middle branch) and . Past the middle branch the fast variable runs to the right branch (the spike), then slowly rises and the state returns along the left branch. The threshold lies a little right of ; I did not derive the gap.
Loss of stability. Linearising (7.7 Nonlinear Systems & Linearization), the trace is , which vanishes at . Putting into gives the two Hopf currents
confirmed by bisection and scipy to . Between them the rest point is unstable and the system fires periodically. At the cycle has amplitude and period (sim and scipy agree to ).
How abrupt is the onset? A small Hopf oscillation just past would have and period . The sim shows at amplitude and period : the full cycle appears within about of . Started on the large cycle and lowered, it survives down to (sim , scipy ), below the Hopf, so there is a tiny bistable window. Such abrupt growth at small is called a canard explosion (term from memory; not analysed).
The cable equation and a travelling pulse
Current also flows sideways along an axon. Balancing charge on a thin cylinder of radius and axial resistivity gives the cable equation (derivation from memory)
so voltage diffuses with while the channels react: exactly of 15.5 Reaction–Diffusion & Turing Patterns, with only diffusing. Take FHN at , on with no-flux ends, , explicit step , and start with on .
A pulse forms and runs right, shape unchanged. Tracking where falls through zero between and , the speed is (scipy on the same grid: ). With and the time step cut to it is (scipy ), so about to one percent. Quadrupling gives (scipy ), a ratio of : speed goes as , as rescaling by demands.
Fisher or not? The Fisher speed came from linearising where the state is unstable. Ahead of this pulse the rest state is stable: . A linear tail can only decay, so there is no to minimise. The front is pushed: the nonlinearity as a whole sets the speed. To test that, freeze recovery (, at rest), so with roots . The standard cubic front speed (formula from memory) is at . Measured: (sim) and (scipy) at ; and at . It converges to the formula.
With recovery on, the pulse is slower, and the faster the recovery the slower it goes:
| frozen | |||||
|---|---|---|---|---|---|
| sim | |||||
| scipy |
(Frozen column at with time step .) With this stimulus no pulse forms for ; at sim and scipy disagree because it is marginal, and I did not try a bigger stimulus.
Numerics: a mildly stiff upstroke
Run HH at for ms. RK4 with ms gives the first spike at ms, seven spikes and peak mV. Forward Euler (4.2 The Euler Family: Forward, Backward, Heun & Midpoint):
| (ms) | ||||
|---|---|---|---|---|
| Euler first spike (ms) | diverges | |||
| RK4 first spike (ms) | diverges |
(My numpy loops agree with the sim to these digits.) Euler is first order: the first spike is late by about . At ms Euler overshoots to mV, past , then diverges. The cause is the Jacobian along the spike: its largest is per ms at ms (sim and scipy ), on the upstroke. Linear stability needs ms for Euler and ms for RK4 (4.5 Stability Regions & Stiffness, 4.3 Runge–Kutta Methods & Butcher Tableaux). Bisecting on “no blow-up and ” found limits of (Euler) and (RK4), a little above those estimates; I did not isolate why, perhaps because the large eigenvalue is visited only briefly. This is mild stiffness: the fast scale caps at a few hundredths of a millisecond while a spike lasts a few milliseconds, and RK4 at is accurate. A stiff solver pays off for long runs or cables with thousands of nodes.
What the models leave out
Hodgkin-Huxley describes one channel set in a squid axon at one temperature. Real neurons have dozens of channel types (which can turn class II into class I), dendrites that are cables with their own channels, synapses, and noise: a few thousand channels flip randomly, so the threshold we found to nine digits is, in a real cell, a probability. Every number above is a property of an equation set, not of a neuron.
Where this goes next
A cable pulse moves by diffusion plus reaction: information travels because a neighbour is pulled across threshold, and the speed scales as . The next lesson, 15.7 Traffic Flow, drops diffusion and asks about conservation: cars on a road satisfy , a first-order PDE with a nonlinear flux. Waves there travel along characteristics (9.10 First-Order PDEs: Advection & Characteristics), can steepen into shocks (9.11 Nonlinear Waves: Burgers' Equation & Shocks), and need the finite-volume ideas of 10.10 The Finite Volume Method. A traffic jam is not a neuron. But it is a nonlinear wave that holds its shape and travels, and we can ask what plays the role of the threshold.
The exercise: rate, rest point, Hopf current and threshold
The playground integrates Hodgkin-Huxley with RK4 and with Euler. In the exercise you build the leaky integrate-and-fire rate, the FitzHugh-Nagumo rest point, the trace, the Hopf current by bisection, and a spike detector by RK4.
Concept checks
Problems
A leaky integrate-and-fire neuron has ms, mV, mV, M and ms. Find its rate at nA and the largest rate it can reach.
Show worked solution
mV, so ms and Hz (sim and numpy agree). As , and Hz.
For FitzHugh-Nagumo with , , : (a) show the trace vanishes at ; (b) find the two currents; (c) find the small-oscillation period at the lower one.
Show worked solution
(a) gives . (b) On the rest curve . For : . For : . (c) With , , so and the period is . The sim at shows : the observed oscillation is not the small Hopf one.
With recovery frozen, and the front speed is (from memory). (a) Show , so . (b) Evaluate it for middle root . (c) For which is the speed zero?
Show worked solution
(a) Expanding, , and has no term, so the roots sum to . Then and . (b) , matching the measured on the fine grid. (c) needs , roots : both wells equally deep, so neither state invades the other.
Key Takeaways
- Leaky integrate-and-fire has the exact rate , threshold current nA here, and a rate rising continuously from zero.
- Hodgkin-Huxley (constants from memory) rests at mV, fires all-or-none above a mV kick, peaks near mV, undershoots to mV and is deaf for about ms.
- Its rate jumps from to about Hz near to ; the rest point loses stability by a Hopf at , and between them rest and firing coexist.
- FitzHugh-Nagumo reduces this to a plane: cubic nullcline, line, stable spiral at rest, kick threshold , Hopf currents and from , with a full-amplitude cycle appearing at once.
- With diffusion it gives a pulse of speed that scales as but is a pushed front, not the pulled Fisher front, because the rest state ahead is stable; as the speed tends to the frozen front .
- The upstroke is mildly stiff (largest decay rate per ms): Euler fails above about ms and is first order; RK4 fails above about ms.
- These are noise-free, single-channel-set models; the next lesson drops diffusion for a conservation law with shocks.