The Necker cube provides a useful paradign for demonstrating the properties of constraint satisfaction networks (Feldman, 1981) such as the Boltzmann machine (McClelland & Rumelhart, 1988). In the following simulation two sets of eight units represent the alternate interpretations of the cube. For example, the top right most unit represents an upper right back vertex in the top interpretation and a upper right front vertex in the lower interpretation. The same vertex cannot be both a front and a back vertex so these units represent conflicting interpretations and are joined with a negative weight in the network. To see all of the weights in the network select the weights visible checkbox. The red lines represent negative weights and the blue lines positive weights. There are three sorts of constraints implemented in these connections:

- each vertex can have only one interpretation - therefore there are negative weights connecting units representing different interpretations of the same vertex
- the same interpretation cannot be given to more than one vertex - so units representing the same interpretation are connected with negative weights
- units from the same interpretation should be on together - so locally consistent units are connected with positive weights

On each iteration of the algorithm a unit is selected. The weights of the incoming connections are multiplied by the corresponding activations (black = 1, white = 0) and are summed. If there are alot of units active with positive connections to this unit and few active that have negative connections the sum will be large. Conversely, if there are already alot of units active that have negative connections to this unit the sum will be negative. The activation of the unit is then set to 1 with probability p where p equals the sigmoid function of the summed weighted activation. The sigmoid function serves to squash the input so that it falls between 0 and 1 (to ensure it can be interpreted as a probability). A unit with a large summed activation will have a high probability of being set to 1.

As the network is run through multiple iterations it tends to settle to one of the two interpretations. The goodness value is a measure of how well the network is satifying all of the constraints and should increase has the network converges. Try this now. Hit the reset button and then click several times on the "Do 20 Iterations" button. The network should gradually activate all of the units of one of the interpretations and deactivate the units of the other interpretation. To try it again hit "Reset" and start again.

Questions:

- What factors determine which of the interretations the network settles into?
- On some runs, the network seems to stay in a nonoptimal state for some time before eventually converging to one of the interpretations. Which states is it likely to "get stuck" in and why? (Hint: Watch the goodness value carefully when the network becomes "unstuck").

McClelland, J. L. & Rumelhart, D. E. (1988). Explorations in Paralell Distributed Processing: A Handbook of Modles, Programs and Exercises. MIT Press, Cambridge, MA.

Sekular, R. & Blake, R. Perception. Knopf, New York.