Twelve neurons sit in 3D space split into a left group (A) and a right group (B). Every pulse, the stimulation pattern picks which neurons fire together — a whole group at once in "Correlated" mode, or an uncorrelated random subset in "Random" mode. Each candidate synapse tracks a Hebbian weight that rises when its two neurons co-fire and decays otherwise. Unlike a flat weight table, the network here changes its own structure: crossing a growth threshold spawns a physical dendritic spine — a tube mesh that grows from nothing to full thickness between the two neurons — and a synapse whose weight collapses below a pruning threshold shrinks back down and is deleted from the scene entirely.
Δw(i,j) = η · pre(i) · post(j) · (1 − w) − decay · w
w > 0.35 → grow spine (radius 0 → target)
w < 0.08 → prune spine (radius → 0, remove)
- Learning rate η — how fast co-active synapses climb toward the growth threshold and start forming a physical spine.
- Decay / homeostasis — passive weakening every pulse; synapses that stop being reinforced eventually cross the pruning threshold and vanish, exactly as unused dendritic spines are eliminated in a real developing or adult brain.
- Pulse rate — how often the network fires; faster pulses let a consistent pattern consolidate its structure sooner.
- Stimulation pattern — Correlated stimulation grows a dense, stable web of spines inside each group while cross-group synapses get pruned away; Random stimulation prevents any pattern from consolidating, so spines grow and are pruned again in a constant, disorganised churn.
Real-world relevance: this growth-and-pruning cycle is structural plasticity — the physical basis of "use it or lose it" rewiring seen in skill learning, sensory remapping and post-stroke rehabilitation, distinct from (but built on top of) the moment-to-moment electrical signalling between neurons.