Connecting Neurons


Perhaps one of the most essential parts of building a network aside from creating the neurons is connecting those neurons to other neurons (and sometimes the same neurons). Connections embody the GUI component of synapses in Simbrain, and therefore graphically allow the one to manipulate the parameters of the synapses connecting one set of neurons to another. In addition to granting access to underlying synapses, connections and their related GUI components allow one to determine the topology of how (out of a multitude of ways) one set of neurons can connect to another. In the side menu are pages dedicated to each of the standard ways neurons can be connected in Simbrain.

For the quick and dirty on connecting neurons see "Keyboard shortcut method" below.


Source and Target Neurons

Varous commands in Simbrain (e.g: connecing nodes, training weights, viewing weight matrices) require you to specify a set of source and target neurons.   Source neurons are surrounded by red squares and target neurons are surrounded by the standard green selection squares.   Here is an example.

source target


To set source neurons: select a group of neurons and either (1) press the "1" key, (2) right click and select Connect > Set Source Neuron(s), or (3) use the Edit menu and select Connect > Set Source Neuron(s).
To set target neurons: simply select neurons as usual
To clear all source neurons: unselect all neurons (but clicking outside of any neuron), and (1) press the "1" key or (2) right click and select Connect > Set Source Neuron(s), or (3) use the Edit menu and select Connect > Set Source Neuron(s).
To clear specific source neurons: select the neurons of interest and (1) right click and select Connect > Clear Source Neuron(s), or (2) use the Edit menu and select Connect > Clear Source Neuron(s).

Note that the same neurons can be source and target neurons.

Connecting nodes.


Keyboard shortcut method

To quckly connect neurons:

    1) Set source neurons (select nodes and then press 1)
    2) Set target neurons (select nodes the green lasso)
    3) Connect (keyboard 2)

Repeate as needed to connect neurons in a series.  When done:

    4) Click outside of any neurons
    5) Press 1

This method works well.  You wil get used to it and soon by able to quickly connect neurons together.

Menu method

    - select source neurons
    - menu connect > set as source
    - select target
    - menu connect > connect-source-target > all to all

Connection objects

For this and the next method you can set properties of connection object using the “Set Connection Properties...” dialog.  You can make some very fancy and complex patterns of synaptic connection using this.  You can also add your own custom connection style.

Simple Connect Method

To connect a group of source nodes to one target node: Select one or more "source" nodes, then right-click on a target neuron and select connect nodes from the pop-up menu.

To connect a chain of nodes, one to another: Enter build mode, and single click in the following pattern: source, target 1, target 1, target 2, target 2, target 3,...


Selecting Weights via Connections
Connections can be selected in 3 different ways via the selection methods laid out in the Building and Editing Networks page.
   1) By selecting the weights directly using the lasso etc. (shown below)
   2) By right clicking on a neuron and selecting Select > Select incoming weights
   3) By right clicking on a neuron and selecting Select > Select outgoing weights



View Connections as a Weight Matrix

The Show Weight Matrix option can be selected after right clicking any neuron or group of neurons.  Source and target neurons must be set.   The window that appears represents the  source (red) neurons and target (green) neurons as columns.  Entries represent the strength of connections.  (Non-existing connections are not fully supported: they are represented by a zero that cannot change).



Weight Matrix Viewer Toolbar

Additionally one can manipulate the strength of connections through the weight matrix viewer. Clicking on a cell allows one to manipulate the synaptic strength of the connection represented by the cell. One can also randomize the values in the matrix, set values from a .csv file or save values to a .csv file.
Pressing the Random button will uniformly randomize the strength of all conections represented in the weight matrix viewer between two numbers (default (1,-1))
Pressing the Preferences button will allow one to set the upper and lower bounds on the viewer's randomize function.
Pressing the Open button allows one to open a .csv file and set the values of the connections represented by the viewer to the values specified in the file. Files representing matrices different from the dimensions of the weight matrix shown in the viewer are unsuitable for this task.
Pressing the Save button allows one to save the weight matrix as a .csv file, which can be opened later (as above).