Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Backpropagation
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Optimization algorithm for artificial neural networks}} {{About|the computer algorithm|the biological process|neural backpropagation}} {{Hatnote|Backpropagation can also refer to the way the result of a playout is propagated up the search tree in [[Monte Carlo tree search#Principle of operation|Monte Carlo tree search]].}}{{Machine learning bar}} In [[machine learning]], '''backpropagation''' is a [[gradient]] computation method commonly used for training a [[Neural network (machine learning)|neural network]] to compute its parameter updates. It is an efficient application of the [[chain rule]] to neural networks. Backpropagation computes the [[gradient]] of a [[loss function]] with respect to the [[Glossary of graph theory terms#weight|weights]] of the network for a single input–output example, and does so [[Algorithmic efficiency|efficiently]], computing the gradient one layer at a time, [[iteration|iterating]] backward from the last layer to avoid redundant calculations of intermediate terms in the chain rule; this can be derived through [[dynamic programming]].<ref name="kelley1960">{{cite journal |last1=Kelley |first1=Henry J. |author-link=Henry J. Kelley |year=1960 |title=Gradient theory of optimal flight paths |journal=ARS Journal |volume=30 |issue=10 |pages=947–954 |doi=10.2514/8.5282}}</ref><ref name="bryson1961">{{cite book |last=Bryson |first=Arthur E. |title=Proceedings of the Harvard Univ. Symposium on digital computers and their applications, 3–6 April 1961 |publisher=Harvard University Press |year=1962 |location=Cambridge |chapter=A gradient method for optimizing multi-stage allocation processes |oclc=498866871}}</ref>{{sfn|Goodfellow|Bengio|Courville|2016|p=[https://www.deeplearningbook.org/contents/mlp.html#pf33 214]|ps=, "This table-filling strategy is sometimes called ''dynamic programming''."}} Strictly speaking, the term ''backpropagation'' refers only to an algorithm for efficiently computing the gradient, not how the gradient is used; but the term is often used loosely to refer to the entire learning algorithm – including how the gradient is used, such as by [[stochastic gradient descent]], or as an intermediate step in a more complicated optimizer, such as [[Stochastic gradient descent#Adam|Adaptive Moment Estimation]].<ref>{{harvnb|Goodfellow|Bengio|Courville|2016|p=[https://www.deeplearningbook.org/contents/mlp.html#pf25 200]}}, "The term back-propagation is often misunderstood as meaning the whole learning algorithm for multilayer neural networks. Backpropagation refers only to the method for computing the gradient, while other algorithms, such as stochastic gradient descent, is used to perform learning using this gradient."</ref> The local minimum convergence, exploding gradient, vanishing gradient, and weak control of learning rate are main disadvantages of these optimization algorithms. The [[Hessian matrix|Hessian]] and quasi-Hessian optimizers solve only local minimum convergence problem, and the backpropagation works longer. These problems caused researchers to develop hybrid<ref>{{Cite journal |last1=Mohapatra |first1=Rohan |last2=Saha |first2=Snehanshu |last3=Coello |first3=Carlos A. Coello |last4=Bhattacharya |first4=Anwesh |last5=Dhavala |first5=Soma S. |last6=Saha |first6=Sriparna |date=April 2022 |title=AdaSwarm: Augmenting Gradient-Based Optimizers in Deep Learning With Swarm Intelligence |url=https://ieeexplore.ieee.org/document/9472873 |journal=IEEE Transactions on Emerging Topics in Computational Intelligence |volume=6 |issue=2 |pages=329–340 |doi=10.1109/TETCI.2021.3083428 |issn=2471-285X|arxiv=2006.09875 |hdl=20.500.11824/1557 }}</ref> and fractional<ref>{{Cite journal |last1=Abdulkadirov |first1=Ruslan I. |last2=Lyakhov |first2=Pavel A. |last3=Baboshina |first3=Valentina A. |last4=Nagornov |first4=Nikolay N. |date=2024 |title=Improving the Accuracy of Neural Network Pattern Recognition by Fractional Gradient Descent |journal=IEEE Access |volume=12 |pages=168428–168444 |doi=10.1109/ACCESS.2024.3491614 |issn=2169-3536|doi-access=free |bibcode=2024IEEEA..12p8428A }}</ref> optimization algorithms. Backpropagation had multiple discoveries and partial discoveries, with a tangled history and terminology. See the [[#History|history]] section for details. Some other names for the technique include "reverse mode of [[automatic differentiation]]" or "[[reverse accumulation]]".<ref name="DL-reverse-mode">{{harvtxt|Goodfellow|Bengio|Courville|2016|p=[https://www.deeplearningbook.org/contents/mlp.html#pf36 217]–218}}, "The back-propagation algorithm described here is only one approach to automatic differentiation. It is a special case of a broader class of techniques called ''reverse mode accumulation''."</ref> ==Overview== Backpropagation computes the gradient in [[parameter space|weight space]] of a feedforward neural network, with respect to a [[loss function]]. Denote: * <math>x</math>: input (vector of features) * <math>y</math>: target output *:For classification, output will be a vector of class probabilities (e.g., <math>(0.1, 0.7, 0.2)</math>, and target output is a specific class, encoded by the [[one-hot]]/[[Dummy variable (statistics)|dummy variable]] (e.g., <math>(0, 1, 0)</math>). * <math>C</math>: [[loss function]] or "cost function"{{efn|Use <math>C</math> for the loss function to allow <math>L</math> to be used for the number of layers}} *:For classification, this is usually [[cross-entropy]] (XC, [[log loss]]), while for regression it is usually [[squared error loss]] (SEL). * <math>L</math>: the number of layers * <math>W^l = (w^l_{jk})</math>: the weights between layer <math>l - 1</math> and <math>l</math>, where <math>w^l_{jk}</math> is the weight between the <math>k</math>-th node in layer <math>l - 1</math> and the <math>j</math>-th node in layer <math>l</math>{{efn|This follows {{harvtxt|Nielsen|2015}}, and means (left) multiplication by the matrix <math>W^l</math> corresponds to converting output values of layer <math>l - 1</math> to input values of layer <math>l</math>: columns correspond to input coordinates, rows correspond to output coordinates.}} * <math>f^l</math>: [[activation function]]s at layer <math>l</math> *:For classification the last layer is usually the [[logistic function]] for binary classification, and [[softmax function|softmax]] (softargmax) for multi-class classification, while for the hidden layers this was traditionally a [[sigmoid function]] (logistic function or others) on each node (coordinate), but today is more varied, with [[Rectifier (neural networks)|rectifier]] ([[ramp function|ramp]], [[ReLU]]) being common. * <math>a^l_j</math>: activation of the <math>j</math>-th node in layer <math>l</math>. In the derivation of backpropagation, other intermediate quantities are used by introducing them as needed below. Bias terms are not treated specially since they correspond to a weight with a fixed input of 1. For backpropagation the specific loss function and activation functions do not matter as long as they and their derivatives can be evaluated efficiently. Traditional activation functions include sigmoid, [[tanh]], and [[Rectifier (neural networks)|ReLU]]. [[Swish function|Swish]],<ref>{{cite arXiv|last1=Ramachandran|first1=Prajit|last2=Zoph|first2=Barret|last3=Le|first3=Quoc V.|date=2017-10-27|title=Searching for Activation Functions|class=cs.NE|eprint=1710.05941}}</ref> [[Rectifier (neural networks)#Mish|mish]],<ref>{{cite arXiv|last=Misra|first=Diganta|date=2019-08-23|title=Mish: A Self Regularized Non-Monotonic Activation Function|class=cs.LG|eprint=1908.08681|language=en}}</ref> and other activation functions have since been proposed as well. The overall network is a combination of [[function composition]] and [[matrix multiplication]]: :<math>g(x) := f^L(W^L f^{L-1}(W^{L-1} \cdots f^1(W^1 x)\cdots))</math> For a training set there will be a set of input–output pairs, <math>\left\{(x_i, y_i)\right\}</math>. For each input–output pair <math>(x_i, y_i)</math> in the training set, the loss of the model on that pair is the cost of the difference between the predicted output <math>g(x_i)</math> and the target output <math>y_i</math>: :<math>C(y_i, g(x_i))</math> Note the distinction: during model evaluation the weights are fixed while the inputs vary (and the target output may be unknown), and the network ends with the output layer (it does not include the loss function). During model training the input–output pair is fixed while the weights vary, and the network ends with the loss function. Backpropagation computes the gradient for a ''fixed'' input–output pair <math>(x_i, y_i)</math>, where the weights <math>w^l_{jk}</math> can vary. Each individual component of the gradient, <math>\partial C/\partial w^l_{jk},</math> can be computed by the chain rule; but doing this separately for each weight is inefficient. Backpropagation efficiently computes the gradient by avoiding duplicate calculations and not computing unnecessary intermediate values, by computing the gradient of each layer – specifically the gradient of the weighted ''input'' of each layer, denoted by <math>\delta^l</math> – from back to front. Informally, the key point is that since the only way a weight in <math>W^l</math> affects the loss is through its effect on the ''next'' layer, and it does so ''linearly'', <math>\delta^l</math> are the only data you need to compute the gradients of the weights at layer <math>l</math>, and then the gradients of weights of previous layer can be computed by <math>\delta^{l-1}</math> and repeated recursively. This avoids inefficiency in two ways. First, it avoids duplication because when computing the gradient at layer <math>l</math>, it is unnecessary to recompute all derivatives on later layers <math>l+1, l+2, \ldots</math> each time. Second, it avoids unnecessary intermediate calculations, because at each stage it directly computes the gradient of the weights with respect to the ultimate output (the loss), rather than unnecessarily computing the derivatives of the values of hidden layers with respect to changes in weights <math>\partial a^{l'}_{j'}/\partial w^l_{jk}</math>. Backpropagation can be expressed for simple feedforward networks in terms of [[#Matrix multiplication|matrix multiplication]], or more generally in terms of the [[#Adjoint graph|adjoint graph]]. ==Matrix multiplication== For the basic case of a feedforward network, where nodes in each layer are connected only to nodes in the immediate next layer (without skipping any layers), and there is a loss function that computes a scalar loss for the final output, backpropagation can be understood simply by matrix multiplication.{{efn|This section largely follows and summarizes {{harvtxt|Nielsen|2015}}.}} Essentially, backpropagation evaluates the expression for the derivative of the cost function as a product of derivatives between each layer ''from right to left'' – "backwards" – with the gradient of the weights between each layer being a simple modification of the partial products (the "backwards propagated error"). Given an input–output pair <math>(x, y)</math>, the loss is: :<math>C(y, f^L(W^L f^{L-1}(W^{L-1} \cdots f^2(W^2 f^1(W^1 x))\cdots)))</math> To compute this, one starts with the input <math>x</math> and works forward; denote the weighted input of each hidden layer as <math>z^l</math> and the output of hidden layer <math>l</math> as the activation <math>a^l</math>. For backpropagation, the activation <math>a^l</math> as well as the derivatives <math>(f^l)'</math> (evaluated at <math>z^l</math>) must be cached for use during the backwards pass. The derivative of the loss in terms of the inputs is given by the chain rule; note that each term is a [[total derivative]], evaluated at the value of the network (at each node) on the input <math>x</math>: :<math>\frac{d C}{d a^L}\cdot \frac{d a^L}{d z^L} \cdot \frac{d z^L}{d a^{L-1}} \cdot \frac{d a^{L-1}}{d z^{L-1}}\cdot \frac{d z^{L-1}}{d a^{L-2}} \cdot \ldots \cdot \frac{d a^1}{d z^1} \cdot \frac{\partial z^1}{\partial x},</math> where <math>\frac{d a^L}{d z^L}</math> is a [[diagonal matrix]]. These terms are: the derivative of the loss function;{{efn|The derivative of the loss function is a [[covector]], since the loss function is a [[scalar-valued function]] of several variables.}} the derivatives of the activation functions;{{efn|The activation function is applied to each node separately, so the derivative is just the diagonal matrix of the derivative on each node. This is often represented as the [[Hadamard product (matrices)|Hadamard product]] with the vector of derivatives, denoted by <math>(f^l)'\odot</math>, which is mathematically identical but better matches the internal representation of the derivatives as a vector, rather than a diagonal matrix.}} and the matrices of weights:{{efn|Since matrix multiplication is linear, the derivative of multiplying by a matrix is just the matrix: <math>(Wx)' = W</math>.}} :<math>\frac{d C}{d a^L}\circ (f^L)' \cdot W^L \circ (f^{L-1})' \cdot W^{L-1} \circ \cdots \circ (f^1)' \cdot W^1.</math> The gradient <math>\nabla</math> is the [[transpose]] of the derivative of the output in terms of the input, so the matrices are transposed and the order of multiplication is reversed, but the entries are the same: :<math>\nabla_x C = (W^1)^T \cdot (f^1)' \circ \ldots \circ (W^{L-1})^T \cdot (f^{L-1})' \circ (W^L)^T \cdot (f^L)' \circ \nabla_{a^L} C.</math> Backpropagation then consists essentially of evaluating this expression from right to left (equivalently, multiplying the previous expression for the derivative from left to right), computing the gradient at each layer on the way; there is an added step, because the gradient of the weights is not just a subexpression: there's an extra multiplication. Introducing the auxiliary quantity <math>\delta^l</math> for the partial products (multiplying from right to left), interpreted as the "error at level <math>l</math>" and defined as the gradient of the input values at level <math>l</math>: :<math>\delta^l := (f^l)' \circ (W^{l+1})^T\cdot(f^{l+1})' \circ \cdots \circ (W^{L-1})^T \cdot (f^{L-1})' \circ (W^L)^T \cdot (f^L)' \circ \nabla_{a^L} C.</math> Note that <math>\delta^l</math> is a vector, of length equal to the number of nodes in level <math>l</math>; each component is interpreted as the "cost attributable to (the value of) that node". The gradient of the weights in layer <math>l</math> is then: :<math>\nabla_{W^l} C = \delta^l(a^{l-1})^T.</math> The factor of <math>a^{l-1}</math> is because the weights <math>W^l</math> between level <math>l - 1</math> and <math>l</math> affect level <math>l</math> proportionally to the inputs (activations): the inputs are fixed, the weights vary. The <math>\delta^l</math> can easily be computed recursively, going from right to left, as: :<math>\delta^{l-1} := (f^{l-1})' \circ (W^l)^T \cdot \delta^l.</math> The gradients of the weights can thus be computed using a few matrix multiplications for each level; this is backpropagation. Compared with naively computing forwards (using the <math>\delta^l</math> for illustration): :<math>\begin{align} \delta^1 &= (f^1)' \circ (W^2)^T \cdot (f^2)' \circ \cdots \circ (W^{L-1})^T \cdot (f^{L-1})' \circ (W^L)^T \cdot (f^L)' \circ \nabla_{a^L} C\\ \delta^2 &= (f^2)' \circ \cdots \circ (W^{L-1})^T \cdot (f^{L-1})' \circ (W^L)^T \cdot (f^L)' \circ \nabla_{a^L} C\\ &\vdots\\ \delta^{L-1} &= (f^{L-1})' \circ (W^L)^T \cdot (f^L)' \circ \nabla_{a^L} C\\ \delta^L &= (f^L)' \circ \nabla_{a^L} C, \end{align}</math> There are two key differences with backpropagation: # Computing <math>\delta^{l-1}</math> in terms of <math>\delta^l</math> avoids the obvious duplicate multiplication of layers <math>l</math> and beyond. # Multiplying starting from <math>\nabla_{a^L} C</math> – propagating the error ''backwards'' – means that each step simply multiplies a vector (<math>\delta^l</math>) by the matrices of weights <math>(W^l)^T</math> and derivatives of activations <math>(f^{l-1})'</math>. By contrast, multiplying forwards, starting from the changes at an earlier layer, means that each multiplication multiplies a ''matrix'' by a ''matrix''. This is much more expensive, and corresponds to tracking every possible path of a change in one layer <math>l</math> forward to changes in the layer <math>l+2</math> (for multiplying <math>W^{l+1}</math> by <math>W^{l+2}</math>, with additional multiplications for the derivatives of the activations), which unnecessarily computes the intermediate quantities of how weight changes affect the values of hidden nodes. ==Adjoint graph== {{expand section|date=November 2019}} For more general graphs, and other advanced variations, backpropagation can be understood in terms of [[automatic differentiation]], where backpropagation is a special case of [[reverse accumulation]] (or "reverse mode").<ref name="DL-reverse-mode" /> ==Intuition== ===Motivation=== The goal of any [[supervised learning]] algorithm is to find a function that best maps a set of inputs to their correct output. The motivation for backpropagation is to train a multi-layered neural network such that it can learn the appropriate internal representations to allow it to learn any arbitrary mapping of input to output.<ref name="RumelhartHintonWilliams1986a">{{cite journal |last1=Rumelhart |first1=David E. |author-link1=David E. Rumelhart |last2=Hinton |first2=Geoffrey E. |author-link2=Geoffrey E. Hinton |first3=Ronald J. |last3=Williams |author-link3=Ronald J. Williams |title=Learning representations by back-propagating errors|journal=Nature|date=1986a|volume=323|issue=6088|pages=533–536|doi=10.1038/323533a0|bibcode=1986Natur.323..533R|s2cid=205001834 }}</ref> ===Learning as an optimization problem=== To understand the mathematical derivation of the backpropagation algorithm, it helps to first develop some intuition about the relationship between the actual output of a neuron and the correct output for a particular training example. Consider a simple neural network with two input units, one output unit and no hidden units, and in which each neuron uses a [[Artificial neuron#Linear combination|linear output]] (unlike most work on neural networks, in which mapping from inputs to outputs is non-linear){{efn|One may notice that multi-layer neural networks use non-linear activation functions, so an example with linear neurons seems obscure. However, even though the error surface of multi-layer networks are much more complicated, locally they can be approximated by a paraboloid. Therefore, linear neurons are used for simplicity and easier understanding.}} that is the weighted sum of its input. [[File:A simple neural network with two input units and one output unit.png|thumb|250px|A simple neural network with two input units (each with a single input) and one output unit (with two inputs)]] Initially, before training, the weights will be set randomly. Then the neuron learns from [[Training set|training examples]], which in this case consist of a set of [[tuple]]s <math>(x_1, x_2, t)</math> where <math>x_1</math> and <math>x_2</math> are the inputs to the network and {{mvar|t}} is the correct output (the output the network should produce given those inputs, when it has been trained). The initial network, given <math>x_1</math> and <math>x_2</math>, will compute an output {{mvar|y}} that likely differs from {{mvar|t}} (given random weights). A [[loss function]] <math> L(t, y) </math> is used for measuring the discrepancy between the target output {{mvar|t}} and the computed output {{mvar|y}}. For [[regression analysis]] problems the squared error can be used as a loss function, for [[Statistical classification|classification]] the [[cross-entropy|categorical cross-entropy]] can be used. As an example consider a regression problem using the square error as a loss: :<math>L(t, y)= (t-y)^2 = E, </math> where {{mvar|E}} is the discrepancy or error. Consider the network on a single training case: <math>(1, 1, 0)</math>. Thus, the input <math>x_1</math> and <math>x_2</math> are 1 and 1 respectively and the correct output, {{mvar|t}} is 0. Now if the relation is plotted between the network's output {{mvar|y}} on the horizontal axis and the error {{mvar|E}} on the vertical axis, the result is a parabola. The [[Maxima and minima|minimum]] of the [[parabola]] corresponds to the output {{mvar|y}} which minimizes the error {{mvar|E}}. For a single training case, the minimum also touches the horizontal axis, which means the error will be zero and the network can produce an output {{mvar|y}} that exactly matches the target output {{mvar|t}}. Therefore, the problem of mapping inputs to outputs can be reduced to an [[optimization problem]] of finding a function that will produce the minimal error. [[File:Error surface of a linear neuron for a single training case.png|right|thumb|250px|Error surface of a linear neuron for a single training case]] However, the output of a neuron depends on the weighted sum of all its inputs: :<math>y=x_1w_1 + x_2w_2,</math> where <math>w_1</math> and <math>w_2</math> are the weights on the connection from the input units to the output unit. Therefore, the error also depends on the incoming weights to the neuron, which is ultimately what needs to be changed in the network to enable learning. In this example, upon injecting the training data <math>(1, 1, 0)</math>, the loss function becomes <math> E = (t-y)^2 = y^2 = (x_1w_1 + x_2w_2)^2 = (w_1 + w_2)^2.</math> Then, the loss function <math>E</math> takes the form of a parabolic cylinder with its base directed along <math>w_1 = -w_2</math>. Since all sets of weights that satisfy <math>w_1 = -w_2</math> minimize the loss function, in this case additional constraints are required to converge to a unique solution. Additional constraints could either be generated by setting specific conditions to the weights, or by injecting additional training data. One commonly used algorithm to find the set of weights that minimizes the error is [[gradient descent]]. By backpropagation, the steepest descent direction is calculated of the loss function versus the present synaptic weights. Then, the weights can be modified along the steepest descent direction, and the error is minimized in an efficient way. ==Derivation== The gradient descent method involves calculating the derivative of the loss function with respect to the weights of the network. This is normally done using backpropagation. Assuming one output neuron,{{efn|There can be multiple output neurons, in which case the error is the squared norm of the difference vector.}} the squared error function is :<math>E = L(t, y)</math> where :<math>L</math> is the loss for the output <math>y</math> and target value <math>t</math>, :<math>t</math> is the target output for a training sample, and :<math>y</math> is the actual output of the output neuron. For each neuron <math>j</math>, its output <math>o_j</math> is defined as :<math>o_j = \varphi(\text{net}_j) = \varphi\left(\sum_{k=1}^n w_{kj}x_k\right),</math> where the [[activation function]] <math>\varphi</math> is [[non-linear]] and [[Differentiable function|differentiable]] over the activation region (the ReLU is not differentiable at one point). A historically used activation function is the [[logistic function]]: :<math> \varphi(z) = \frac 1 {1+e^{-z}}</math> which has a [[Logistic function#Mathematical_properties|convenient]] derivative of: :<math> \frac {d \varphi}{d z} = \varphi(z)(1-\varphi(z)) </math> The input <math>\text{net}_j</math> to a neuron is the weighted sum of outputs <math>o_k</math> of previous neurons. If the neuron is in the first layer after the input layer, the <math>o_k</math> of the input layer are simply the inputs <math>x_k</math> to the network. The number of input units to the neuron is <math>n</math>. The variable <math>w_{kj}</math> denotes the weight between neuron <math>k</math> of the previous layer and neuron <math>j</math> of the current layer. ===Finding the derivative of the error=== [[Image:ArtificialNeuronModel english.png|thumb|400px|Diagram of an artificial neural network to illustrate the notation used here]] Calculating the [[partial derivative]] of the error with respect to a weight <math>w_{ij}</math> is done using the [[chain rule]] twice: {{NumBlk|:|<math>\frac{\partial E}{\partial w_{ij}} = \frac{\partial E}{\partial o_{j}} \frac{\partial o_{j}}{\partial w_{ij}} = \frac{\partial E}{\partial o_j} \frac{\partial o_j}{\partial\text{net}_j} \frac{\partial \text{net}_j}{\partial w_{ij}}</math>|{{EquationRef|Eq. 1}}}} In the last factor of the right-hand side of the above, only one term in the sum <math>\text{net}_j</math> depends on <math>w_{ij}</math>, so that {{NumBlk|:|<math>\frac{\partial \text{net}_j}{\partial w_{ij}} = \frac{\partial}{\partial w_{ij}} \left(\sum_{k=1}^n w_{kj} o_k\right) = \frac{\partial}{\partial w_{ij}} w_{ij} o_i= o_i.</math>|{{EquationRef|Eq. 2}}}} If the neuron is in the first layer after the input layer, <math>o_i</math> is just <math>x_i</math>. The derivative of the output of neuron <math>j</math> with respect to its input is simply the partial derivative of the activation function: {{NumBlk|:|<math>\frac{\partial o_j}{\partial\text{net}_j} = \frac {\partial \varphi(\text{net}_j)}{\partial \text{net}_j}</math>|{{EquationRef|Eq. 3}}}} which for the [[logistic function|logistic activation function]] :<math>\frac{\partial o_j}{\partial\text{net}_j} = \frac {\partial}{\partial \text{net}_j} \varphi(\text{net}_j) = \varphi(\text{net}_j)(1-\varphi(\text{net}_j)) = o_j(1-o_j)</math> This is the reason why backpropagation requires that the activation function be [[Differentiable function|differentiable]]. (Nevertheless, the [[ReLU]] activation function, which is non-differentiable at 0, has become quite popular, e.g. in [[AlexNet]]) The first factor is straightforward to evaluate if the neuron is in the output layer, because then <math>o_j = y</math> and {{NumBlk|:|<math>\frac{\partial E}{\partial o_j} = \frac{\partial E}{\partial y} </math>|{{EquationRef|Eq. 4}}}} If half of the square error is used as loss function we can rewrite it as : <math>\frac{\partial E}{\partial o_j} = \frac{\partial E}{\partial y} = \frac{\partial}{\partial y} \frac{1}{2}(t - y)^2 = y - t </math> However, if <math>j</math> is in an arbitrary inner layer of the network, finding the derivative <math>E</math> with respect to <math>o_j</math> is less obvious. Considering <math>E</math> as a function with the inputs being all neurons <math>L = \{u, v, \dots, w\}</math> receiving input from neuron <math>j</math>, : <math>\frac{\partial E(o_j)}{\partial o_j} = \frac{\partial E(\mathrm{net}_u, \text{net}_v, \dots, \mathrm{net}_w)}{\partial o_j}</math> and taking the [[total derivative]] with respect to <math>o_j</math>, a recursive expression for the derivative is obtained: {{NumBlk|:|<math>\frac{\partial E}{\partial o_j} = \sum_{\ell \in L} \left(\frac{\partial E}{\partial \text{net}_\ell}\frac{\partial \text{net}_\ell}{\partial o_j}\right) = \sum_{\ell \in L} \left(\frac{\partial E}{\partial o_\ell}\frac{\partial o_\ell}{\partial \text{net}_\ell}\frac{\partial \text{net}_\ell}{\partial o_j}\right) = \sum_{\ell \in L} \left(\frac{\partial E}{\partial o_\ell}\frac{\partial o_\ell}{\partial \text{net}_\ell}w_{j \ell}\right)</math>|{{EquationRef|Eq. 5}}}} Therefore, the derivative with respect to <math>o_j</math> can be calculated if all the derivatives with respect to the outputs <math>o_\ell</math> of the next layer – the ones closer to the output neuron – are known. [Note, if any of the neurons in set <math>L</math> were not connected to neuron <math>j</math>, they would be independent of <math>w_{ij}</math> and the corresponding partial derivative under the summation would vanish to 0.] Substituting {{EquationNote|Eq. 2}}, {{EquationNote|Eq. 3}} {{EquationNote|Eq.4}} and {{EquationNote|Eq. 5}} in {{EquationNote|Eq. 1}} we obtain: : <math>\frac{\partial E}{\partial w_{ij}} = \frac{\partial E}{\partial o_{j}} \frac{\partial o_{j}}{\partial \text{net}_{j}} \frac{\partial \text{net}_{j}}{\partial w_{ij}} = \frac{\partial E}{\partial o_{j}} \frac{\partial o_{j}}{\partial \text{net}_{j}} o_i</math> : <math> \frac{\partial E}{\partial w_{ij}} = o_i \delta_j</math> with :<math>\delta_j = \frac{\partial E}{\partial o_j} \frac{\partial o_j}{\partial\text{net}_j} = \begin{cases} \frac{\partial L(t, o_j)}{\partial o_j} \frac {d \varphi(\text{net}_j)}{d \text{net}_j} & \text{if } j \text{ is an output neuron,}\\ (\sum_{\ell\in L} w_{j \ell} \delta_\ell)\frac {d \varphi(\text{net}_j)}{d \text{net}_j} & \text{if } j \text{ is an inner neuron.} \end{cases}</math> if <math>\varphi</math> is the logistic function, and the error is the square error: : <math>\delta_j = \frac{\partial E}{\partial o_j} \frac{\partial o_j}{\partial\text{net}_j} = \begin{cases} (o_j-t_j)o_j(1-o_{j}) & \text{if } j \text{ is an output neuron,}\\ (\sum_{\ell\in L} w_{j \ell} \delta_\ell)o_j(1-o_j) & \text{if } j \text{ is an inner neuron.} \end{cases}</math> To update the weight <math>w_{ij}</math> using gradient descent, one must choose a learning rate, <math>\eta >0</math>. The change in weight needs to reflect the impact on <math>E</math> of an increase or decrease in <math>w_{ij}</math>. If <math>\frac{\partial E}{\partial w_{ij}} > 0</math>, an increase in <math>w_{ij}</math> increases <math>E</math>; conversely, if <math>\frac{\partial E}{\partial w_{ij}} < 0</math>, an increase in <math>w_{ij}</math> decreases <math>E</math>. The new <math>\Delta w_{ij}</math> is added to the old weight, and the product of the learning rate and the gradient, multiplied by <math>-1</math> guarantees that <math>w_{ij}</math> changes in a way that always decreases <math>E</math>. In other words, in the equation immediately below, <math>- \eta \frac{\partial E}{\partial w_{ij}}</math> always changes <math>w_{ij}</math> in such a way that <math>E</math> is decreased: : <math> \Delta w_{ij} = - \eta \frac{\partial E}{\partial w_{ij}} = - \eta o_i \delta_j</math> ==Second-order gradient descent== {{Anchor|Second order|Hessian}} Using a [[Hessian matrix]] of second-order derivatives of the error function, the [[Levenberg–Marquardt algorithm]] often converges faster than first-order gradient descent, especially when the topology of the error function is complicated.<ref name="Tan2018">{{cite journal|last1=Tan|first1=Hong Hui|last2=Lim|first2=King Han|title=Review of second-order optimization techniques in artificial neural networks backpropagation|journal=IOP Conference Series: Materials Science and Engineering|year=2019|volume=495|issue=1|page=012003|doi=10.1088/1757-899X/495/1/012003|bibcode=2019MS&E..495a2003T|s2cid=208124487|doi-access=free}}</ref><ref name="Wiliamowski2010">{{cite journal|title=Improved Computation for Levenberg–Marquardt Training|last1=Wiliamowski|first1=Bogdan|last2=Yu|first2=Hao|journal=IEEE Transactions on Neural Networks and Learning Systems|volume=21|issue=6|date=June 2010|url=https://www.eng.auburn.edu/~wilambm/pap/2010/Improved%20Computation%20for%20LM%20Training.pdf}}</ref> It may also find solutions in smaller node counts for which other methods might not converge.<ref name="Wiliamowski2010" /> The Hessian can be approximated by the [[Fisher information]] matrix.<ref name="Martens2020">{{cite journal|last=Martens|first=James|title=New Insights and Perspectives on the Natural Gradient Method|journal=Journal of Machine Learning Research|issue=21|date=August 2020|arxiv=1412.1193}}</ref> As an example, consider a simple feedforward network. At the <math>l</math>-th layer, we have<math display="block">x^{(l)}_i, \quad a^{(l)}_i = f(x^{(l)}_i), \quad x^{(l+1)}_i = \sum_j W_{ij} a^{(l)}_j</math>where <math>x</math> are the pre-activations, <math>a</math> are the activations, and <math>W</math> is the weight matrix. Given a loss function <math>L</math>, the first-order backpropagation states that<math display="block">\frac{\partial L}{\partial a_j^{(l)}} = \sum_j W_{ij}\frac{\partial L}{\partial x_i^{(l+1)}}, \quad \frac{\partial L}{\partial x_j^{(l)}} = f'(x_j^{(l)})\frac{\partial L}{\partial a_j^{(l)}}</math>and the second-order backpropagation states that<math display="block">\frac{\partial^2 L}{\partial a_{j_1}^{(l)}\partial a_{j_2}^{(l)}} = \sum_{j_1j_2} W_{i_1j_1}W_{i_2j_2}\frac{\partial^2 L}{\partial x_{i_1}^{(l+1)}\partial x_{i_2}^{(l+1)}}, \quad \frac{\partial^2 L}{\partial x_{j_1}^{(l)}\partial x_{j_2}^{(l)}} = f'(x_{j_1}^{(l)}) f'(x_{j_2}^{(l)}) \frac{\partial^2 L}{\partial a_{j_1}^{(l)}\partial a_{j_2}^{(l)}} + \delta_{j_1 j_2} f''(x^{(l)}_{j_1} ) \frac{\partial L}{\partial a_{j_1}^{(l)}}</math>where <math>\delta</math> is the [[Dirac delta function|Dirac delta symbol]]. Arbitrary-order derivatives in arbitrary computational graphs can be computed with backpropagation, but with more complex expressions for higher orders. ==Loss function== {{Further|Loss function}} The loss function is a function that maps values of one or more variables onto a [[real number]] intuitively representing some "cost" associated with those values. For backpropagation, the loss function calculates the difference between the network output and its expected output, after a training example has propagated through the network. ===Assumptions=== The mathematical expression of the loss function must fulfill two conditions in order for it to be possibly used in backpropagation.<ref>{{harvtxt|Nielsen|2015}}, "[W]hat assumptions do we need to make about our cost function ... in order that backpropagation can be applied? The first assumption we need is that the cost function can be written as an average ... over cost functions ... for individual training examples ... The second assumption we make about the cost is that it can be written as a function of the outputs from the neural network ..."</ref> The first is that it can be written as an average <math display="inline">E=\frac{1}{n}\sum_xE_x</math> over error functions <math display="inline">E_x</math>, for <math display="inline">n</math> individual training examples, <math display="inline">x</math>. The reason for this assumption is that the backpropagation algorithm calculates the gradient of the error function for a single training example, which needs to be generalized to the overall error function. The second assumption is that it can be written as a function of the outputs from the neural network. ===Example loss function=== Let <math>y,y'</math> be vectors in <math>\mathbb{R}^n</math>. Select an error function <math>E(y,y')</math> measuring the difference between two outputs. The standard choice is the square of the [[Euclidean distance]] between the vectors <math>y</math> and <math>y'</math>:<math display="block">E(y,y') = \tfrac{1}{2} \lVert y-y'\rVert^2</math>The error function over <math display="inline">n</math> training examples can then be written as an average of losses over individual examples:<math display="block">E=\frac{1}{2n}\sum_x\lVert (y(x)-y'(x)) \rVert^2</math> ==Limitations== [[File:Extrema example.svg|thumb|250px|Gradient descent may find a local minimum instead of the global minimum.]] * Gradient descent with backpropagation is not guaranteed to find the [[Maxima and minima|global minimum]] of the error function, but only a local minimum; also, it has trouble crossing [[Plateau (mathematics)|plateaus]] in the error function landscape. This issue, caused by the [[Convex optimization|non-convexity]] of error functions in neural networks, was long thought to be a major drawback, but [[Yann LeCun]] ''et al.'' argue that in many practical problems, it is not.<ref>{{cite journal |first1=Yann |last1=LeCun|author-link1=Yann LeCun |first2=Yoshua |last2=Bengio |first3=Geoffrey |last3=Hinton |title=Deep learning |journal=Nature |volume=521 |issue=7553 |year=2015 |pages=436–444 |doi=10.1038/nature14539 |pmid=26017442|bibcode=2015Natur.521..436L |s2cid=3074096 |url=https://hal.science/hal-04206682/file/Lecun2015.pdf }}</ref> * Backpropagation learning does not require normalization of input vectors; however, normalization could improve performance.<ref>{{Cite book|title=AI Techniques for Game Programming|last1=Buckland|first1=Matt|last2=Collins|first2=Mark |location=Boston |publisher=Premier Press |year=2002 |isbn=1-931841-08-X }}</ref> * Backpropagation requires the derivatives of activation functions to be known at network design time. ==History== {{See also|Perceptron#History|label 1=History of Perceptron}} === Precursors === Backpropagation had been derived repeatedly, as it is essentially an efficient application of the [[chain rule]] (first written down by [[Gottfried Wilhelm Leibniz]] in 1676)<ref name="leibniz1676">{{Cite book |last=Leibniz |first=Gottfried Wilhelm Freiherr von |authorlink=Gottfried Wilhelm Leibniz|url=https://books.google.com/books?id=bOIGAAAAYAAJ&q=leibniz+altered+manuscripts&pg=PA90 |title=The Early Mathematical Manuscripts of Leibniz: Translated from the Latin Texts Published by Carl Immanuel Gerhardt with Critical and Historical Notes (Leibniz published the chain rule in a 1676 memoir) |date=1920 |publisher=Open court publishing Company |isbn=9780598818461 |language=en}}</ref><ref>{{cite journal |last1=Rodríguez |first1=Omar Hernández |last2=López Fernández |first2=Jorge M. |year=2010 |title=A Semiotic Reflection on the Didactics of the Chain Rule |url=https://scholarworks.umt.edu/tme/vol7/iss2/10/ |journal=The Mathematics Enthusiast |volume=7 |issue=2 |pages=321–332 |doi=10.54870/1551-3440.1191 |s2cid=29739148 |access-date=2019-08-04 |doi-access=free}}</ref> to neural networks. The terminology "back-propagating error correction" was introduced in 1962 by [[Frank Rosenblatt]], but he did not know how to implement this.<ref>{{cite book |last=Rosenblatt |first=Frank |title=Principles of Neurodynamics |publisher=Spartan, New York |year=1962 |pages=287–298 |author-link=Frank Rosenblatt}}</ref> In any case, he only studied neurons whose outputs were discrete levels, which only had zero derivatives, making backpropagation impossible. Precursors to backpropagation appeared in [[Optimal control|optimal control theory]] since 1950s. [[Yann LeCun]] et al credits 1950s work by [[Lev Pontryagin|Pontryagin]] and others in optimal control theory, especially the [[adjoint state method]], for being a continuous-time version of backpropagation.<ref>LeCun, Yann, et al. "A theoretical framework for back-propagation." ''Proceedings of the 1988 connectionist models summer school''. Vol. 1. 1988.</ref> [[Robert Hecht-Nielsen|Hecht-Nielsen]]<ref>{{Cite book |last=Hecht-Nielsen |first=Robert |url=http://archive.org/details/neurocomputing0000hech |title=Neurocomputing |date=1990 |publisher=Reading, Mass. : Addison-Wesley Pub. Co. |others=Internet Archive |isbn=978-0-201-09355-1 |pages=124–125}}</ref> credits the [[Stochastic approximation|Robbins–Monro algorithm]] (1951)<ref name="robbins1951">{{Cite journal |last1=Robbins |first1=H. |author-link=Herbert Robbins |last2=Monro |first2=S. |year=1951 |title=A Stochastic Approximation Method |journal=The Annals of Mathematical Statistics |volume=22 |issue=3 |pages=400 |doi=10.1214/aoms/1177729586 |doi-access=free}}</ref> and [[Arthur E. Bryson|Arthur Bryson]] and [[Yu-Chi Ho]]'s ''Applied Optimal Control'' (1969) as presages of backpropagation. Other precursors were [[Henry J. Kelley]] 1960,<ref name="kelley1960" /> and [[Arthur E. Bryson]] (1961).<ref name="bryson1961" /> In 1962, [[Stuart Dreyfus]] published a simpler derivation based only on the [[chain rule]].<ref>{{Cite journal |last=Dreyfus |first=Stuart |year=1962 |title=The numerical solution of variational problems |journal=Journal of Mathematical Analysis and Applications |volume=5 |issue=1 |pages=30–45 |doi=10.1016/0022-247x(62)90004-5 |doi-access=free}}</ref><ref name="dreyfus1990">{{Cite journal |last=Dreyfus |first=Stuart E. |author-link=Stuart Dreyfus |date=1990 |title=Artificial Neural Networks, Back Propagation, and the Kelley-Bryson Gradient Procedure |journal=Journal of Guidance, Control, and Dynamics |volume=13 |issue=5 |pages=926–928 |bibcode=1990JGCD...13..926D |doi=10.2514/3.25422}}</ref><ref>{{Cite web |last1=Mizutani |first1=Eiji |last2=Dreyfus |first2=Stuart |last3=Nishio |first3=Kenichi |date=July 2000 |title=On derivation of MLP backpropagation from the Kelley-Bryson optimal-control gradient formula and its application |url=https://coeieor.wpengine.com/wp-content/uploads/2019/03/ijcnn2k.pdf |publisher=Proceedings of the IEEE International Joint Conference on Neural Networks}}</ref> In 1973, he adapted [[parameter]]s of controllers in proportion to error gradients.<ref name="dreyfus1973">{{cite journal |last=Dreyfus |first=Stuart |author-link=Stuart Dreyfus |year=1973 |title=The computational solution of optimal control problems with time lag |journal=IEEE Transactions on Automatic Control |volume=18 |issue=4 |pages=383–385 |doi=10.1109/tac.1973.1100330}}</ref> Unlike modern backpropagation, these precursors used standard Jacobian matrix calculations from one stage to the previous one, neither addressing direct links across several stages nor potential additional efficiency gains due to network sparsity.<ref name="DLhistory">{{cite arXiv |eprint=2212.11279 |class=cs.NE |first=Jürgen |last=Schmidhuber |author-link=Jürgen Schmidhuber |title=Annotated History of Modern AI and Deep Learning |date=2022}}</ref> The [[ADALINE]] (1960) learning algorithm was gradient descent with a squared error loss for a single layer. The first [[multilayer perceptron]] (MLP) with more than one layer trained by [[stochastic gradient descent]]<ref name="robbins1951" /> was published in 1967 by [[Shun'ichi Amari]].<ref name="Amari1967">{{cite journal |last1=Amari |first1=Shun'ichi |author-link=Shun'ichi Amari |date=1967 |title=A theory of adaptive pattern classifier |journal=IEEE Transactions |volume=EC |issue=16 |pages=279–307}}</ref> The MLP had 5 layers, with 2 learnable layers, and it learned to classify patterns not linearly separable.<ref name="DLhistory" /> === Modern backpropagation === Modern backpropagation was first published by [[Seppo Linnainmaa]] as "reverse mode of [[automatic differentiation]]" (1970)<ref name="lin1970">{{cite thesis |first=Seppo |last=Linnainmaa |author-link=Seppo Linnainmaa |year=1970 |type=Masters |title=The representation of the cumulative rounding error of an algorithm as a Taylor expansion of the local rounding errors |language=fi |publisher=University of Helsinki |pages=6–7}}</ref> for discrete connected networks of nested [[Differentiable function|differentiable]] functions.<ref name="lin1976">{{cite journal |last1=Linnainmaa |first1=Seppo |author-link=Seppo Linnainmaa |year=1976 |title=Taylor expansion of the accumulated rounding error |journal=BIT Numerical Mathematics |volume=16 |issue=2 |pages=146–160 |doi=10.1007/bf01931367 |s2cid=122357351}}</ref><ref name="grie2012">{{cite book |last=Griewank |first=Andreas |title=Optimization Stories |year=2012 |series=Documenta Mathematica, Extra Volume ISMP |pages=389–400 |chapter=Who Invented the Reverse Mode of Differentiation? |s2cid=15568746}}</ref><ref name="grie2008">{{cite book |last1=Griewank |first1=Andreas |url={{google books |plainurl=y |id=xoiiLaRxcbEC}} |title=Evaluating Derivatives: Principles and Techniques of Algorithmic Differentiation, Second Edition |last2=Walther |first2=Andrea |author2-link=Andrea Walther |publisher=SIAM |year=2008 |isbn=978-0-89871-776-1}}</ref> In 1982, [[Paul Werbos]] applied backpropagation to MLPs in the way that has become standard.<ref name="werbos1982">{{Cite book|title=System modeling and optimization|last=Werbos|first=Paul|publisher=Springer|year=1982|pages=762–770|chapter=Applications of advances in nonlinear sensitivity analysis|author-link=Paul Werbos|chapter-url=http://werbos.com/Neural/SensitivityIFIPSeptember1981.pdf|access-date=2 July 2017|archive-date=14 April 2016|archive-url=https://web.archive.org/web/20160414055503/http://werbos.com/Neural/SensitivityIFIPSeptember1981.pdf|url-status=live}}</ref><ref name="werbos1974">{{cite book |last=Werbos |first=Paul J. |title=The Roots of Backpropagation : From Ordered Derivatives to Neural Networks and Political Forecasting |location=New York |publisher=John Wiley & Sons |year=1994 |isbn=0-471-59897-6 }}</ref> Werbos described how he developed backpropagation in an interview. In 1971, during his PhD work, he developed backpropagation to mathematicize [[Sigmund Freud|Freud]]'s "flow of psychic energy". He faced repeated difficulty in publishing the work, only managing in 1981.<ref name=":1">{{Cite book |url=https://direct.mit.edu/books/book/4886/Talking-NetsAn-Oral-History-of-Neural-Networks |title=Talking Nets: An Oral History of Neural Networks |date=2000 |publisher=The MIT Press |isbn=978-0-262-26715-1 |editor-last=Anderson |editor-first=James A. |language=en |doi=10.7551/mitpress/6626.003.0016 |editor-last2=Rosenfeld |editor-first2=Edward}}</ref> He also claimed that "the first practical application of back-propagation was for estimating a dynamic model to predict nationalism and social communications in 1974" by him.<ref>P. J. Werbos, "Backpropagation through time: what it does and how to do it," in Proceedings of the IEEE, vol. 78, no. 10, pp. 1550-1560, Oct. 1990, {{doi|10.1109/5.58337}}</ref> Around 1982,<ref name=":1" />{{rp|376}} [[David E. Rumelhart]] independently developed<ref>Olazaran Rodriguez, Jose Miguel. ''[https://web.archive.org/web/20221111165150/https://era.ed.ac.uk/bitstream/handle/1842/20075/Olazaran-RodriguezJM_1991redux.pdf?sequence=1&isAllowed=y A historical sociology of neural network research]''. PhD Dissertation. University of Edinburgh, 1991.</ref>{{rp|252}} backpropagation and taught the algorithm to others in his research circle. He did not cite previous work as he was unaware of them. He published the algorithm first in a 1985 paper, then in a 1986 ''[[Nature (journal)|Nature]]'' paper an experimental analysis of the technique.<ref name="learning-representations">{{cite journal | last1 = Rumelhart | last2 = Hinton | last3 = Williams | title=Learning representations by back-propagating errors | journal = Nature | volume = 323 | issue = 6088 | pages = 533–536 | url = http://www.cs.toronto.edu/~hinton/absps/naturebp.pdf| doi = 10.1038/323533a0 | year = 1986 | bibcode = 1986Natur.323..533R | s2cid = 205001834 }}</ref> These papers became highly cited, contributed to the popularization of backpropagation, and coincided with the resurging research interest in neural networks during the 1980s.<ref name="RumelhartHintonWilliams1986a" /><ref name="RumelhartHintonWilliams1986b">{{cite book |editor1-last=Rumelhart |editor1-first=David E. |editor1-link=David E. Rumelhart |editor2-first=James L. |editor2-last=McClelland |editor2-link=James McClelland (psychologist) |title=Parallel Distributed Processing : Explorations in the Microstructure of Cognition |volume=1 : Foundations |last1=Rumelhart |first1=David E. |author-link1=David E. Rumelhart |last2=Hinton |first2=Geoffrey E. |author-link2=Geoffrey E. Hinton |first3=Ronald J. |last3=Williams |author-link3=Ronald J. Williams |chapter=8. Learning Internal Representations by Error Propagation |location=Cambridge |publisher=MIT Press |year=1986b |isbn=0-262-18120-7 |chapter-url-access=registration |chapter-url=https://archive.org/details/paralleldistribu00rume }}</ref><ref>{{cite book|url={{google books |plainurl=y |id=4j9GAQAAIAAJ}}|title=Introduction to Machine Learning|last=Alpaydin|first=Ethem|publisher=MIT Press|year=2010|isbn=978-0-262-01243-0}}</ref> In 1985, the method was also described by David Parker.<ref>{{Cite report |last=Parker |first=D.B. |date=1985 |title=Learning Logic: Casting the Cortex of the Human Brain in Silicon |department=Center for Computational Research in Economics and Management Science |location=Cambridge MA |id=Technical Report TR-47 |publisher=Massachusetts Institute of Technology}}</ref><ref name=":0">{{Cite book |last=Hertz |first=John |title=Introduction to the theory of neural computation |date=1991 |publisher=Addison-Wesley |others=Krogh, Anders., Palmer, Richard G. |isbn=0-201-50395-6 |location=Redwood City, Calif. |pages=8 |oclc=21522159}}</ref> [[Yann LeCun]] proposed an alternative form of backpropagation for neural networks in his PhD thesis in 1987.<ref>{{Cite thesis |title=Modèles connexionnistes de l'apprentissage |url=https://www.sudoc.fr/043586643 |publisher=Université Pierre et Marie Curie |date=1987 |place=Paris, France |degree=Thèse de doctorat d'état |first=Yann |last=Le Cun}}</ref> Gradient descent took a considerable amount of time to reach acceptance. Some early objections were: there were no guarantees that gradient descent could reach a global minimum, only local minimum; neurons were "known" by physiologists as making discrete signals (0/1), not continuous ones, and with discrete signals, there is no gradient to take. See the interview with [[Geoffrey Hinton]],<ref name=":1" /> who was awarded the 2024 [[Nobel Prize in Physics]] for his contributions to the field.<ref>{{Cite web |title=The Nobel Prize in Physics 2024 |url=https://www.nobelprize.org/prizes/physics/2024/press-release/ |access-date=2024-10-13 |website=NobelPrize.org |language=en-US}}</ref> === Early successes === Contributing to the acceptance were several applications in training neural networks via backpropagation, sometimes achieving popularity outside the research circles. In 1987, [[NETtalk (artificial neural network)|NETtalk]] learned to convert English text into pronunciation. Sejnowski tried training it with both backpropagation and Boltzmann machine, but found the backpropagation significantly faster, so he used it for the final NETtalk.<ref name=":1" />{{rp|p=324}} The NETtalk program became a popular success, appearing on the [[Today (American TV program)|''Today'' show]].<ref name=":02">{{Cite book |last=Sejnowski |first=Terrence J. |title=The deep learning revolution |date=2018 |publisher=The MIT Press |isbn=978-0-262-03803-4 |location=Cambridge, Massachusetts London, England}}</ref> In 1989, Dean A. Pomerleau published ALVINN, a neural network trained to [[Vehicular automation|drive autonomously]] using backpropagation.<ref>{{Cite journal |last=Pomerleau |first=Dean A. |date=1988 |title=ALVINN: An Autonomous Land Vehicle in a Neural Network |url=https://proceedings.neurips.cc/paper/1988/hash/812b4ba287f5ee0bc9d43bbf5bbe87fb-Abstract.html |journal=Advances in Neural Information Processing Systems |publisher=Morgan-Kaufmann |volume=1}}</ref> The [[LeNet]] was published in 1989 to recognize handwritten zip codes. In 1992, [[TD-Gammon]] achieved top human level play in backgammon. It was a reinforcement learning agent with a neural network with two layers, trained by backpropagation.<ref>{{cite book |last1=Sutton |first1=Richard S. |last2=Barto |first2=Andrew G. |title=Reinforcement Learning: An Introduction |edition=2nd |publisher=MIT Press |place=Cambridge, MA |year=2018 |chapter=11.1 TD-Gammon |chapter-url=http://www.incompleteideas.net/book/11/node2.html}}</ref> In 1993, Eric Wan won an international pattern recognition contest through backpropagation.<ref name="schmidhuber2015">{{cite journal |last=Schmidhuber |first=Jürgen |author-link=Jürgen Schmidhuber |year=2015 |title=Deep learning in neural networks: An overview |journal=Neural Networks |volume=61 |pages=85–117 |arxiv=1404.7828 |doi=10.1016/j.neunet.2014.09.003 |pmid=25462637 |s2cid=11715509}}</ref><ref>{{cite book |last=Wan |first=Eric A. |title=Time Series Prediction : Forecasting the Future and Understanding the Past |publisher=Addison-Wesley |year=1994 |isbn=0-201-62601-2 |editor-last=Weigend |editor-first=Andreas S. |editor-link=Andreas Weigend |series=Proceedings of the NATO Advanced Research Workshop on Comparative Time Series Analysis |volume=15 |location=Reading |pages=195–217 |chapter=Time Series Prediction by Using a Connectionist Network with Internal Delay Lines |editor2-last=Gershenfeld |editor2-first=Neil A. |editor2-link=Neil Gershenfeld |s2cid=12652643}}</ref> === After backpropagation === During the 2000s it fell out of favour{{citation needed|date=February 2022}}, but returned in the 2010s, benefiting from cheap, powerful [[GPU]]-based computing systems. This has been especially so in [[speech recognition]], [[machine vision]], [[natural language processing]], and language structure learning research (in which it has been used to explain a variety of phenomena related to first<ref>{{Cite journal|last1=Chang|first1=Franklin|last2=Dell|first2=Gary S.|last3=Bock|first3=Kathryn|date=2006|title=Becoming syntactic.|journal=Psychological Review|volume=113|issue=2|pages=234–272|doi=10.1037/0033-295x.113.2.234|pmid=16637761}}</ref> and second language learning.<ref>{{Cite journal|last1=Janciauskas|first1=Marius|last2=Chang|first2=Franklin|title=Input and Age-Dependent Variation in Second Language Learning: A Connectionist Account|journal=Cognitive Science|volume=42|pages=519–554|doi=10.1111/cogs.12519|pmid=28744901|pmc=6001481|year=2018|issue=Suppl Suppl 2 }}</ref>)<ref>{{Cite web |title=Decoding the Power of Backpropagation: A Deep Dive into Advanced Neural Network Techniques |url=https://www.janbasktraining.com/tutorials/backpropagation-in-deep-learning |website=janbasktraining.com |date=30 January 2024 |language=en}}</ref> Error backpropagation has been suggested to explain human brain [[event-related potential]] (ERP) components like the [[N400 (neuroscience)|N400]] and [[P600 (neuroscience)|P600]].<ref>{{Cite journal|last1=Fitz|first1=Hartmut|last2=Chang|first2=Franklin|date=2019|title=Language ERPs reflect learning through prediction error propagation|journal=Cognitive Psychology|language=en|volume=111|pages=15–52|doi=10.1016/j.cogpsych.2019.03.002|pmid=30921626|hdl=21.11116/0000-0003-474D-8|s2cid=85501792|hdl-access=free}}</ref> In 2023, a backpropagation algorithm was implemented on a [[photonic processor]] by a team at [[Stanford University]].<ref>{{Cite web |title=Photonic Chips Curb AI Training's Energy Appetite - IEEE Spectrum |url=https://spectrum.ieee.org/backpropagation-optical-ai |access-date=2023-05-25 |website=[[IEEE]] |language=en}}</ref> ==See also== * [[Artificial neural network]] * [[Neural circuit]] * [[Catastrophic interference]] * [[Ensemble learning]] * [[AdaBoost]] * [[Overfitting]] * [[Neural backpropagation]] * [[Backpropagation through time]] * [[Backpropagation through structure]] * [[Three-factor learning]] ==Notes== {{Notelist}} ==References== {{Reflist|30em}} == Further reading == * {{cite book|last1=Goodfellow |first1=Ian |author-link1=Ian Goodfellow |last2=Bengio |first2=Yoshua |author-link2=Yoshua Bengio |last3=Courville |first3=Aaron |year=2016 |title=Deep Learning |url=http://www.deeplearningbook.org |publisher=MIT Press |section=6.5 Back-Propagation and Other Differentiation Algorithms |section-url=https://www.deeplearningbook.org/contents/mlp.html#pf25 |pages=200–220 |isbn=9780262035613 }} * {{cite book |last=Nielsen |first=Michael A. |author-link=Michael Nielsen |year=2015 |title=Neural Networks and Deep Learning |url=http://neuralnetworksanddeeplearning.com |chapter=How the backpropagation algorithm works |chapter-url=http://neuralnetworksanddeeplearning.com/chap2.html |publisher=Determination Press}} *{{cite web |url=https://docs.microsoft.com/en-us/archive/msdn-magazine/2012/october/test-run-neural-network-back-propagation-for-programmers |title=Neural Network Back-Propagation for Programmers |first=James |last=McCaffrey |date=October 2012 |work=[[MSDN Magazine]] }} *{{cite book |chapter-url=https://page.mi.fu-berlin.de/rojas/neural/chapter/K7.pdf |chapter=The Backpropagation Algorithm |title=Neural Networks : A Systematic Introduction |first=Raúl |last=Rojas |author-link=Raúl Rojas |location=Berlin |publisher=Springer |year=1996 |isbn=3-540-60505-3 }} ==External links== * [[Wikiversity:Learning and Neural Networks|Backpropagation neural network tutorial at the Wikiversity]] * {{cite web |url=http://galaxy.agh.edu.pl/~vlsi/AI/backp_t_en/backprop.html |title=Principles of training multi-layer neural network using backpropagation |first1=Mariusz |last1=Bernacki |first2=Przemysław |last2=Włodarczyk |date=2004 }} * {{cite web |work=CS231n |date=2016 |publisher=Stanford University |first=Andrej |last=Karpathy |author-link=Andrej Karpathy |title=Lecture 4: Backpropagation, Neural Networks 1 |url=https://www.youtube.com/watch?v=i94OvYb6noo&list=PLkt2uSq6rBVctENoVBg1TpCC7OQi31AlC&index=4 |archive-url=https://ghostarchive.org/varchive/youtube/20211212/i94OvYb6noo| archive-date=2021-12-12 |url-status=live|via=[[YouTube]] }}{{cbignore}} * {{cite web |work=3Blue1Brown |title=What is Backpropagation Really Doing? |date=November 3, 2017 |url=https://www.youtube.com/watch?v=Ilg3gGewQ5U&list=PLZHQObOWTQDNU6R1_67000Dx_ZCJB-3pi&index=3 |archive-url=https://ghostarchive.org/varchive/youtube/20211212/Ilg3gGewQ5U| archive-date=2021-12-12 |url-status=live|via=[[YouTube]] }}{{cbignore}} * {{cite web |url=https://sudeepraja.github.io/BackpropAdjoints/ |title=Yet Another Derivation of Backpropagation in Matrix Form |first1=Sudeep Raja |last1=Putta |date=2022 }} {{Artificial intelligence navbox}} {{Authority control}} [[Category:Machine learning algorithms]] [[Category:Artificial neural networks]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:About
(
edit
)
Template:Anchor
(
edit
)
Template:Artificial intelligence navbox
(
edit
)
Template:Authority control
(
edit
)
Template:Cbignore
(
edit
)
Template:Citation needed
(
edit
)
Template:Cite arXiv
(
edit
)
Template:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite report
(
edit
)
Template:Cite thesis
(
edit
)
Template:Cite web
(
edit
)
Template:Doi
(
edit
)
Template:Efn
(
edit
)
Template:EquationNote
(
edit
)
Template:EquationRef
(
edit
)
Template:Expand section
(
edit
)
Template:Further
(
edit
)
Template:Harvnb
(
edit
)
Template:Harvtxt
(
edit
)
Template:Hatnote
(
edit
)
Template:Machine learning bar
(
edit
)
Template:Mvar
(
edit
)
Template:Notelist
(
edit
)
Template:NumBlk
(
edit
)
Template:Reflist
(
edit
)
Template:Rp
(
edit
)
Template:See also
(
edit
)
Template:Sfn
(
edit
)
Template:Short description
(
edit
)