presentsUNAIVERSE
The UN AI timeline

Learn AI /How Models Improve /Gradient

Gradient

Also called: gradients, slope.

Detail

In five seconds

What it is

A gradient tells you how much a model’s error would change if each setting were nudged slightly up or down.

In plain words

A gradient is like a set of signed readings showing how turning each model knob slightly up would change its error.

An everyday example

A translator in Amman drafts a short field note in English from a French original. A reviewer marks three issues: one sentence is too formal, one date format is unclear, and one place name is slightly inconsistent with the source. For each issue, the reviewer not only points out the problem but also shows whether the draft should move in one direction or the other, such as more formal versus less formal. The strongest mark is on the place name, because that change would improve the note most. The translator then uses those markings to decide what to adjust first.

Where the story stops working

A human reviewer can explain issues in words and use judgement across meaning and context. A gradient is only a numerical local slope of the loss around the current settings; it does not provide a full explanation, and it may point to a useful direction only for a small step.

Remember thisA gradient does not tell you the answer; it tells you which way to nudge each setting to reduce error from where you are now.

Understand it

Understand it

Why it matters

If you hear that a model is being trained, the gradient is one of the main signals driving that process. Understanding it helps you ask practical questions: why training is slow or unstable, why one model setup learns better than another, and why terms like learning rate, backpropagation and vanishing gradients matter for reliability.

From prediction error to gradient signals

After viewing this, a reader should be able to say that a gradient is a per-setting slope signal derived from the loss and used to guide updates.

  1. 01

    1. Current model state

    Start with input data and the model’s current settings, often called weights.

    Draw a document icon labelled input feeding into a rectangle labelled model. Inside or beside it, show three small circles labelled w1, w2, w3 with example values.

  2. 02

    2. Measure error

    Compare the model’s prediction with the target and calculate loss, a number for how wrong the output is.

    Draw the model output leading to a comparison box with a target icon. Label the resulting number loss = 2.4.

  3. 03

    3. Compute gradient

    Work backwards from the loss to find, for each weight, whether increasing it would raise or lower loss and by how much.

    From the loss box, draw backward arrows to w1, w2, w3. Next to each, show signed values such as dL/dw1 = +0.8, dL/dw2 = -0.3, dL/dw3 = 0.0. Use colour plus sign and minus sign, but also include text so colour is not required.

  4. 04

    4. Update settings

    An optimiser uses the gradient to adjust the weights, usually moving a short distance opposite to the gradient.

    Show old weight values fading to new values: w1 0.50 to 0.42, w2 1.20 to 1.23, w3 0.70 to 0.70. Add a note: step size set by learning rate.

A horizontal 4-step diagram with boxes connected by arrows. Step 1 shows inputs and current weights entering a model. Step 2 shows a prediction and a target being compared to produce loss. Step 3 shows the loss sending backwards a list of signed slope values, one for each weight. Step 4 shows the optimiser using those values to nudge weights in the opposite direction of the slope. Use simple icons: circles for weights, a document for input, a target symbol for true value, and small up/down arrows with numbers such as +0.8, -0.1, +0.0 beside weights.

On hover or tap, each gradient value highlights the corresponding weight and shows a tooltip: positive means lowering this weight may reduce loss; negative means raising it may reduce loss; near zero means little local effect.

Describe this without the diagram

This diagram shows four stages. First, input data goes into a model that has current weights named w1, w2 and w3. Second, the model’s prediction is compared with the target to calculate a loss value, which represents error. Third, the system computes one gradient value for each weight: for example, dL over dw1 equals positive 0.8, dL over dw2 equals negative 0.3, and dL over dw3 equals 0.0. These values mean that increasing w1 would increase loss, increasing w2 would decrease loss, and changing w3 would have little immediate effect. Fourth, an optimiser updates the weights in the opposite direction of those slopes, with the amount of movement controlled by a learning rate.

With reduced motion: A static four-panel diagram shows the same sequence without animation: current weights, loss calculation, gradient values attached to each weight, and updated weights with small numeric changes.

When a model makes a prediction, we can measure how wrong it was using a loss function. A gradient is the set of signals that shows, for each model setting or weight, which direction would raise or lower that loss and by roughly how much.

What goes in is the current model, its current settings, and the loss calculated on some example data. What happens is that mathematics is used to work out the slope of the loss with respect to each setting. “With respect to” means “if we change this one setting a little, what happens to the loss?” What comes out is a list of numbers, one per setting.

The sign of each number matters. A positive value means increasing that setting would tend to increase the loss, so reducing it may help. A negative value means increasing that setting would tend to decrease the loss. The size also matters: a larger magnitude means the loss is more sensitive to that setting at that moment.

A gradient is not the same as gradient descent. The gradient is information about the slope. Gradient descent is one optimisation method that uses that information to update settings. It is also not the same as the learning rate, which is the chosen step size for how far to move using the gradient.

