CCNBook/Sims/Executive/A Not B

From Computational Cognitive Neuroscience Wiki
Jump to: navigation, search
CCNBook/Sims/Executive/A Not B
Project Name a_not_b
Filename File:a not b.proj Open Project in emergent
Author Randall C. O'Reilly
Publication OReillyMunakataFrankEtAl12
First Published Nov 16 2016
Tags Prefrontal Cortex, Development, Active Maintenance, Biasing
Description Explores how the development of PFC active maintenance abilities can help to make behavior more flexible, in the sense that it can rapidly shift with changes in the environment.
Updated 16 November 2016, 15 January 2017, 17 January 2018
Versions 8.0.0, 8.0.2, 8.0.3, 8.0.4
Emergent Versions 8.0.1, 8.0.4, 8.5.1
Other Files

Back to CCNBook/Sims/All or Executive Function Chapter.


This simulation explores how the development of PFC active maintenance abilities can help to make behavior more flexible, in the sense that it can rapidly shift with changes in the environment. The development of flexibility has been extensively explored in the context of Piaget's famous A-not-B task, where a toy is first hidden several times in one hiding location (A), and then hidden in a new location (B). Depending on various task parameters, young kids reliably reach back at A instead of updating to B.

It is recommended that you click here to undock this document from the main project window. Use the Window menu to find this window if you lose it, and you can always return to this document by browsing to this document from the docs section in the left browser panel of the project's main window.

Let's examine the network first ABNet. It has location, cover, and toy inputs, and gaze/expectation and reach outputs. The internal hidden layer maintains information over the delay while the toy is hidden using recurrent self-connections, and represents the prefrontal cortex (PFC) in this model.

Notice that there are three location units corresponding to locations A, B, and C, represented in the location-based units in the network. Also, there are two cover (lid) input units corresponding to C1, the default cover type, and C2, a different cover type, and two toy units corresponding to T1, the default toy, and T2, a different toy type.

Click on r.wt so we can examine the connectivity. With the red arrow tool in the rar right frame, click on each of the three hidden units first, then the output units.

Each of the three input layers is fully connected to the hidden layer, and the hidden layer is fully connected to each of the two output layers. You can see that there is an initial bias for the same locations to be more strongly activating, with weights of .7, while other locations have only a .3 initial connection weight. Connections from the toy and cover units are relatively weak at .3. The hidden and output layers have self-recurrent excitatory connections back to each unit, which are initially of magnitude .25, but we can change this with the RecurrentCons wts.mean parameter in the ControlPanel. Stronger weights here will improve the network's ability to maintain active representations. We are starting out with relatively weak ones to simulate a young infant that has poor active maintenance abilities.

Now, let's examine the input data patterns that will be presented to the network.

Click on the InputData tab (right frame).

Note that there are three types of trials (to see them all, scroll with the purple bar on the right using the red arrow), indicated by the three names used in the Group column:

  • ptrial (pre-trial or "practice" trials): these are presented at the start of an experiment to induce infants to reach to the A location -- they only have a single time step delay between presentation of the item and the choice test.
  • Atrial: test trials to the A location, which only differ from ptrials in that the delay is longer.
  • Btrial: this is the key test condition, which is identical to the Atrials except the toy input is in the B location.

Each trial consists of five segments (rows in the table) corresponding to the experimental segments of an A-not-B trial as listed below. During each segment, patterns of activity are presented to the input units corresponding to the visible/salient aspects of the stimulus event; all other input units have no activity. The levels of input activity represent the salience of aspects of the stimulus, with more salient aspects (e.g. a toy that the experimenter waves) producing more activity.

  1. start: covers sit in place on the apparatus, out of reach for the infant, and before the experimenter draws infant's attention to a particular location (weak equal activation on locations and cover inputs).
  2. toy presentation (toy-pres): experimenter draws the infant's attention to a toy (e.g., waves it) and places it into one location in apparatus (one location more strongly active, and toy T1 active)
  3. lid presentation (lid-pres): experimenter further draws the infant's attention to the location while placing the lid over the toy location (toy fading out in activation while cover is more active, and location less active)
  4. delay: the apparatus sits (out of reach) with all covers in place (equal weak location and toy activation)
  5. choice: the experimenter makes the apparatus accessible (with covers in place) for the infant's response (reaching is possible/permitted only during this segment) (inputs more active than delay but same pattern; reach layer is disinhibited)

