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

Q=CmV,Q = C_m V,

where V=VinVoutV = V_\text{in} - V_\text{out} is the membrane potential, QQ is the charge stored on the inner face, and CmC_m is the membrane capacitance (typically 1μF/cm2\sim 1\,\mu\text{F}/\text{cm}^2).

Differentiating in time gives the capacitive current — the current required to change the voltage at rate dV/dtdV/dt:

IC=dQdt=CmdVdt.I_C = \frac{dQ}{dt} = C_m \frac{dV}{dt}.

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 gLg_L (equivalently, a leak resistance Rm=1/gLR_m = 1/g_L). The leak current is driven by how far the voltage sits from its reversal potential VrestV_\text{rest} — the voltage at which the net flow through those leak channels is zero. Ohm’s law for the leak branch:

IL=gL(VVrest)=VVrestRm.I_L = g_L (V - V_\text{rest}) = \frac{V - V_\text{rest}}{R_m}.

When V>VrestV > V_\text{rest}, the leak current is positive — charge flows outward and pulls VV 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 II (a synapse, an electrode). Charge is conserved at the membrane node: whatever flows in must either charge the capacitor or escape through the leak.

I=IC+IL=CmdVdt+VVrestRm.I = I_C + I_L = C_m \frac{dV}{dt} + \frac{V - V_\text{rest}}{R_m}.

Rearrange for dV/dtdV/dt:

CmdVdt=(VVrest)/Rm+I.C_m \frac{dV}{dt} = -(V - V_\text{rest})/R_m + I.

Multiply through by RmR_m and define the membrane time constant τm=RmCm\tau_m = R_m C_m:

τmdVdt=(VVrest)+RmI.\tau_m \frac{dV}{dt} = -(V - V_\text{rest}) + R_m\, I.

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 Vrest+RmIV_\text{rest} + R_m I with time constant τm\tau_m.

Adding a spike

Real neurons don’t just relax. When VV crosses a threshold, voltage-gated sodium channels open, the membrane briefly depolarizes to nearly +40mV+40\,\text{mV}, 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:

V(t)Vth    spike at t,VVreset.V(t) \geq V_\text{th} \;\Longrightarrow\; \text{spike at } t,\quad V \leftarrow V_\text{reset}.

Two parameters, no extra differential equations. Often a refractory period treft_\text{ref} is added during which VV is clamped at VresetV_\text{reset}, 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; gLg_L 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.