From a capacitor to the LIF neuron
30th May 2026
Deriving the leaky integrate-and-fire equation from the RC circuit that a patch of membrane actually is.
A neuron’s membrane is a thin lipid bilayer separating two salty solutions. Charge piles up on either side, ions leak through embedded channels, and currents are injected by synapses or an experimenter’s electrode. Electrically, this is just an RC circuit. The leaky integrate-and-fire (LIF) neuron is what you get when you write Kirchhoff’s current law for that circuit and bolt a threshold on top.
The membrane is a capacitor
Two conductors separated by an insulator form a capacitor. The bilayer is the insulator; the intracellular and extracellular fluids are the conductors. The defining relation for a capacitor is
where is the membrane potential, is the charge stored on the inner face, and is the membrane capacitance (typically ).
Differentiating in time gives the capacitive current — the current required to change the voltage at rate :
The membrane is also a leaky resistor
Ion channels punctuate the bilayer. Even at rest, some are open, so the membrane has a finite conductance (equivalently, a leak resistance ). The leak current is driven by how far the voltage sits from its reversal potential — the voltage at which the net flow through those leak channels is zero. Ohm’s law for the leak branch:
When , the leak current is positive — charge flows outward and pulls back down. The capacitor and the leak resistor sit in parallel between the inside and the outside of the cell.
Kirchhoff’s current law
Now inject an external current (a synapse, an electrode). Charge is conserved at the membrane node: whatever flows in must either charge the capacitor or escape through the leak.
Rearrange for :
Multiply through by and define the membrane time constant :
This is the subthreshold LIF equation. Nothing has been assumed beyond Kirchhoff’s law and linear, passive channels. The dynamics are first-order: any voltage perturbation decays exponentially toward with time constant .
Adding a spike
Real neurons don’t just relax. When crosses a threshold, voltage-gated sodium channels open, the membrane briefly depolarizes to nearly , and then potassium channels repolarize it. The full mechanism is the Hodgkin–Huxley model. LIF throws all of that away and replaces it with a rule:
Two parameters, no extra differential equations. Often a refractory period is added during which is clamped at , modelling the brief inactivation of sodium channels after a spike.
What was thrown away
The derivation makes the model’s assumptions explicit:
- Linear leak. Real channels are voltage- and time-dependent; is treated as constant.
- Point neuron. The whole membrane is collapsed to one node — no dendrites, no axonal delay, no spatial structure.
- Phenomenological spike. The action potential is replaced by a reset, so the model says nothing about spike shape, sodium dynamics, or bursting.
In exchange you get a single linear ODE with a reset, which integrates in a handful of lines and scales to networks of thousands of neurons. That is the LIF neuron simulated in nb000 — same equation, same RC circuit, now with current injected and a threshold to cross.