CCNBook/Sims/Networks/Cats and Dogs
|CCNBook/Sims/Networks/Cats and Dogs|
|Filename||File:cats and dogs.proj|
|Author||Randall C. O'Reilly|
|Publication||(O'Reilly, Munakata, Frank, Hazy, & Contributors, 2012)|
|First Published||Jul 28 2016|
|Tags||Semantic Network, Generalization, Prototypes, Constraint Satisfaction|
|Description||A simple semantic network that demonstrates how networks can generalize, and represent prototypes, and satisfy various different constraints.|
|Updated||28 July 2016, 6 September 2016, 13 January 2017|
|Versions||8.0.0, 8.0.2, 8.0.3|
|Emergent Versions||8.0.0, 8.0.4|
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.
|Socks||Black & White||Small||Bugs||Feather|
|Sylvester||Black & White||Small||Grass||String|
|Spot||Black & White||Medium||Scraps||Bone|
|Snoopy||Black & White||Medium||Scraps||Bone|
The knowledge embedded in the network is summarized in the table to the right. 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
FFFB inhibitory function here which allows considerable flexibility in the actual number of active units per layer.
| ⇒ Now, click on the view panel tab. |
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 is already on by default (with a value of 1) -- we will use this.
| ⇒ Press and in the . |
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 view -- first click on the red arrow in upper right-hand corner, then use the left mouse button to toggle unit activation on or off. |
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.
| ⇒ Select only the |
You should see that the network activates features that are typical of cats, and ends up settling on a subset of cat individuals -- use to see the settling in detail, or look at the to see the trajectory in one glance. You can repeat this for dogs.
|Question 3.4: Explain why the subset of cat individuals ended up getting activated, when just |
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 tab in the right view panel |
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 some more specific queries for the network.
| ⇒ Activate the |
You should see that the harmony value is lower than that for just
Cat alone. This lower harmony reflects the fact that you provided discordant, inconsistent constraints, which the network was not able to satisfy as well.
| ⇒ Turn off the |
Although this case starts off earlier, the final harmony is also lower than Cat alone, because even though there are some medium-sized cats, there are fewer of them, so the constraints are tighter. Put another way,
Cat is an easy constraint to satisfy, so the resulting harmony is large.
Medium 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 view for this purpose. It shows the state of the network every
grid_interval (default = 5) cycles of updating.
Have fun experimenting!
| ⇒ You may now close the project (use the window manager close button on the project window or menu item) and then open a new one, or just quit emergent entirely by doing menu option or clicking the close button on the root window. |