AIght_
ToolsCompareLearnUniverseWorkflowsSignalHuman
Take the quiz
← All concepts

Concept

Overfitting & Underfitting

Memorizing the textbook vs understanding the subject.

Moon·Updated Jun 10, 2026
◈ Learn it interactively8 steps · ~6 min →

Where this idea lives

PREREQUISITESOverfitting & UnderfittingGradient DescentGradient Descent — Rolling downhill toward a better model.Training vs TestingTraining vs Testing — Why you never grade a model on questions it has seen.Model CollapseModel Collapse — What happens when models train on text written by other models — recursively.Common misconception: A model that fits the data perfectly is a good model.Common misconception: More training always improves a model.
prereqsrelatedtoolsmisconceptions
You might think:A model that fits the data perfectly is a good model.More training always improves a model.

Common misconception

“A model that fits the data perfectly is a good model.”

Perfect fit on training data is a warning sign, not a victory. Real data contains noise — measurement error, flukes, one-offs. A curve that passes through every point has learned the flukes as faithfully as the trend, and flukes don't repeat.

Two students prepare for the same exam. One reads only the chapter summaries — too crude, misses everything subtle. The other memorizes the practice tests word-for-word — flawless on those exact questions, helpless the moment one is rephrased. Machine learning lives between these two failures.

Underfitting: the model is too simple to capture the real pattern. A straight line through seasonal data. High error everywhere — it hasn't even learned what it was shown.

Overfitting: the model is so flexible it fits the noise. Training error: superb. Test error: falling apart. It memorized the practice test.

◉ INTERACTIVE

train error 0.026 · test error 0.025
● training points○ unseen test points

Underfitting — too simple to see the trend.

Drag the complexity slider and watch the two error numbers separate. That gap — great on training data, worse on unseen data — is the signature of overfitting, visible in every ML dashboard ever built.

The standard defenses

  • Hold-out testing. You can't detect overfitting without unseen data. This is why the train/test split exists.
  • More data. Noise averages out; real patterns reinforce. The most reliable cure, when you can afford it.
  • Regularization. Penalize the model for complexity itself, so wiggly solutions must earn their wiggles. Dozens of techniques, one instinct: prefer the simpler explanation.
  • Early stopping. Watch test error during training and stop when it turns upward — even though training error would keep falling.

Why this never goes away

Frontier language models live the same tension at scale: train too hard on a narrow dataset and they memorize it — sometimes verbatim, which is also a privacy problem. The vocabulary has gotten fancier (researchers argue about "grokking" and double descent), but the underlying question hasn't moved since the straight line and the wiggly curve: did it learn the subject, or the answer key?

What to read next

Time to meet the two basic jobs models do: regression and classification — predicting numbers and predicting categories.

◈ Check yourself

You just read it — now see if it stuck. No score, no penalty for a wrong pick.

Question 1 of 3

A model scores 99% on its training data but 60% on new data. What's happening?

Question 2 of 3

What is underfitting?

Question 3 of 3

How do practitioners usually detect overfitting during training?

← Prerequisite

Gradient Descent

Next →

Regression & Classification

by Moon · poet · engineer · third-year CS, Chandigarh University · Updated Jun 10, 2026

← Back to all conceptsBrowse tools →
beginner
Read time6 min read
UpdatedJun 2026
Sources2

Read next

  1. Training vs Testing →
  2. Model Collapse →