Download presentation

1
**The back-propagation training algorithm**

Class Exercise

2
**The back-propagation training algorithm**

Step 1: Initialisation Set all the weights and threshold levels of the network to random numbers uniformly distributed inside a small range: where Fi is the total number of inputs of neuron i in the network. The weight initialisation is done on a neuron-by-neuron basis. ÷ ø ö ç è æ + - i F 4 . 2 ,

3
Step 2: Activation Activate the back-propagation neural network by applying inputs x1(p), x2(p),…, xn(p) and desired outputs yd,1(p), yd,2(p),…, yd,n(p). (a) Calculate the actual outputs of the neurons in the hidden layer: where n is the number of inputs of neuron j in the hidden layer, and sigmoid is the sigmoid activation function.

4
**Step 2: Activation (continued)**

(b) Calculate the actual outputs of the neurons in the output layer: where m is the number of inputs of neuron k in the output layer.

5
Step 3: Weight training Update the weights in the back-propagation network propagating backward the errors associated with output neurons. (a) Calculate the error gradient for the neurons in the output layer: where Calculate the weight corrections: Update the weights at the output neurons:

6
**Step 3: Weight training (continued)**

(b) Calculate the error gradient for the neurons in the hidden layer: Calculate the weight corrections: Update the weights at the hidden neurons:

7
Step 4: Iteration Increase iteration p by one, go back to Step 2 and repeat the process until the selected error criterion is satisfied.

8
**As an example, we may consider the three-layer back-propagation network.**

Suppose that the network is required to perform logical operation Exclusive-OR. Recall that a single-layer perceptron could not do this operation. Now we will apply the three-layer net.

9
**Three-layer network for solving the Exclusive-OR operation**

10
The effect of the threshold applied to a neuron in the hidden or output layer is represented by its weight, , connected to a fixed input equal to 1. The initial weights and threshold levels are set randomly as follows: w13 = 0.5, w14 = 0.9, w23 = 0.4, w24 = 1.0, w35 = 1.2, w45 = 1.1, 3 = 0.8, 4 = 0.1 and 5 = 0.3.

11
We consider a training set where inputs x1 and x2 are equal to 1 and desired output yd,5 is 0. The actual outputs of neurons 3 and 4 in the hidden layer are calculated as Now the actual output of neuron 5 in the output layer is determined as: Thus, the following error is obtained:

12
**The next step is weight training**

The next step is weight training. To update the weights and threshold levels in our network, we propagate the error, e, from the output layer backward to the input layer. First, we calculate the error gradient for neuron 5 in the output layer: Then we determine the weight corrections assuming that the learning rate parameter, , is equal to 0.1:

13
**Next we calculate the error gradients for neurons 3 and 4 in the hidden layer:**

We then determine the weight corrections:

14
**At last, we update all weights and threshold:**

5038 . 0038 5 13 = + D w 8985 0015 9 14 - 4038 4 23 9985 1 24 2067 0067 2 35 0888 0112 45 7962 8 3 q 0985 3127 0127 The training process is repeated until the sum of squared errors is less than

15
**Learning curve for operation Exclusive-OR**

16
**Final results of three-layer network learning**

17
**Network represented by McCulloch-Pitts model for solving the Exclusive-OR operation**

18
Decision boundaries (a) Decision boundary constructed by hidden neuron 3; (b) Decision boundary constructed by hidden neuron 4; (c) Decision boundaries constructed by the complete three-layer network

19
**VARIATIONS in multilayer neural networks**

Modifications can be made to improve performance of BP May involve: Changes in weight update procedure Alternative to sigmoid activation function Improve the computational power

20
**Alternative Weight Update Procedures**

Momentum BP with momentum, the weight change using combination of current and previous gradient Advantage when some training data are very different/unusual from the majority of the data (or incorrect) Use a small learning rate to avoid a major disruption of learning Or maintain training pace

21
**Alternative Weight Update Procedures**

Momentum Faster convergence with momentum To use momentum, weights from 1 or more previous training need to be saved

22
**Alternative Weight Update Procedures**

