CECN1 Bidirectional Transformations

From Computational Cognitive Neuroscience Wiki

Jump to: navigation, search

Bidirectional Transformations

Back to CECN1 Projects

Project Documentation

(note: this is a literal copy from the simulation documentation -- it contains links that will not work within the wiki)

We begin our introduction to the bidirectional case by exploring a bidirectional version of the the localist digit network. We will see that this network can perform the same kinds of transformations as the unidirectional one, but in both directions.

  • To start, it is usually a good idea to do Object/Edit Dialog in the menu just above this text, which will open this documentation in a separate window that you can more easily come back to. Alternatively, you can always return by clicking on the ProjectDocs tab at the top of this middle panel.

Note that this project looks very similar to the previous digit networks, having the same windows, etc.

We first examine the .T3Tab.Digit_Network. Note that there are two arrows connecting the Input and Hidden layers -- one going up and the other coming back down. This indicates bidirectional connectivity. We can view this connectivity as before.

  • Select the r.wt button in the .PanelTab.Digit_Network (Remember that you might have to scroll down the list of values to view). Now click on the hidden units and the input units. (Remember to select the red arrow at the far right of the window, by the network display)

When you click on the hidden units, you will see the now-familiar digit image templates. When you click on the input units, you will see that they now receive from the hidden units as well. Note that different input units receive from different numbers of sending units -- this reflects the different types of pattern overlap among the digit images.

A more direct way to see what would happen if you activated a hidden unit is to view its sending weights.

  • Select the s.wt button, and then select various hidden units.

These sending weights look just like the receiving ones -- templates of appropriate digit image. We next verify that in fact these weights are symmetric (the same in both directions).

  • Alternately click on r.wt and s.wt while a given hidden unit is selected.

You should notice no difference in the display. The interesting thing about symmetric weights is that, as you can see, a given unit activates the same things that activate it. This guarantees a kind of consistency in what things get activated in bidirectional networks. We will discuss the biological basis of weight symmetry in detail in chapter 5, where it plays an important role in the mathematical derivation of our error-driven learning mechanism.

Now we can run the network and see what these weights produce. First, let's replicate the previous feedforward results.

  • In the Digits_Network tab, select the act button to view the unit activities in the network, and press Init and Run in either the .PanelTab.ControlPanel, or the LeabraEpoch program object (selectable from the programs listing on the left browser).

This will present the images to the input layer for all of the digits. You will see the results of the run in the TrialOutputData alongside the network in the .T3Tab.Digit_Network view. Note that the grid view shows both the input and hidden activation states now. The results for this run should be exactly the same as for the feedforward network -- the bidirectionality of the weights has no additional effect here because the input units are clamped (fixed) to the pattern in the event. Therefore they are not actually computing their activations, so the incoming weights make absolutely no difference.

Now let's go in the opposite direction.

  • Set input_data to Digit_Categories (Apply) Init and Run.

This will run the network by clamping the digit category units in the hidden layer, instead of the digit images in the input. The resulting input patterns are those driven by the top-down weights from these units, as you might have noticed if you saw the dynamics of activation updating in the network window during the settling for each pattern. Otherwise, it is somewhat difficult to tell any difference between the two runs, since they both produce basically the same patterns of activity on both layers. However, you can tell that the hidden units are clamped during Digit_Categories because they are all at the same activation value, whereas this value varies when the input images are presented. The images also have a slightly lower activity value when driven from the digit category units. Furthermore, you can always click on the ext line in the network tab to see which units are being driven by external inputs (i.e., clamped).

  • Click on the ext line in the network view panel tab.

You should see that the hidden units, not the input units, are being driven by external input. You can also change the step prog in the ControlPanel to LeabraCycle and then each press of the Step button will produce one update of activations, so you can see it propagate from the Hidden layer down to the input layer.

This simple exercise demonstrates how bidirectional connectivity enables information to flow, and transformations to be computed, in both bottom-up and top-down directions. There are a number of other important issues surrounding this phenomenon. For example, what happens when there are different digit images that correspond to the same categorical hidden unit? With just a localist hidden representation, only the "prototypical" input (i.e., the one described exactly by the weights) will be activated in a top-down fashion. However, in the more realistic case of a distributed representation, lots of different input images can be produced by activating different combinations of hidden units.

We can get a sense of the effects of activating multiple combinations of hidden units in the localist network.

  • In the .PanelTab.ControlPanel (or the LeabraEpoch Program Ctrl, which is really what you're changing in the ControlPanel), set input_data to Combo_Categs hit Apply).

Let's first run the default case where the 3 and 7 units are activated.

  • Press Init and then Run.

Figure 3.14 shows the results you should see.


Question 3.6 (a) Describe what happens to the input layer activations when digit categories 7 and 3 are activated (be sure to note even subtle differences in activation). (b) How do you account for this result? (c) Can you change the value of g_bar_l to enhance any differences between the levels of activation of the active units? Explain why this helps. (d) How might this kind of enhancement of differences be generally useful in cognition?


You can now observe the effects of activating your own combinations of digit categories.

  • We will now use the project structure outline, in the far left window (it starts with "Project_0"), Click on the plus sign next to the green data entry. This will expand that entry so you can view all of the data associated with the project. Now, expand the InputData subgroup entry, then click directly on Combo_Categs. In the middle panel, click on the single (Matrix) entry.

This opens a table of zeros and ones, corresponding to the input that was clamped to the hidden layer; the two digit categories with 1s are the 3 and 7 categories. You can click on individual cells and enter 0s and 1s to change which categories are activated for the Combo_Categs run. To view the overall pattern graphically, you can click on the .T3Tab.Digits tab in the right view window.

  • Press Init and then Run to see the results of your new combination category

Have fun trying different combinations!

Personal tools