Each of these trial types can be repeated multiple times, as can the events within the trial. In the version we will be running, the task will consist of four pre-trials, two A trials, and one B trial (in that exact sequence). In addition, the toy-pres inputs are presented three times during each trial, and the number of delay events is varied for 'A' and 'B' trials in order to vary the working memory "load."

Now, let's run the network. It will be much easier to tell what is going on in the network by looking at a grid display, rather than trying to watch each trial's activation as the network runs (but you are welcome to do so by stepping through the inputs).

Click on the TrialOutputDataGrid tab. Then press the Init, Run buttons on the master ControlPanel.

When you do this, the network will run through an entire A-not-B experiment, and record the activations in the grid. The trial_name column tells you which event is being presented, and the remaining columns show the activations in each layer of the network after each event.

Let's focus on the pre-trials first. With the red arrow tool, scroll the purple handle along the right side up to the beginning of the table

Notice that when the toy is presented during the p-toy-pres events, the corresponding hidden 'A' location also has become activated due to spreading activations, and that the network also "looks" toward this location in the Gaze_Expectation layer.

Furthermore, because Hebbian learning is taking place after each trial, those units that are coactive experience weight increases, which in turn increases the propensity of the network to activate the A location representations on subsequent trials.

Next, scroll down past the 4 pre-trials so that the first A-trial event (A-start) is the first row displayed. (Just past midway through the table.)

You will now see the A testing trials, where the network's tendency to reach to the A location is assessed. Note that as a result of the Hebbian learning, the hidden and Gaze_Expectation output units are even more active here than in the pretrials.

Now scroll down to make the first B-trial event the first one displayed.

Question 10.4: Describe what happens to the network's internal representations and output (gaze, reach) responses over the delay and choice trials for the B trials, and how this relates to Piaget's A-not-B data in infants.

Now increase the recurrent_cons_rnd_mean parameter in the ControlPanel to .7 from the default of .4, and Init, Run and then scroll the table (if needed) so as to see the B trial again.

Question 10.5: Describe how the network responds (i.e., in the gaze and reach outputs) this time, including a discussion of how the increased PFC recurrent connection strength affected the network's behavior.

Next, set input_data to ABInput_Delay5 and try it with the value of .7 for the recurrent weights.

Question 10.6: What happens on the 'B' trials with those two delays -- why does delay have this effect on the network's behavior?

You can also try to find a recurrent weight value that allows the network to succeed with the longer 5 delay condition.

Now decrease the recurrent_cons_rnd_mean parameter to weaker value of .58 and set input data back to ABInput_Delay3, Init, Run and examine the B-trial again.

You should observe that the gaze and reach activations are now slightly dissociated on the B trial, reflecting the fact that the Gaze pathway is updated continuously, while the Reaching pathway has to wait until the end and is thus more sensitive to small amounts of decay.

A shorter delay allows infants to typically perform better (making fewer A-not-B errors) -- try going back to the original .4 recurrent weight value with the short delay condition of ABInput_Delay1 set.

Finally, there is an interesting effect that can occur with very weak recurrent weights, which do not allow the network to maintain the representation of even the A location very well on 'A' trials. Because the weight changes toward 'A' depend on such maintained activity of the 'A' units, these weight-based representations will be relatively weak, making the network perseverate less to 'A' than it would with slightly stronger recurrent weights.

To see this effect, set input_data back to the Delay3 case and then reduce the recurrent_cons_rnd_mean parameter to .1, Init, Run, and look at the activations of the units in the 'B' choice trial. Then compare this with the case with of .4.

You should see that there is a less strong 'A' response with the weaker recurrent weights (and also some residual activation of the 'B' units), meaning a less strong A-not-B error (and further analysis has confirmed that this is due to the amount of learning on the 'A' trials).

You may now close the project (use the window manager close button on the project window or File/Close Project menu item) and then open a new one, or just quit emergent entirely by doing Quit emergent menu option or clicking the close button on the root window.