ArticleslgStudy

computer science

Delta rule

Delta rule is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Delta rule rather than just read about it. In short: 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 can be derived as the backpropagation algorithm for a single-layer neural network with mean-square error loss function.

Key takeaways

  • Delta rule belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Delta rule to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Delta rule from memory before moving on to harder problems.

Reference excerpt

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 can be derived as the backpropagation algorithm for a single-layer neural network with mean-square error loss function. For a neuron j with activation function g(x), the delta rule for neuron j's i-th weight wji is given by Δwji=α(tj−yj)g′(hj)xi, where

α is a small constant called learning rate g(x) is the neuron's activation function g′ is the derivative of g tj is the target output hj is the weighted sum of the neuron's inputs yj is the actual output xi is the i-th input. It holds that hj=∑ixiwji and yj=g(hj). The delta rule is commonly stated in simplified form for a neuron with a linear activation function as Δwji=α(tj−yj)xi 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=∑j12(tj−yj)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 ith weight, this derivative can be written as ∂E∂wji. Because we are only concerning ourselves with the j-th neuron, we can substitute the error formula above while omitting the summation: ∂E∂wji=∂∂wji[12(tj−yj)2] Next we use the chain rule to split this into two derivatives: ∂E∂wji=∂(12(tj−yj)2)∂yj∂yj∂wji To find the left derivative, we simply apply the power rule and the chain rule: ∂E∂wji=−(tj−yj)∂yj∂wji To find the right derivative, we again apply the chain rule, this time differentiating with respect to the total input to j, hj: ∂E∂wji=−(tj−yj)∂yj∂hj∂hj∂wji Note that the output of the jth neuron, yj, is just the neuron's activation function g applied to the neuron's input hj. We can therefore write the derivative of yj with respect to hj simply as g's first derivative: ∂E∂wji=−(tj−yj)g′(hj)∂hj∂wji Next we rewrite hj in the last term as the sum over all k weights of each weight wjk times its corresponding input xk: ∂E∂wji=−(tj−yj)g′(hj)∂∂wji[∑ixiwji] Because we are only concerned with the ith weight, the only term of the summation that is relevant is xiwji. Clearly, ∂(xiwji)∂wji=xi. giving us our final equation for the gradient: ∂E∂wji=−(tj−yj)g′(hj)xi 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: Δwji=α(tj−yj)g′(hj)xi.

See also Stochastic gradient descent Backpropagation Rescorla–Wagner model – the origin of delta rule

References

Worked examples

Example 1 — a first encounter with Delta rule

Start with the simplest possible case. Write down what Delta rule claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Delta rule before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Delta rule ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Delta rule

In research
Delta rule appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Delta rule in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Delta rule is common in secondary-school and first-year university syllabi. It links to neighbouring topics Artificial neural networks, so understanding it makes those chapters shorter.
In everyday life
Look for Delta rule outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Delta rule” →

How to study Delta rule in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Delta rule means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Delta rule out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Delta rule in simple terms?

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 can be derived as the backpropagation algorithm for a single-layer neural network with mean-square error loss function.

Why does Delta rule matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Delta rule?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Delta rule.

Tags

  • Artificial neural networks

Keep exploring