chain rule
In plain wordsA rule for working out how a change ripples through a chain of steps by combining the effect at each step. It is how AI training traces each error back through every layer.
- 1
Calculus
The rule for differentiating a composition of functions: the derivative of f(g(x)) is f′(g(x)) · g′(x), and for functions of several variables the JacobiansJacobian, n.: A table listing how each output of a process responds to a small change in each input. It describes how a transformation locally stretches, squeezes and turns space. of the stages multiply. A neural network is a long composition of simple functions, so the partial derivativespartial derivative, n.: How much a quantity changes when you nudge just one of its many inputs while holding all the others fixed. of its lossloss function, n.: A score that measures how wrong a model's predictions are. Training means adjusting the model, step by step, to push this number down. with respect to each weight are products of many local derivatives. Backpropagationbackpropagation, n.: The method neural networks use to learn from mistakes: it works backward from the error to figure out how much each internal connection contributed, so every connection can be adjusted in the right direction. and reverse-mode automatic differentiationautomatic differentiation, n.: A technique that lets a computer work out exactly how a program's output would change if its inputs changed slightly, by tracking every arithmetic step. It lets AI software compute training updates automatically. apply the chain rule systematically from the output backward, reusing shared intermediate products, so that all the gradients together cost only a small constant multiple of a forward pass (typically about twice its arithmetic). Long products of factors smaller or larger than one are the root of vanishingvanishing gradient problem, n.: A training difficulty in deep or recurrent networks: the learning signal shrinks as it travels back through many layers or time steps, so the early parts of the network barely learn. and exploding gradientsexploding gradient problem, n.: A training failure in which the learning signal grows out of control as it passes back through a network, so the weights jump wildly and training breaks down..
The custom kernel broke the chain rule because its backward function ignored the second input.
- 2
Probability
The identity that factors a joint probability into a product of conditionals: p(x₁, …, xₙ) = p(x₁) p(x₂ | x₁) ⋯ p(xₙ | x₁, …, xₙ₋₁), valid for any ordering of the variables. It underlies autoregressiveautoregressive model, n.: A model that produces a sequence one piece at a time, each new piece depending on the pieces already produced — like writing a sentence word by word without going back. language models, which score a whole text by multiplying the conditional probabilitiesconditional probability, n.: The chance of something once you already know that something else is true — for example, the chance of rain given that the sky is cloudy. of each tokentoken, n.: The small chunk of text an AI language model reads and writes — often a word, part of a word or a punctuation mark. AI usage, limits and prices are counted in tokens. given the tokens before it, and generate text by samplingsampling, n.: Picking some items at random from a larger set or from a range of possibilities — surveying 1,000 voters, say, or letting an AI choose its next word by a weighted lottery. one token at a time.
Origin
Gottfried Wilhelm Leibniz used the rule in a 1676 manuscript; older English texts called it the rule for differentiating 'a function of a function'. The German Kettenregel appears by 1921, and 'chain rule' spread in English through E. J. McShane's 1934 translation of Richard Courant's calculus textbook. Seppo Linnainmaa described its reverse-mode use for computing derivatives efficiently in 1970.
Related
- backpropagationbackpropagation, n.: The method neural networks use to learn from mistakes: it works backward from the error to figure out how much each internal connection contributed, so every connection can be adjusted in the right direction.
- automatic differentiationautomatic differentiation, n.: A technique that lets a computer work out exactly how a program's output would change if its inputs changed slightly, by tracking every arithmetic step. It lets AI software compute training updates automatically.
- derivativederivative, n.: How fast something changes as one of its inputs changes — the steepness of a curve at a point. Training an AI means repeatedly following such slopes downhill.
- JacobianJacobian, n.: A table listing how each output of a process responds to a small change in each input. It describes how a transformation locally stretches, squeezes and turns space.
- conditional probabilityconditional probability, n.: The chance of something once you already know that something else is true — for example, the chance of rain given that the sky is cloudy.
- autoregressive modelautoregressive model, n.: A model that produces a sequence one piece at a time, each new piece depending on the pieces already produced — like writing a sentence word by word without going back.
- vanishing gradient problemvanishing gradient problem, n.: A training difficulty in deep or recurrent networks: the learning signal shrinks as it travels back through many layers or time steps, so the early parts of the network barely learn.
Mentioned in
backpropagationbackpropagation, n.: The method neural networks use to learn from mistakes: it works backward from the error to figure out how much each internal connection contributed, so every connection can be adjusted in the right direction., automatic differentiationautomatic differentiation, n.: A technique that lets a computer work out exactly how a program's output would change if its inputs changed slightly, by tracking every arithmetic step. It lets AI software compute training updates automatically., backward passbackward pass, n.: The step in training where the network works backward from its error, layer by layer, to calculate how each internal setting should change., conditional probabilityconditional probability, n.: The chance of something once you already know that something else is true — for example, the chance of rain given that the sky is cloudy., derivativederivative, n.: How fast something changes as one of its inputs changes — the steepness of a curve at a point. Training an AI means repeatedly following such slopes downhill., partial derivativepartial derivative, n.: How much a quantity changes when you nudge just one of its many inputs while holding all the others fixed., JacobianJacobian, n.: A table listing how each output of a process responds to a small change in each input. It describes how a transformation locally stretches, squeezes and turns space., Seppo LinnainmaaSeppo Linnainmaa, prop. n.: A Finnish computer scientist who in 1970 first published the method for computing all of a program's derivatives in one backward pass, the mathematical core of backpropagation.