Response Inhibition Network

Hello I am currently trying to build a network which can run the response inhibition Stop-Signal task. I have the following code where I have connected a BG and thal model with some “cortical areas”, however, does anyone know how I can (1) feed in specific trials (go or go+stop signal with some delay)? (2) I need to make sure the projections from the cortical areas I mentioned are excitatory in nature, how can I go about doing that?


model = nengo.Network()
with model:
bg = nengo.networks.BasalGanglia(dimensions=1) # Provide tonic
# inhibition of thalamic outputs that facilitate motor cortical areas
tha = nengo.networks.Thalamus(dimensions=1)

cortex = nengo.Network()
with cortex:
    M1 = nengo.Network()
    with M1:
        M1ens = nengo.Ensemble(n_neurons=100, dimensions=1)
    SensoryInfo = nengo.Network()
    with SensoryInfo:
        pre_SMA = nengo.Ensemble(n_neurons=100, dimensions=1)
        rIFC = nengo.Ensemble(n_neurons=100, dimensions=1)
        output = nengo.Node(size_in=1)
        nengo.Connection(pre_SMA, output)
        nengo.Connection(rIFC, output)
nengo.Connection(tha.actions.output, M1ens)
# nengo.Connection(SensoryInfo.output, bg.STN.output)  # fix this connectoin
nengo.Connection(bg.output, tha.actions.input)
nengo.Connection(output, bg.input)


to feed in specific data to the model, you’ll want to create a Node that reads from your input data, something like

data_array = np.load(...)  # or however you're generating your input signal
def input_func(t):
    # assuming you're running at 0.001 time step, generate an index into your data array
    index = int(t / 0.001 - 1)  # - 1 so that indexing starts at 0
    return data_array[index]

node = nengo.Node(input_func, size_out=data_array.shape[1])

and then connect that to your ensemble.

All of the connections generated in Nengo are excitatory by default, so don’t need to worry about that!

1 Like