# Gradient

- **Canonical URL:** https://getaimath.com/dictionary/gradient/
- **Topics:** [Model Training & Optimization](https://getaimath.com/dictionary/category/model-training-and-optimization/)
- **Last updated:** 2026-11-25

## What is Gradient?

**In one sentence:** A gradient is a set of numbers that tells a model which direction to change each weight to reduce its mistakes, and by how much.

Back on the foggy hill, the gradient points uphill, toward more error. So training moves the opposite way, downhill. Backpropagation calculates a gradient for every weight in the network after each batch.

![How an AI Goes to School: 3 Steps from Bookworm to Assistant — Simple 3-step cartoon showing an AI 1. Reading the whole library (Pre-training) to become a Bookworm, 2. Practicing polite Q&A with a teacher (Fine-tuning), and 3. Getting thumbs-up and thumbs-down feedback from humans (RLHF).](https://getaimath.com/diagrams/model-training-and-optimization.png)
*Napkin Diagram (Model Training & Optimization): First the model reads the internet to learn facts; next it practices answering questions; finally humans coach its manners.*

## What is an example of Gradient?

If increasing one weight makes the error go up, its gradient is positive, so training decreases that weight.

## Why does Gradient matter?

Gradients are the signals that drive all learning in neural networks.

## Related Concepts

- [Dense Training](https://getaimath.com/dictionary/dense-training/): Dense training means every parameter in the model is used and updated for every training example.
- [Gradient Accumulation](https://getaimath.com/dictionary/gradient-accumulation/): Gradient accumulation adds up gradients over several small batches before updating the model, to act like one big batch.
- [Sparse Training](https://getaimath.com/dictionary/sparse-training/): Sparse training means training a model where only a fraction of its connections are active or updated at a time.
- [Gradient Clipping](https://getaimath.com/dictionary/gradient-clipping/): Gradient clipping limits how large gradients can get, so one bad batch cannot cause a huge, damaging update.
- [Sparsity](https://getaimath.com/dictionary/sparsity/): Sparsity means that many of the numbers in a model are zero or unused, so the computer can skip them.
- [Optimizer](https://getaimath.com/dictionary/optimizer/): An optimizer is the algorithm that decides exactly how to update a model's weights using the gradients.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/gradient/)
