Apply event-driven synaptic plasticity#
Plasticity rules update synaptic weights in response to spikes. brainevent provides
event-driven plasticity operators that touch only the weights connected to neurons that
actually fired — the same sparsity principle as the matrix products. This guide shows when
to reach for each operator; the full, runnable derivation is in
Tutorial 5: Synaptic Plasticity Modeling - Foundation of Learning and Memory.
Pre- vs post-synaptic updates#
Plastic updates are driven either by pre-synaptic spikes (the source neuron fired) or
post-synaptic spikes (the target neuron fired). brainevent ships both directions for
each storage format:
Storage |
Pre-synaptic driven |
Post-synaptic driven |
|---|---|---|
CSR (sparse) |
||
Dense |
Choosing CSR vs dense#
Use the CSR operators when connectivity is sparse and fixed (the common case for large networks) — only the stored synapses are visited.
Use the dense operators for small, fully-connected layers where a dense weight matrix is already in play.
In both cases the spike trigger is a BinaryArray, so only active events
contribute to the update — the cost scales with the number of spikes, not the number of
synapses.
See also
The exact operator signatures (weights, spike vector, learning-rate arguments, and the
associated *_p primitives) are listed under Plasticity operations in
Matrix Operations.