Spiking Neuron Networks, Explained
After reading this you will understand how a grid of simple integrate-and-fire neurons turns single spikes into travelling waves and synchronised bursts, and you will be able to predict which coupling and inhibition settings give silence, seizure, or steady rhythm.
What it is, and one spike that becomes a wave
A spiking neuron network is a sheet of small identical units. Each unit holds a single number called the membrane voltage. When a neighbour fires, that voltage jumps up a little. When enough neighbours fire in quick succession, the voltage crosses a threshold, the unit fires its own spike, and then it drops back and rests for a moment before it can fire again.
That is the whole mechanism. Nothing in it says "wave" or "spiral" or "rhythm". Those patterns appear because thousands of these tiny rules run at once on a grid.
Try the smallest experiment. Set the sheet quiet, then click one cell to inject a spike. If the coupling is weak, that spike lifts four neighbours a little and dies. If the coupling is a bit stronger, the four neighbours cross threshold, fire, and lift their neighbours in turn. A ring of activity expands outward at a fixed speed, like the circle from a dropped stone. The centre cannot re-fire immediately because it is resting, so the ring keeps moving out instead of collapsing back. One click, one travelling wave.
When this model helps, and when it misleads
Use this sheet when you want to see how local excitation and inhibition produce collective patterns. It is a good intuition pump for travelling waves in tissue, for the difference between a network that is silent and one that runs away, and for the onset of synchronised rhythm. It reproduces the qualitative behaviour that shows up in cortical slices and in EEG traces: waves, spirals, and population oscillations.
Do not read quantitative biology out of it. The units here have no ion channels, no dendrites, no synaptic delays drawn from real distributions, and no learning. Real neurons fire at rates that depend on channel kinetics measured in milliseconds. This toy uses arbitrary time steps and integer-like jumps. If you want the biophysics of a single spike, the shape of the action potential and its refractory window, use the Neuron Action Potential tool, which solves the FitzHugh-Nagumo equations. This sheet is about the crowd, not the single cell.
A pattern that looks like a "brain wave" here is not evidence about any real brain. The sheet can only show that a given class of rules can produce such a pattern, not that biology uses that rule. Treat every result as a statement about the model, not about tissue.
The update rule, term by term
Each neuron i carries a voltage v_i. On every time step it leaks a fraction of its voltage back toward rest, adds the spikes arriving from its neighbours, and adds a small constant background drive. The leaky integrate-and-fire update is:
Here \lambda is the leak factor between 0 and 1: with \lambda = 0.9 the voltage keeps 90 percent of itself each step and forgets old input over about ten steps. The sum runs over neighbours j. The term s_j(t) is 1 if neuron j fired on this step and 0 otherwise. The weight w_{ij} is positive for an excitatory link and negative for an inhibitory link. I is the background drive, a small push toward threshold applied to every cell.
The firing rule fires and resets:
The threshold \theta is the voltage a cell must reach to spike. After firing, the voltage snaps to v_{\text{reset}} (often 0) and the cell ignores all input for r steps. That refractory rest is what keeps a wave moving forward instead of igniting backward into cells that just fired.
Two knobs shape everything. The coupling strength scales the size of every w_{ij}. The inhibition fraction sets what share of links carry a negative weight. Large coupling with little inhibition drives runaway firing. Balanced inhibition holds the sheet near the edge where waves survive but do not fill everything.
A worked example with the demo settings
Take the demo defaults: leak \lambda = 0.9, threshold \theta = 1.0, reset v_{\text{reset}} = 0, refractory r = 3 steps, each cell wired to its four nearest neighbours, excitatory weight 0.35, inhibition fraction 0.2, and background drive I = 0.02. Watch one central cell whose four neighbours all fire on the same step, with none of those links inhibitory.
Voltage of one cell driven by four spiking neighbours
- Start at rest, v = 0. Four neighbours fire. Input this step is 4 \times 0.35 = 1.4. Update: v = 0.9 \times 0 + 1.4 + 0.02 = 1.42.
- 1.42 \ge 1.0, so the cell fires. It resets to 0 and rests for 3 steps.
- Now take a weaker case: only two neighbours fire, so input is 2 \times 0.35 = 0.70. From rest: v = 0 + 0.70 + 0.02 = 0.72. Below threshold, no spike.
- Next step, suppose those two fall silent. Only drive remains: v = 0.9 \times 0.72 + 0.02 = 0.668. The voltage leaks back down. No spike.
- With drive alone, the resting level settles where v = 0.9 v + 0.02, giving v = 0.2. That is well under threshold, so an undriven sheet stays silent.
So a cell needs at least three simultaneous excitatory neighbours to cross threshold from rest (3 \times 0.35 + 0.02 = 1.07 \ge 1.0), and two is not enough. That single fact explains why the demo produces clean expanding rings: a wavefront supplies each fresh cell with enough firing neighbours to continue, but a lone spike behind the front cannot restart the fire.
See how coupling picks the regime
The single most instructive knob is coupling strength. Below a critical value the sheet is silent, at an intermediate value it carries stable waves, and above another value it seizes into near-total firing. The widget lets you sweep that one number and watch the population firing rate respond.
Reading the raster and the population rhythm
Three views tell you what the sheet is doing. The grid shows spatial pattern. The raster plots one dot per spike, cell index up the side and time across the bottom. The population rhythm is the fraction of cells firing on each step.
Read them together. Diagonal streaks in the raster mean a wave crossing the sheet: cell 100 fires, then 101, then 102, one step apart. Vertical stripes mean synchrony: many cells fire on the same step, then all go quiet during their shared refractory rest, then fire again. That vertical striping is exactly what shows up as a peak in the population rhythm.
| Regime | Grid | Raster | Population rate |
|---|---|---|---|
| Silent | Dark | Scattered dots | Near 0%, flat |
| Travelling wave | Expanding rings, spirals | Diagonal streaks | Steady, 5 to 15% |
| Synchronised burst | Whole sheet flashes | Vertical stripes | Sharp peaks near 50%, then troughs |
| Runaway | Mostly lit, flickering | Dense fill | High, 40%+, noisy |
The burst period follows the refractory time. With r = 3 and a step to recharge, a synchronised sheet bursts roughly every 4 to 5 steps. If one "step" stands for 2 milliseconds, that is a burst about every 10 milliseconds, near 100 hertz. Change the refractory length and the rhythm changes with it: that is the model's honest analogue of how cellular timescales set the frequency of a population oscillation.
To find the wave regime quickly, start with coupling that gives runaway firing, then raise the inhibition fraction step by step until the solid fill breaks into moving fronts. Inhibition is the brake that turns saturation into structure.
Common mistakes when reading the sheet
The first trap is confusing synchrony with runaway. Both light up a lot of the grid. Check the population rate over time: synchrony shows sharp peaks separated by near-zero troughs, while runaway stays high and jagged without ever emptying. The refractory rest is what carves the troughs, so a sheet with a very short refractory window can look like continuous flicker even when it is technically bursting.
The second trap is expecting waves at zero inhibition. With inhibition at 0 and coupling in the wave band, a single spike often ignites the whole sheet and then chatters. You need a nonzero inhibition fraction (0.15 to 0.25 works with the demo weights) for fronts to stay thin and directed.
The third trap is over-reading the numbers. A firing rate of "11 percent" here is not a biological firing rate in hertz. It is the fraction of model cells that happen to spike per arbitrary step. Compare it only to other runs of this same sheet.
The fourth trap is treating one run as the truth. Where you click the first spike, and which links happen to be inhibitory, both change the outcome near the transitions. Run the same settings several times before you conclude a regime is "silent" or "wave".
Related tools worth trying next
Synchrony without any grid at all appears in the Firefly Synchronization tool, where pulse-coupled oscillators fall into unison: it is the population rhythm of this sheet stripped down to its bare timing logic. For the single cell under the sheet, the Neuron Action Potential tool shows the real spike shape and refractory period that this model abstracts into one integer.
For other systems where simple local rules build global order, the Boids Flocking Simulator makes a flock from three neighbour rules, the Ant Colony Pheromone Trails tool grows foraging highways from evaporating trails, and Lenia Continuous Life grows smooth self-organising creatures in a continuous cellular automaton. If you want randomness rather than coupling as the driver of collective change, the Genetic Drift Simulator shows how chance alone fixes gene variants in small populations.
Frequently asked questions
Why does a single spike sometimes fade and sometimes start a wave?
It depends on how many neighbours it can push over threshold. With the demo weight 0.35 and threshold 1.0, a cell needs at least three simultaneous excitatory neighbours to fire from rest (3 \times 0.35 = 1.05 \ge 1.0). A lone spike lifts each of its four neighbours by only 0.35, well short, so it fades unless the background drive has already pre-charged them.
What sets the frequency of the synchronised bursts?
The refractory time dominates. After a burst every cell rests for r steps and needs about one more step to recharge, so the period is roughly r + 1 steps. With r = 3 that is a burst about every 4 steps. Shorten the refractory window and the rhythm speeds up.
Does this model learn or change its wiring?
No. The weights are fixed when you set the coupling and inhibition. There is no synaptic plasticity here. The patterns come entirely from the fixed rule running in time, not from the network adapting.
Why does adding inhibition make the patterns cleaner instead of just quieter?
Inhibition subtracts from the voltage of cells near an active front. That keeps the front thin: cells just ahead can still fire, but cells to the side get held down, so activity travels as a narrow wave rather than spreading in all directions and filling the sheet. Without it, excitation with no brake saturates.
Can I get spirals, or only expanding rings?
Spirals appear when a wavefront gets broken, often by a patch of cells still in their refractory rest. The open end of a broken front curls around the resting patch and winds into a rotating spiral. Inject two spikes a few steps apart and near each other to break a front on purpose.