AI Logic

Glossary

Backpropagation

Updated๏ผš

The left column is the forward pass, flowing upward from input x through layer 1 (weights Wโ‚) and layer 2 (weights Wโ‚‚) to the loss function L(ลท, y). The right column is the backward pass: starting from the gradient at the output โˆ‚L/โˆ‚ลท at the top, it goes downward and uses the chain rule to compute the layer 2 gradient โˆ‚L/โˆ‚Wโ‚‚ and then the layer 1 gradient โˆ‚L/โˆ‚Wโ‚, and at the bottom it updates the weights as W โ† W โˆ’ ฮทยทโˆ‚L/โˆ‚W using the learning rate ฮท.

Explanation

Backpropagation is an algorithm used in training neural networks that propagates the error backward through each layer of the network to update the weights and biases. It passes the error between the output and the target value back through the network's weights and computes how much each parameter contributed to that error. Backpropagation is based on the chain rule: it computes the gradient of the error layer by layer, from the output layer toward the input layer, and uses it to update the weights. Concretely, it computes the output in the forward pass, evaluates the error with a loss function, propagates the error from the output layer backward, and updates the weights using the learning rate. Through this process, the network adjusts its parameters so that it produces appropriate outputs for its inputs.

Where It Is Used

Backpropagation is widely used as the learning algorithm in a variety of deep learning architectures. In image classification (e.g., CNN), image data is passed through each layer of the model, the error is propagated backward by backpropagation, and the filter weights are updated. In natural language processing (e.g., RNN, LSTM), the model makes predictions from text data and backpropagation is used to update the weights of each layer. In reinforcement learning (e.g., DQN), backpropagation is performed in the policy network that selects actions, and the weights are corrected based on rewards. In generative models (e.g., GAN), backpropagation is used in both the generator and the discriminator, which learn their weights competitively. Backpropagation is thus a core technique of deep learning and has become widespread because of its efficiency and effectiveness.

FAQ

Q. What does backpropagation do?
A.

It propagates the error between the output and the target value backward through each layer and adjusts the weights and biases accordingly.

Q. What is the theoretical background?
A.

It uses the chain rule of differentiation to compute gradients in order, starting from the output layer. This makes clear how much each parameter affected the error, which drives learning.

Q. What tasks is it used for?
A.

It is essential for training virtually all deep learning models, including image classification (CNN), natural language processing (RNN, LSTM), reinforcement learning (DQN) and generative models (GAN).