AI GLOSSARY · AI CONCEPTS
Adam optimizer
Definition
The Adam optimizer is a first-order, gradient-based method for training neural networks. It adapts the step size for each parameter using running averages of the gradient and the squared gradient, which the paper calls estimates of lower-order moments.
Also called: Adam optimization, Adam algorithm, Adam optimiser, Adam gradient descent.
In plain language
When a neural network learns, it nudges millions of numbers, called parameters, a little at a time to reduce its mistakes. An optimizer is the rule that decides how big each nudge is. Adam keeps running averages of gradients, the signals indicating a local direction of change, and of squared gradients. It uses these estimates to scale the update for each parameter. It is like a hiker who remembers the recent slope and slows down on ground that keeps jolting. It is a common default, but not a guarantee: you still choose settings such as the learning rate, and a different optimizer may suit a given job better. Training with it requires compute; total expense depends on the training setup.
Technical definition
Adam, introduced by Kingma and Ba (arXiv, submitted 22 December 2014), is a first-order gradient-based optimisation method based on adaptive estimates of lower-order moments. The paper's recommended defaults are beta1 of 0.9, beta2 of 0.999 and epsilon of 1e-8, as summarised in the Stanford CS231n notes. PyTorch's torch.optim.Adam exposes lr, betas and weight_decay, and its decoupled_weight_decay flag makes it equivalent to AdamW.
Worked examples in this catalogue
Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.
Skill by Skill Almanac · Illustrative, not executed
split-leakage-check 53/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- Train, validation and test files checked for duplicates, shared groups, time leakage and label leakage, with the result printed as JSON.
- Why it exercises the concept
- An adjacent data check: it flags selected split-file leakage signals before training or evaluation. It does not inspect Adam or establish the absence of every leakage pathway.
Skill by Skill Almanac · Illustrative, not executed
llm-eval-test-sets 57/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- An eval dataset built and validated for an LLM feature, with a checker for duplicates, missing graders, imbalance and leakage.
- Why it exercises the concept
- An adjacent LLM evaluation-data check, not an optimizer comparison. Select optimizer settings using validation data or cross-validation, then reserve final test data for final evaluation; this skill only checks case structure and selected leakage signals.
Skill by Skill Almanac · Illustrative, not executed
data-analysis-eda 56/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- A fixed exploratory-analysis procedure and CSV profiler that keeps findings descriptive, evidenced and caveated.
- Why it exercises the concept
- A contrast case. Profiling training data before a run is separate from choosing an optimizer, but it catches data problems that no optimizer setting fixes.
Skill by Hugging Face · Illustrative, not executed
huggingface-datasets 25/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- Hugging Face datasets read through the Dataset Viewer API: metadata, rows, search and filters.
- Why it exercises the concept
- A contrast case. It browses datasets and does not train anything. It shows where training data for a model that Adam would optimise can come from.
How it shows up when you use agents
You do not usually meet Adam inside Claude Code, Codex or Cursor themselves. It shows up when an agent writes or edits training code for a model: a PyTorch script with a line that builds torch.optim.Adam, or a fine-tuning configuration that names an optimizer. The agent picks values for the learning rate and the other settings, and those choices change the result.
What breaks when it is misunderstood: people treat the optimizer as the reason a run worked or failed. The PyTorch documentation lists the settings Adam exposes, such as the learning rate, the two beta coefficients and weight decay, and a training curve that goes wrong can come from any of them, from the learning rate, or from the data. A coding agent that changes three things at once leaves you unable to tell which one mattered.
Next actions: change one setting per run, record it, and select settings on validation data or cross-validation. Reserve a separate held-out test for final evaluation. The inspected examples are adjacent data checks, not optimizer runs. Adam is a refinement of stochastic gradient descent, which in turn is a form of gradient descent, and it works on gradients produced by backpropagation.
Common confusions
- Adam versus AdamW. The PyTorch page says its decoupled_weight_decay flag makes the optimizer equivalent to AdamW, where weight decay is not folded into the momentum and variance terms. They are close relatives, not the same setting.
- Adam versus plain gradient descent. Plain gradient descent applies one step size to all parameters. Adam scales the step for each parameter from running averages of past gradients.
- Optimizer versus learning rate. The optimizer is the update rule. The learning rate is one setting it uses. PyTorch's documented default for Adam is 1e-3, which is a starting value, not a recommendation for all models.
- Myth: Adam suits all models. CS231n presents it as a sensible default and still suggests trying SGD with Nesterov momentum as an alternative.
Related terms
More in AI concepts
Sources
- Adam: A Method for Stochastic Optimization, arXiv (Kingma and Ba) (accessed 2026-11-24)
- Adam (torch.optim.Adam), PyTorch documentation (accessed 2026-11-24)
- CS231n Deep Learning for Computer Vision: Neural Networks Part 3, Stanford University (accessed 2026-11-24)
- Cross-validation: validation and final test separation, scikit-learn (accessed 2026-11-25)
Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-25. Wikipedia is never the only source.
Review record
Last verified
Drafted by Claude (original draft); OpenAI Codex (bounded factual repairs); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-25. Last verified .
Change log (5)
- : Independent automated factual/example review completed. Cached US query estimate aligned to receipt; no traffic promise. Final technical gate recorded separately; publication disabled.
- : First version.
- : Verifier pass: applied verifier corrections to unsupported or overstated claims.
- : Bounded source repairs: Corrected gradient/squared-gradient memory and expense scope; separated optimizer selection from final test evaluation. Pending independent re-review.
- : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.