(Brette, et, al., 2007) CUBA

Implementation of the paper:

  • Brette, R., Rudolph, M., Carnevale, T., Hines, M., Beeman, D., Bower, J. M., et al. (2007), Simulation of networks of spiking neurons: a review of tools and strategies., J. Comput. Neurosci., 23, 3, 349–98

which is based on the balanced network proposed by:

  • Vogels, T. P. and Abbott, L. F. (2005), Signal propagation and logic gating in networks of integrate-and-fire neurons., J. Neurosci., 25, 46, 10786–95

Authors:

[1]:
import brainpy as bp

bp.math.set_platform('cpu')
[2]:
class CUBA(bp.Network):
  def __init__(self, scale=1.0, method='exp_auto'):
    # network size
    num_exc = int(3200 * scale)
    num_inh = int(800 * scale)

    # neurons
    pars = dict(V_rest=-49, V_th=-50., V_reset=-60, tau=20., tau_ref=5.,
                V_initializer=bp.init.Normal(-55., 2.))
    E = bp.neurons.LIF(num_exc, **pars, method=method)
    I = bp.neurons.LIF(num_inh, **pars, method=method)

    # synapses
    we = 1.62 / scale  # excitatory synaptic weight (voltage)
    wi = -9.0 / scale  # inhibitory synaptic weight
    E2E = bp.synapses.Exponential(E, E, bp.conn.FixedProb(0.02),
                                  g_max=we, tau=5., method=method)
    E2I = bp.synapses.Exponential(E, I, bp.conn.FixedProb(0.02),
                                  g_max=we, tau=5., method=method)
    I2E = bp.synapses.Exponential(I, E, bp.conn.FixedProb(0.02),
                                  g_max=wi, tau=10., method=method)
    I2I = bp.synapses.Exponential(I, I, bp.conn.FixedProb(0.02),
                                  g_max=wi, tau=10., method=method)

    super(CUBA, self).__init__(E2E, E2I, I2E, I2I, E=E, I=I)
[3]:
# network
net = CUBA()
[4]:
# simulation
runner = bp.DSRunner(net,
                     monitors=['E.spike'],
                     inputs=[('E.input', 20.), ('I.input', 20.)])
t = runner.run(100.)
[5]:
bp.visualize.raster_plot(runner.mon.ts, runner.mon['E.spike'], show=True)
../_images/ei_nets_Brette_2007_CUBA_6_0.png