CECN1 Cats and Dogs

From Computational Cognitive Neuroscience Wiki

Jump to: navigation, search

Cats and Dogs Semantic Network

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)

  • 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.

We will begin our exploration with a simple semantic network intended to represent a (very small) set of relationships among different features used to represent a set of entities in the world. In our case, we represent some features of cats and dogs: their color, size, favorite food, and favorite toy. The network contains information about a number of individual cats and dogs, and is able to use this information to make generalizations about what cats and dogs in general have in common, and what is unique about them. It can also tell you about the consistency of a given feature with either cats or dogs -- this is where the harmony function can be useful in assessing the total constraint satisfaction level of the network with a particular configuration of feature inputs. The network can also be used to perform pattern completion as a way of retrieving information about a particular individual or individuals. Thus, this simple network summarizes many of the topics covered in this chapter.

The knowledge embedded in the network is summarized in table 3.1 in the textbook. This knowledge is encoded by simply setting a weight of 1 between an instance node representing an individual cat or dog and the corresponding feature value that this individual possesses (c.f., the Jets and Sharks model from McClelland & Rumelhart, 1988). Each of the groups of features (i.e., values within one column of the table) are represented within distinct layers that have their own within-layer inhibition. In additon, all of the identity units and the name units are within their own separate layers as well. We use the KWTA_AVG inhibitory function here, because it will be important for the network to have some flexibility in the actual number of active units per layer. The k parameter is set to 3 for most layers, except Species where it is 1, and Size where it is 2.

As usual, take some time to examine the weights in the network, and verify that the weights implement the knowledge shown in the table. To do so, select the r.wt value on the .PanelTab.CatsDogsNet tab and then click on individual units in the display using the red arrow button.

  • Now, click on the .T3Tab.StdInputData view panel tab, and then open the data table object .data.gp.InputData.StdInputData located in the data/InputData subgroup in the left-hand browser panel (or click on the green outer frame in the view with the red arrow).

You will see a collection of matrices representing each layer -- these are the inputs that will be soft clamped into the corresponding network units when the Run button is pressed.

Let's first verify that when we present an individual's name as input, it will recall all of the information about that individual. This is a form of pattern completion with a single unique input cue. You should see that Morris in the Name layer units of .data.gp.InputData.StdInputData is already on by default (with a value of 1) -- we will use this.

You should see that the network activates the appropriate features for Morris. You can think about this process as finding the most harmonious activation state given the input constraint of Morris, and the constraints in the network's weights. Equivalently, you can think about it as settling into the Morris attractor.

  • Go ahead and try a few other name activations (change the appropriate value from 0 to 1) in the StdInputData table (you must edit it in the spreadsheet-like middle pane viewer -- clicking in the 3D view is not yet supported). Also, be sure to set the previous one back to 0.

Now, let's see how this network can give us general information about cats versus dogs, even though at some level it just has information about a set of individuals.

You should find that the network activates all those features that are typical of cats. You can repeat this for dogs.


Question 3.15 (a) Explain the reason for the different levels of activation for the different features of cats when just Cat was activated. (b) How might this be useful information?


Constraint Satisfaction

Now let's make use of some of the constraint satisfaction ideas. We can view the harmony of the network over cycles of settling using a graph view.

  • Select the .T3Tab.CycleHarmonyData tab in the right view panel, and press the REFRESH button or re-Run the network to display the graph data.

Notice that, as we expected, this value appears to monotonically increase over settling, indicating that the network is increasingly satisfying the constraints as the activations are updated.

Now, let's make a more specific query for the network.

  • Activate the Orange color input in addition to Cat, and press Run.

You should see that although the initial harmony value was slightly larger (reflecting the greater excitation present from the input), the final harmony value was significantly lower that that for just Cat alone. This lower harmony reflects the fact that the more constraints you impose externally, the less likely the network will be able to satisfy them as well. Put another way, Cat is an easy constraint to satisfy, so the resulting harmony is large. Cat plus Orange is harder to satisfy because it applies to fewer things, so the harmony is lower.

There are a seemingly infinite number of different ways that you can query the network -- go ahead and present different input patterns and see what kinds of responses the network gives you. Most of them will we hope be recognizable as a reasonable response to the set of constraints provided by the input pattern.

It is sometimes interesting to try to figure out how the activation spreads through the network as it settles. You can view the .T3Tab.CycleGridData view for this purpose. It shows the state of the network every grid_interval (default = 5) cycles of updating.

Have fun experimenting!

Personal tools