How “Revising a translated field note” maps onto the real thing

In the storyIn the AI system
reviewer’s marked directions on each issuegradient values for different model settings
stronger mark on the place namelarger gradient magnitude showing greater effect on loss
more formal versus less formal directiongradient sign showing which direction reduces loss
translator making edits from the marksoptimiser updating weights using the gradient

A worked example

A tiny model predicts energy use from floor area using one weight.

Starting from: Prediction = weight × area. Current weight = 2.0. Area = 3. Target energy use = 9.

  1. The model predicts 2.0 × 3 = 6, which is 3 units below the target.
  2. Using squared loss, the current loss is (prediction - target)^2 = (6 - 9)^2 = 9.
  3. The gradient with respect to the weight is 2 × (prediction - target) × area = 2 × (-3) × 3 = -18.
  4. The negative gradient means that increasing the weight should reduce loss locally. Its magnitude describes the rate of change in the units used here.
  5. With a learning rate of 0.02, the optimiser subtracts 0.02 × (-18). The new weight is 2.36, giving a prediction of 7.08 and a lower squared loss of about 3.69.

Result: The gradient supplied the local direction and scale of change. The optimiser and its learning rate determined how large the actual update was.

In a United Nations workplace

Two days before clearance of a quarterly report to a donor, an internal auditor in a specialised agency technical division reviews a model that flags expenditure descriptions for manual checking. During training on approved historical records, backpropagation computes gradients. Each gradient indicates how a small change to a model parameter would affect the current classification loss, allowing the optimiser to adjust the parameters.

The gradient explains what the vendor means when it says the model learns from errors. It is a local signal, calculated at the model's current settings, not proof that a parameter is important in every case or that the resulting flags are sound audit evidence.

Before you try thisExpenditure records may contain personal, financial or vendor-sensitive information. They must not be uploaded to any tool that has not been approved for that material. Gradients also do not establish accuracy, fairness or validity, so flagged items still require appropriate review before they affect the report or the file.

Where you may hear it

  • At a vendor demo for an ICT governance board
  • During a technical review before a quarterly report enters clearance
  • In an internal audit meeting on model validation
  • When a data focal point briefs the front office on model training

Avoid confusion

Avoid confusion

Often confused with

Common misconceptions

  • Common misconception: The gradient is the error itself.

    Correction: Error or loss is a score for how wrong the model currently is. The gradient is different: it describes how that score would change if each setting moved slightly.

  • Common misconception: A bigger gradient always means a better model update.

    Correction: A bigger gradient means the loss is more sensitive locally, not that the update will be better. If the step is too large, training can overshoot or become unstable.

  • Common misconception: The gradient tells the model the best final settings.

    Correction: A gradient is a local slope at the current point. It points to a promising small move nearby, not the full route to the best possible solution.

  • Common misconception: Gradient and gradient descent mean the same thing.

    Correction: The gradient is the slope information. Gradient descent is a procedure that uses that information to change parameters over many steps.

Quick check

Which statement best describes a gradient during model training?

Go deeper

Go deeper

The simple version

A gradient is like a set of signed readings showing how turning each model knob slightly up would change its error.

The technical version

For a loss function L over parameters theta, the gradient is the vector of partial derivatives, nabla L(theta). Each component gives the local rate of change of loss with respect to one parameter. Backpropagation often computes this vector, which optimisation methods use to update parameters.

Reviewed external resources

  • EncyclopaediaGradient (opens in a new tab)Wikipedia

    This Wikipedia page gives a broad mathematical definition and background, suited to readers who want formal terminology and multiple contexts.

    Intermediatelink checked 2026-07-31

  • CourseReducing Loss (opens in a new tab)Google

    This Google course section focuses on reducing loss during training and suits readers who want a practical machine learning explanation.

    Intermediatelink checked 2026-07-31

  • VideoNeural networks, explained visually (opens in a new tab)3Blue1Brown

    This 3Blue1Brown video offers an intuitive visual explanation of how slope information guides learning, suited to visual learners.

    Intermediatelink checked 2026-07-31

  • VideoVideo explanations: Gradient (opens in a new tab)YouTube search

    This YouTube search results page helps readers find different video explanations of gradients, and it suits people who want to compare teaching styles rather than rely on one source.

    search results, not one pagelink checked 2026-07-31

  • DiscussionCommunity discussion: Gradient (opens in a new tab)Reddit search

    This Reddit search results page helps readers find community discussions and questions about gradients, and it suits readers who want informal explanations alongside cautions about varying quality.

    search results, not one pagelink checked 2026-07-31

Where this came from

Drafted with a language model through an offline pipeline, checked against this site's schema, and every external link above fetched to see whether it answers. Treat it as a starting point and check anything that matters against the primary sources. How this site is built and what that means.

The one thing to remember

A gradient does not tell you the answer; it tells you which way to nudge each setting to reduce error from where you are now.