Connection Management

From NEST

Jump to: navigation, search

[ Software:Documentation ]

Contents

Connections in NEST

Each connection between neural elements (nodes) in NEST is represented by at least the following parameters:

  • The pre- and postsynaptic nodes
  • The weight of the connection
  • The synaptic delay of the connection
  • The receiver port, which is the number the connection is registered with the postsynaptic target

Synapse types

To allow learning and plasticity, it may not be sufficient to store the parameters of the connections. To apply dynamics to the parameters, it is possible to use different synapse types. Several of them are directly built into NEST. A list of the available types is accessible via the synapsedict. The most simple type is called static_synapse and provides only the mandatory connection parameters mentioned above, without any plasticity involved. To inspect the synapsedict, the command

 synapsedict info

can be used. The output is shown below:

 --------------------------------------------------
 Name                     Type                Value
 --------------------------------------------------
 cont_delay_synapse       integertype         1
 static_synapse           integertype         0
 stdp_pl_synapse_hom      integertype         5
 stdp_synapse             integertype         3
 stdp_synapse_hom         integertype         4
 tsodyks_synapse          integertype         2
 --------------------------------------------------
 Total number of entries: 6

Synapse context

Because one often needs to set up connections of the same type, the user can set a default value, the so-called synapse context. This is simply the currently active synapse type and defaults to /static_synapse.

To retrieve and modify the synapse context, the commands GetSynapseContext and SetSynapseContext are used. The first returns the current synapse context, while the latter takes a synapse type and sets the context accordingly. For example

 /tsodyks_synapse SetSynapseContext

Synapse parameters

Each synapse type has a set of parameters. A default set of these parameters is stored in the synapse context. To inspect the default parameters for a specific synapse type, the command

 /tsodyks_synapse GetSynapseDefaults

will yield a dictionary with the default parameters. In the example above the contents of this dictionary look like

 --------------------------------------------------
 Name                     Type                Value
 --------------------------------------------------
 x                        doubletype          1
 y                        doubletype          0
 weight                   doubletype          1
 delay                    doubletype          1
 receiver_port            integertype         0
 U                        doubletype          0.5
 tau_psc                  doubletype          3
 tau_rec                  doubletype          800
 tau_fac                  doubletype          0
 u                        doubletype          0
 --------------------------------------------------
 Total number of entries: 10


To change (an arbitrary subset of) these default values, the command SetSynapseDefaults can be used as in the following example

 /tsodyks_synapse
 <<
   /tau_rec 1200.0
   /weight 5.6
 >>
 SetSynapseDefaults

Establishing connections

All connections will be made with the current synapse context as type. This allows to conveniently set default values for the parameters before establishing the connections.

Note: Devices cannot be connected to neurons via any of the dynamic synapse types. You have to set the synapse context to static_synapse to connect them.

In the most simple case, a connection between two nodes is created by using the Connect command. This command exists in three variants that take different parameters:

neuron1 neuron2 Connect
the adresses of the pre- and postsynaptic nodes
neuron1 neuron2 weight delay Connect
the pre- and postsynapstic nodes and the additional parameters weight and delay
neuron1 neuron2 << /tau_fac 1200.0 /weight 2.0 >> Connect
the pre- and postsynapstic nodes and a dictionary containing the parameters (or a subset thereof) for the connection

Following is a small example script that creates a poisson_generator and an iaf_neuron and connects them with a weight of 1.0 and a delay of 0.4 ms.

 /poisson_generator Create /pg Set
 /iaf_neuron Create /n Set
 pg n 1.0 0.4 Connect

To establish more complex network structures, SLI provides a multitude of high-level connection commands that are described in the following sections.

Convergent connections

To connect a subpopulation

Divergent connections

Topological connections

If the connect functions above are not sufficient, the topology module provides more sophisticated functions. For example, it is possible to create receptive field structures and much more!

Inspecting connections

A list of outgoing connections of a certain type of a node are available via the dictionary that is returned by GetConnections. To check the outgoing connections of the node with global ID 2, type

 2 /tsodyks_synapse GetConnections

The contents of the connections dictionary can be printed with the info command. The dictionary contains one array for each parameter containing the values for all outgoing connections. An example is shown below.

 --------------------------------------------------
 Name                     Type                Value
 --------------------------------------------------
 delays                   arraytype           <arraytype>
 receiver_ports           arraytype           <arraytype>
 targets                  arraytype           <arraytype>
 tau_facs                 arraytype           <arraytype>
 tau_pscs                 arraytype           <arraytype>
 tau_recs                 arraytype           <arraytype>
 Us                       arraytype           <arraytype>
 us                       arraytype           <arraytype>
 weights                  arraytype           <arraytype>
 xs                       arraytype           <arraytype>
 ys                       arraytype           <arraytype>
 --------------------------------------------------

Note: This list only contains the connections for the given synapse context and for the targets on thread 0. To see connections with targets on other threads than thread 0, you may use extended addresses.

The position of a connection inside this arrays is called its port. Subsequently, to obtain the delay of the fourth connection of node 2, one would type

 2 /tsodyks_synapse GetConnections /delays get 3 get


Modifying existing connections

Views
Personal tools