Synapse#
- class brainspike.Synapse(*args, **kwargs)#
Base class for synapse dynamics.
This class serves as the foundation for all synapse models in the BrainPy framework, providing a common interface for implementing various types of synaptic connectivity and transmission mechanisms. Synapses model the transmission of signals (typically spikes) between neurons, including temporal dynamics, plasticity, and neurotransmitter effects.
All specific synapse implementations should inherit from this class and implement the required methods for state management and dynamics update.
- Parameters:
in_size (
Size) – Size of the presynaptic input. Can be an integer for 1D input or a tuple for multi-dimensional input (e.g.,100or(10, 10)).name (
str, optional) – Name identifier for the synapse layer. IfNone, an automatic name will be generated. Useful for debugging and model inspection.
Notes
Synaptic Dynamics
Synapses implement temporal filtering of presynaptic signals. The dynamics are typically described by differential equations that govern how synaptic conductance or current evolves over time in response to presynaptic spikes.
State Variables
Synapse models typically maintain state variables (e.g., conductance
g, gating variables) asbrainstate.HiddenStateorbrainstate.ShortTermStateobjects depending on whether they need to be preserved across simulation episodes.Integration with Neurons
Synapses are commonly used in conjunction with projection layers or connectivity matrices to model synaptic transmission between neuron populations:
In feedforward networks: Linear layer → Synapse → Neuron
In recurrent networks: Neuron → Linear layer → Synapse → Neuron
Alignment Patterns
Some synapse models inherit from
AlignPostto enable event-driven computation where synaptic variables are aligned with postsynaptic neurons. This is particularly efficient for sparse connectivity patterns.References