Dynamic regulation of State Object feedback

As I’ve found that the strength of the feedback of State objects has profound effects on the speed of processing, can anyone suggest a design where that can be modified (perhaps by BG selection of options; i.e. if condition A, set feedback = 1, if condition B, set feedback = 0. The real world correlate is literature showing that neuromodulators such as dopamine or acetylcholine can control the strength of recurrent connections. I’ve searched pubmed a few times (but not recently) for papers on this, and found no hits. Thansk

Hi @HowardC, and welcome back to the Nengo forums. :smiley:

From your description, you can divide your problem into two parts:

  1. How to modify the State object to support changing the value of feedback on the fly.
  2. How to generate the feedback value given the state of the system.

Variable feedback
The State network structure is essentially a multi-dimensional integrator. When you set the feedback value, you are setting the feedback weight on the integrator. As with simpler integrator networks implemented in Nengo, this feedback weight is set when the model is constructed, and doesn’t change as the simulation is run.

An integrator with a modifiable feedback weight is called a “controlled integrator” and there is a Nengo example on how to do this. To provide a quick summary of the controller integrator network, an extra dimension is added to the integrator ensemble and the feedback connection is configured to take this extra-dimensional input as the value of the feedback.

To get the State network to perform such behaviour, you’ll need to replicate this functionality. I can think of a few ways to do so:

  • Inside the State network is a nengo.networks.EnsembleArray. This network is a configurable “array” (collection) of Nengo ensembles. To convert the State network to a controlled integrator, you’ll need to implement your own EnsembleArray network where each ensemble is a 2D ensemble (like in the controlled integrator example). The modified EnsembleArray would have 2 outputs: the “standard” output (i.e., x), and the multiplied output (i.e., x \times f [where f is the feedback value]).
  • Since the feedback connection of the controlled integrator is calculating x \times f, you can also use the existing State network and add a nengo.networks.Product network in the feedback connection to do the multiplication. Something like so (below is just pseudo-code):
feedback_val = (...) # comes from some other place in the network
state = spa.State(...)
prod = nengo.networks.Product(...)
nengo.Connection(feedback_val, prod.input_b, transform=[...]) 
# Need to set the appropriate transform to project the 1D feedback value to each 
# dimension in the State network
nengo.Connection(state.output, prod.input_a)
nengo.Connection(prod.output, state.input)
  • You mentioned that the real-world correlate would be some neurotransmitters that modulate the connection weights. I haven’t tested this in Nengo (I will do some testing if I have the time), but I am certain that you should be able to use a custom Nengo learning rule to achieve the same thing (i.e., use a control signal to modulate the weights of a connection).

Generating the feedback value
Generating the feedback value is pretty straightforward. As you suggested, you could use a set of BG rules to generate some semantic pointer outputs that can be mapped to the value of feedback. The simplest way to do this mapping is to take the semantic pointer output from the BG rule and calculate the dot product with the expected semantic pointer.

Consider the following nengo_spa rules:

with spa.ActionSelection() as act_sel:
    spa.ifmax("Condition 1", spa.dot(cond, spa.sym.COND1), spa.sym.ONE >> control)
    spa.ifmax("Condition 2", spa.dot(cond, spa.sym.COND2), 0 >> control)

Now, if the system state is such that cond contains the COND1 semantic pointer, the semantic pointer ONE will get fed to the control State. To get a single dimensional feedback value, all we’ll need to do is that the output of that State and compute the dot product with the ONE semantic pointer:

nengo.Connection(control, feedback, transform=spa.sym.ONE.v)
# Note: You might need to take the transpose of the vector...

Now, if the output of control is ONE, the input to feedback will be ~1. And if the output of control is any other semantic pointer (or 0), the input to feedback will not be 1. The output of the feedback ensemble can then be fed to the modified State network (from above) to achieve the full controlled integrator network.

Unfortunately, I’ve been out of the research field for quite some time now, so I won’t be able to provide useful feedback here.

Thanks - will work through this …