BP with momentum wjk(t+1) = wjk(t) + kzj + [wjk(t) – wjk(t - 1)] wjk(t+1) = kzj + wjk(t) and vij(t + 1) = vij(t) + jxi + [vij(t) – vij(t - 1)] vij(t + 1) = jxi + vij(t)

23
**Alternative Weight Update Procedures**

Advantage of adding Momentum Allows the net to make reasonably large weight adjustments as long as the corrections are in the same general direction for several patterns while using small learning rate to prevent a large response to the error from any one training patterns Reduce local minimum In momentum, the net is proceeding not in the direction of the gradient, but the direction of a combination of the current gradient and the previous direction of weight correction

24
**Alternative Weight Update Procedures**

Example of adding Momentum Example , using the same initial weights and architecture, adding momentum 0.9 with a learning rate as before (0.2) reduces training requirements from 387 epochs to 38 epochs.

25
**Adaptive Learning Rates**

Changing learning rate during training Delta-Bar-Delta Allow each weight to have its own learning rate Let the learning rates vary with time as training progresses

26
**Adaptive Learning Rates**

To accelerate the convergence and yet avoid the danger of instability, we can apply two heuristics: Heuristic 1 If the change of the sum of squared errors has the same algebraic sign (direction) for several consequent epochs, then the learning rate parameter, , should be increased. Heuristic 2 If the algebraic sign of the change of the sum of squared errors alternates for several consequent epochs, then the learning rate parameter, , should be decreased.

27
**Adapting the learning rate requires some changes in the back-propagation algorithm.**

If the sum of squared errors at the current epoch exceeds the previous value by more than a predefined ratio (typically 1.04), the learning rate parameter is decreased (typically by multiplying by 0.7) and new weights and thresholds are calculated. If the error is less than the previous one, the learning rate is increased (typically by multiplying by 1.05).

28
**Adaptive Learning Rates**

Formula Delta-bar delta rule Weight update rule Learning rate update rule wij(t) : arbitrary weight at time t ij(t) : learning rate for that weight at time t E : squared error for the pattern presented at time t

29
**Adaptive Learning Rates**

Formula Delta-bar delta rule Weight update rule Learning rate update rule E wjk wjk(t + 1) = wjk(t) - jk(t + 1) = wjk(t) - jk(t + 1)kzj E wjk jk = Where standard weight changes Pp 308 = -kzj

30
**Adaptive Learning Rates**

Performance METHOD SIMULATIONS SUCCESSES MEAN EPOCH BP ,859.8 BP+momentum ,056.3 Delta-bar-delta

31
**Adaptive Learning Rates**

Formula Delta-bar delta rule Weight update rule Learning rate update rule E wjk wjk(t + 1) = wjk(t) - jk(t + 1) = wjk(t) - jk(t + 1)kzj E wjk jk = Where standard weight changes Pp 308 = -kzj

32
**Learning with adaptive learning rate**

33
**Learning with momentum and adaptive learning rate**

34
**Accelerated learning in multilayer neural networks**

A multilayer network learns much faster when the sigmoidal activation function is represented by a hyperbolic tangent: where a and b are constants. Suitable values for a and b are: a = and b = 0.667

35
**We also can accelerate training by including a momentum term in the delta rule:**

where is a positive number (0 1) called the momentum constant. Typically, the momentum constant is set to 0.95. This equation is called the generalised delta rule.

36
**Learning with momentum for operation Exclusive-OR**

37
**Learning with adaptive learning rate**

To accelerate the convergence and yet avoid the danger of instability, we can apply two heuristics: Heuristic 1 If the change of the sum of squared errors has the same algebraic sign for several consequent epochs, then the learning rate parameter, , should be increased. Heuristic 2 If the algebraic sign of the change of the sum of squared errors alternates for several consequent epochs, then the learning rate parameter, , should be decreased.

38
**Adapting the learning rate requires some changes in the back-propagation algorithm.**

If the sum of squared errors at the current epoch exceeds the previous value by more than a predefined ratio (typically 1.04), the learning rate parameter is decreased (typically by multiplying by 0.7) and new weights and thresholds are calculated. If the error is less than the previous one, the learning rate is increased (typically by multiplying by 1.05).

39
**Learning with adaptive learning rate**

40
**Learning with momentum and adaptive learning rate**

Similar presentations

© 2021 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google