Satish BajagainContents

A leaky integrate-and-fire neuron

A simplified neuron accumulates input, leaks toward a resting voltage, and emits an event when it reaches a threshold. Change the input current to see when this model begins to spike.

Illustrative demo data — educational model, not applicant research.

mV-65-50spikes0400 ms
Membrane voltage (mV) and spike raster over time (ms)

Static figure and worked values are available below. Interactive controls appear when JavaScript is available.

Static worked example and model values

Current 1.8 nA; resistance 10 MΩ; resting and reset potential -65 mV; threshold -50 mV; time constant 20 ms; refractory hold 2 ms. First spike: 35.835 ms. Spikes within 400 ms: 10.

Spike times (ms): 35.835, 73.670, 111.506, 149.341, 187.176, 225.011, 262.846, 300.682, 338.517, 376.352.

Read the two traces

The upper trace is membrane voltage; the lower raster marks each spike event. The current slider changes a constant current for the entire simulated interval. Play reveals that interval, Step advances one millisecond, and the time slider lets you inspect any sample. Nothing runs until you request it.

This is an educational illustration of my current learning about spiking neuron models. It is not a biological experiment or an implemented research project.

The membrane equation

τmdVdt=−(V−EL)+RI.\tau_m\frac{dV}{dt}=-(V-E_L)+RI.

Here ELE_L is resting voltage, RR resistance, II input current and τm\tau_m a time constant. Using MΩ and nA makes RIRI a voltage in mV. For constant current and initial voltage V0V_0:

V(t)=V∞+(V0−V∞)e−t/τm,V∞=EL+RI.V(t)=V_\infty+(V_0-V_\infty)e^{-t/\tau_m},\qquad V_\infty=E_L+RI.

A threshold crossing emits an event. Voltage is reset and held for an absolute refractory interval before integration resumes. The trace does not attempt to draw the fast shape of a biological action potential.

A threshold you can calculate

With the illustrative parameters, resting voltage is −65 mV, threshold is −50 mV and resistance is 10 MΩ. A constant current must exceed 1.5 nA to cross threshold in finite time. At exactly 1.5 nA the voltage approaches threshold asymptotically; it does not fire in this ideal model.

For V∞>VthV_\infty>V_{\mathrm{th}}, the time to threshold from V0V_0 is

thit=τmlog⁡(V∞−V0V∞−Vth).t_{\mathrm{hit}}=\tau_m\log\left(\frac{V_\infty-V_0}{V_\infty-V_{\mathrm{th}}}\right).

The simulation computes event times from this expression. A one-millisecond grid samples the voltage for display; it does not round the underlying spike times. Consequently a rapid reset can appear between adjacent displayed samples. Increasing current shortens the charging interval, while the refractory hold limits how closely events can occur.

What this leaves out

The model has no dendritic geometry, ion-channel dynamics, adaptation, synaptic conductances or stochastic input. Changing one current cannot represent the variety of real neuronal inputs. It is useful for reasoning about integration, leak and threshold timing within those assumptions.

References