Enforce single neuron spiking constraint

Is there a way to enforce a constraint in Brian2 such that only one neuron can spike at each time point within a population?

Hi @elnaz91, this is indeed possible, but not very “natural” in Brian. The easiest way to implement it is via a @network_operation that runs before the threshold and only gives a single neuron the “right” to fire. What this looks like depends on the details of what you have in mind, but this thread has one possible implementation that lets only the neuron with the highest membrane potential spike: Winner Take All mechanism using lateral inhibition - #6 by mstimberg

Alternatively, this could for example select one of the neurons randomly. Hope that gets you going!

1 Like

Thank you so much, @mstimberg. The network_operation command works perfectly fine for me.

1 Like