4.2.10 Changing Things

Our network has succeeded in learning XOR, but none too quickly. The question arises, can backpropagation do a better job? The first thing that might occur to you to try is increasing the learning rate, so let's try that.

Before you can change the learning rate, you must understand how such variables are handled in the simulator. The simulator is set up so that it is possible to have different learning rates for different weights. This would, for example, allow us to have one learning rate for the weights from the input layer to the hidden layer, and a different learning rate for the weights from the hidden layer to the output layer. To allow this, parameters such as the learning rate are stored in structures called specifications or Specs. Each bias weight and each group of receiving weights (i.e., all the weights coming to a particular unit from a particular layer) has associated with it a pointer to a specification, and parameters such as the learning rate are read from the specification when they are used. Our network has been set up so that all of the weights and biases share the same specification. This specification is called a connection specification or ConSpec, and since it is the one we are using in this XOR network we have called it "XORConSpec".

One can look at this specification by selecting in the Project window .specs / Edit / XORConSpec. When this pops up we can see that there are actually several variables associated with this Spec, including lrate, momentum, and decay. We can change any one of these, but for now click in the lrate field and change the value to, say, 1.0. Then click Apply or Ok (which applies and closes the pop-up).

To see what happens with this higher learning rate, go ahead and Re Init on the Train Control panel as before. Before you hit Run you may wish to Clear the GraphLogView.

One can modify the learning process in other ways. For example, one can change the momentum parameter, or introduce decay. These parameters are also associated with the ConSpec and can be modified in the same way as the lrate. For more information about these parameters, see section 14.1.2 Bp Connection Specifications.

Another parameter of the Backpropagation model is the range of values allowed when initializing the connection weights. This is controlled by the var parameter of the rnd field of the ConSpec. The default value of 0.5 can be increased to larger values, such as 1.0, thereby giving a larger range of variation in the initial values of the weights (and biases).

One can also modify the learning process by selecting different options in the EpochProcess. For example, as initially configured, the XOR problem is run using SEQUENTIAL order of pattern presentation, and the mode of weight updating is BATCH. SEQUENTIAL order simply means that the patterns are presented in the order listed in the environment. The other two options are PERMUTED (each pattern presented once per epoch, but the order is randomly rearranged) and RANDOM (on each trial one of the patterns is selected at random from the set of patterns, so that patterns only occur once per epoch on the average).

The options for weight updating are BATCH, which means that the weights are updated at the end of the epoch; ON LINE, which means that the weights are updated after the presentation of each pattern, SMALL BATCH, which means that the weights are updated after every batch_n patterns, and TEST, which means that the weights are not updated at all.

These characteristics of the processing are managed by the "Epoch_0" process that is subordinate to the "Train_0" process--- and so to change them select .processes / Edit / Epoch_0 from the Project window menu bar. The dialog that pops up indicates the current values of these options (sequential and batch) next to their labels (order and wt update). Click on the current value of the option and the alternatives will be displayed; then select the one you want, and click Apply or Ok when done.