LIF neuron activity

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

If I understand your question correctly, you are asking if a decoded Nengo connection (i.e., nengo.Connection(ensA, ensB)) contains the full weight matrix? The answer to that question is no. In Nengo, “weights” are kept in several different places. The ensemble object contains the encoders, and a connection object contains a connection weight. When a connection is made from an ensemble, the connection weights are interpreted as decoders. To get the “full” weight matrix, you’ll need to perform the matrix multiplication of the post-ensemble encoders with the connection’s decoders manually.

The answer here again is no. There are 2 points here to be made. First, a connection from a neuron object will have connection weights interpreted as the “full” connection weight matrix (in the traditional sense). Second, when connecting to a neuron object, the encoders for the ensemble in which the neurons belong to will be ignored. Thus, performing a neuron-to-neuron connection will result in a “full” connection weight. In this case, separating the encoders and decoders from the connection weight matrix is difficult, if not impossible.

The context of the connection weight matrix depends on the pre and post objects of the connection. You could have 4 different types of connections:

Ensemble to ensemble

nengo.Connection(ensA, ensB)

As described above, the connection weights in the connection are treated as decoders, and the ensemble’s (ensB) encoders are used as well.

Ensemble to neuron

nengo.Connection(ensA, ensB.neurons)

Here, the connection weights in the connection are treated as decoders, but ensB’s encoders are ignored (bypassed) in the computation. This method of connection is used frequently to implement inhibitory connections.

Neuron to neuron

nengo.Connection(ensA.neurons, ensB.neurons)

Here, the connection weights in the connection are treated as the “full” connectivity matrix, and ensB’s encoders are also ignored. This is typically used in connections with learning rules, where the learning rule needs to modify the individual elements in the full connection weight matrix. For such learning rules, using a decoded connection would not work since the learning rule would not have access to the full weight matrix (only the decoders).

Neuron to ensemble

nengo.Connection(ensA.neurons, ensB)

Here, the connection weights in the connection are treated as a connectivity matrix, but ensB’s encoders are also included in the computation. While technically possible, I can’t think of any typical use cases for this type of connection. :smiley:

Note:
You can also have connections to and from other objects (namely, nengo.Nodes). For nodes, connections from them are treated as just a connectivity matrix (pure math). And connection to nodes are treated the same too.