Rahul Sharma (Editor)

Delta rule

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

In machine learning, the delta rule is a gradient descent learning rule for updating the weights of the inputs to artificial neurons in a single-layer neural network. It is a special case of the more general backpropagation algorithm. For a neuron j with activation function g ( x ) , the delta rule for j 's i th weight w j i is given by

Δ w j i = α ( t j y j ) g ( h j ) x i ,

where

It holds that h j = x i w j i and y j = g ( h j ) .

The delta rule is commonly stated in simplified form for a neuron with a linear activation function as

Δ w j i = α ( t j y j ) x i

While the delta rule is similar to the perceptron's update rule, the derivation is different. The perceptron uses the Heaviside step function as the activation function g ( h ) , and that means that g ( h ) does not exist at zero, and is equal to zero elsewhere, which makes the direct application of the delta rule impossible.

Derivation of the delta rule

The delta rule is derived by attempting to minimize the error in the output of the neural network through gradient descent. The error for a neural network with j outputs can be measured as

E = j 1 2 ( t j y j ) 2 .

In this case, we wish to move through "weight space" of the neuron (the space of all possible values of all of the neuron's weights) in proportion to the gradient of the error function with respect to each weight. In order to do that, we calculate the partial derivative of the error with respect to each weight. For the i th weight, this derivative can be written as

E w j i .

Because we are only concerning ourselves with the j th neuron, we can substitute the error formula above while omitting the summation:

E w j i = ( 1 2 ( t j y j ) 2 ) w j i

Next we use the chain rule to split this into two derivatives:

= ( 1 2 ( t j y j ) 2 ) y j y j w j i

To find the left derivative, we simply apply the general power rule:

= ( t j y j ) y j w j i

To find the right derivative, we again apply the chain rule, this time differentiating with respect to the total input to j , h j :

= ( t j y j ) y j h j h j w j i

Note that the output of the j th neuron, y j , is just the neuron's activation function g applied to the neuron's input h j . We can therefore write the derivative of y j with respect to h j simply as g 's first derivative:

= ( t j y j ) g ( h j ) h j w j i

Next we rewrite h j in the last term as the sum over all k weights of each weight w j k times its corresponding input x k :

= ( t j y j ) g ( h j ) ( k x k w j k ) w j i

Because we are only concerned with the i th weight, the only term of the summation that is relevant is x i w j i . Clearly,

x i w j i w j i = x i ,

giving us our final equation for the gradient:

E w j i = ( t j y j ) g ( h j ) x i

As noted above, gradient descent tells us that our change for each weight should be proportional to the gradient. Choosing a proportionality constant α and eliminating the minus sign to enable us to move the weight in the negative direction of the gradient to minimize error, we arrive at our target equation:

Δ w j i = α ( t j y j ) g ( h j ) x i .

References

Delta rule Wikipedia