During backpropagation, a training framework computes the gradient of the loss function with respect to each weight in the network. What is the fundamental purpose of computing this gradient?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Here's the deal: the gradient is basically a compass. For every weight, it points in the direction that would make the loss go up the fastest, and its size tells you how steep that climb is. That's why the answer is C. Since you want the loss to go down, not up, the optimizer takes a step in the opposite direction of the gradient — that's gradient descent in a nutshell. Measuring prediction error against the labels is what the loss function itself does, not the gradient. Counting contributing parameters isn't really a thing gradients do. And no gradient hands you the final converged weight value directly — that only emerges after many small steps of gradient descent.
Full explanation below image
Full Explanation
The gradient of the loss function with respect to a weight is a vector (or in the single-weight case, a scalar derivative) that points in the direction of steepest increase of the loss at the current parameter values, and its magnitude indicates how sensitive the loss is to a small change in that weight. Backpropagation uses the chain rule to efficiently compute this gradient for every weight in the network simultaneously. Because training wants to minimize the loss, the optimizer moves each weight a small step in the direction opposite the gradient — this is the core mechanic of gradient descent (and its variants like SGD, Adam, etc.).
The first distractor describes the role of the loss function itself (e.g., mean squared error or cross-entropy), which quantifies the discrepancy between predictions and ground truth. The gradient is derived from the loss, but computing the gradient is a distinct step from computing the loss value.
The second distractor is not a meaningful description of any standard operation in training; gradients are not used to "count" contributing parameters, they measure sensitivity, not participation.
The fourth distractor confuses the gradient with the optimization outcome. The gradient only tells you the local slope at the weights' current values — it does not directly reveal what the eventual, trained weight value will be. Reaching that final value requires iteratively applying gradient-based updates over many training steps (and the final value also depends on the optimizer, learning rate, and data).
Memory aid: "gradient = compass for steepest ascent; descent = walk the opposite way." Every gradient-based training step is: compute the slope, then step downhill.