One neuron: a leaky bucket that fires
Real neurons communicate with brief, all-or-nothing electrical pulses called spikes, not with a smooth, continuously varying signal. The simplest model that captures this is the leaky integrate-and-fire (LIF) neuron: a single variable, the membrane potential V, accumulates incoming current like water filling a bucket, while a constant leak continuously drains V back toward a resting value. When V crosses a threshold, the neuron fires a spike, V is reset, and the whole process starts over.
τ · dV/dt = −(V − V_rest) + R · I(t)
if V ≥ V_threshold:
emit a spike
V ← V_reset // hard reset, then the leak resumes
The leak term is what gives the model its name and its character: without it, any input current, however small, would eventually push V over threshold. With it, a neuron only fires if input arrives faster than the leak can drain it away, which makes the model naturally sensitive to the rate and timing of incoming spikes, not just their total count — closely mirroring how real neurons behave, at a fraction of the computational cost of modelling individual ion channels.
Wiring neurons together
A network connects many LIF neurons through synapses: when a presynaptic neuron fires, it delivers a small jolt of current, or a jump in conductance, to every postsynaptic neuron it connects to, after some conduction delay. Each connection carries a weight and a sign — excitatory connections push the postsynaptic neuron's potential up, toward threshold, while inhibitory connections push it down, away from threshold. The overall behaviour of the network — quiet, chattering, rhythmically bursting, or runaway — emerges purely from how these thousands of small pushes and pulls add up moment to moment, with no neuron in charge of the outcome.
Why the network needs inhibition
Purely excitatory connectivity is unstable by construction: one neuron firing excites its neighbours, which fire and excite their neighbours in turn, and once activity crosses a critical density the whole network can cascade into an all-firing state resembling an epileptic seizure. Real cortical tissue avoids this with a tightly balanced mix, roughly four excitatory neurons for every inhibitory one, where the inhibitory population applies negative feedback that grows automatically with overall network activity — more firing recruits more inhibition, which damps the runaway before it can develop. This excitation-inhibition balance is one of the most robust organising principles found across cortical circuits, and simulations that tune the excitatory/inhibitory ratio reproduce the same qualitative transition from quiet to runaway activity that is seen in real cortical tissue and in models of seizure onset.
Asynchronous chatter versus synchronised bursts
Plot every neuron's spike times as a dot on a raster — one row per neuron, one dot per spike — and two qualitatively different regimes appear depending on the coupling strength and input statistics. In the asynchronous regime, weak or sparse coupling and noisy input let each neuron fire largely according to its own input history, producing an irregular scatter of dots across the whole raster with no obvious pattern — this is the regime most associated with efficient information coding, since a synchronised population conveys far less independent information than an irregularly firing one. In the synchronous regime, strong recurrent coupling and short delays let one neuron's spike reliably trigger its neighbours in the same timestep, locking large groups of neurons onto the same firing phase and producing vertical stripes across the raster — closer to the collective bursting seen in developing neural tissue, in some pathological states, and in central pattern generators that intentionally produce rhythmic, synchronised output.
Why not just use a rate model?
Simpler models represent each neuron by a single continuously varying firing rate instead of discrete spikes, and they are cheaper to simulate and easier to analyse. But collapsing spikes into a rate throws away exactly the timing information that synchrony phenomena depend on — two neurons with identical average rates can be perfectly synchronised or perfectly staggered, and only a spiking model can tell the difference. That is the whole point of simulating individual spikes rather than rates: the interesting physics here, from network-wide oscillations to the sharp transition between chatter and synchrony, lives in the relative timing of spikes, not in their average frequency.
Frequently asked questions
How is a leaky integrate-and-fire neuron different from a deep learning artificial neuron?
A deep learning neuron computes one static output number from its inputs in a single pass. An LIF neuron has an internal state, its membrane potential, that evolves continuously over time, leaks toward a resting value, and fires a discrete spike only when that potential crosses a threshold. Information is carried by the timing and rate of spikes rather than by a single real-valued activation.
Why do inhibitory neurons matter so much for network stability?
Without inhibition, excitatory neurons exciting each other tend to runaway into an all-firing, seizure-like state once activity crosses a threshold. Inhibitory neurons apply negative feedback that grows with overall activity, damping the excitation before it explodes, which is why cortical circuits maintain a roughly fixed 80:20 ratio of excitatory to inhibitory neurons and why disrupting that balance is linked to epilepsy.
What pushes a network from asynchronous firing into synchrony?
Stronger or more numerous synaptic connections, combined with a shorter conduction or synaptic delay, make one neuron's spike more likely to immediately trigger its neighbours, and that mutual triggering can lock many neurons onto the same firing phase. Weak, sparse or noisy coupling instead lets each neuron fire according to its own input, producing an irregular, desynchronised raster.
Try it live
Everything above runs in your browser — open Spiking Neural Network and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open Spiking Neural Network simulation