Home / Deep Learning

Model Training Curves

By Updated

Simulate and understand how Loss and Accuracy evolve over time. Tune the architecture mathematically to observe underfitting, ideal fits, and overfitting.

5
5
100
System Diagnosis

ANALYZING...

Collecting initial training metrics...
Current Epoch 0
Train Loss 0.000
Val Loss 0.000
Train Acc 0.00%
Val Acc 0.00%
Loss Curve (Lower is Better)
Train
Val
Accuracy Curve (Higher is Better)
Train
Val

Overview

Simulate and understand how Loss and Accuracy evolve over time.

In this guide
  1. What training curves show and why they matter
  2. Reading real counts
  3. Reading the gap between the curves
  4. Curves that mean something is broken
  5. What a healthy run looks like
  6. The most informative plot in machine learning
  7. Reading the shape of the descent
  8. Curves worth plotting beyond the loss
  9. Try this above
  10. What often goes wrong
  11. In one line
  12. Learning curves: a other plot with a close name
  13. A real checklist
  14. Six curves and what each one is telling you
  15. Questions people ask
  16. Recap in one screen

Model Training Curves: A Practical Guide

Two lines tell you almost everything about a training run. Learning to read the gap between them is the fastest diagnostic skill in machine learning.

What training curves show and why they matter

A training curve plots loss (or accuracy) against epochs for both the training set and the validation set. The training curve tells you how well the net fits the data it has seen. The validation curve tells you how well it generalises to data it has not. The gap between them is the single most useful diagnostic in a training run.

Without a validation curve, a falling training loss looks like progress. With one, you can tell whether the net is really learning the pattern or simply memorising the cases. Overfitting shows up as the gap widening. Underfitting shows up as both curves staying high. Early stopping uses the validation curve to decide when to stop training before overfitting sets in.

This page shows you how to read each shape the two curves can form, what it means for your net. And what action to take next. Each shape maps to a clear diagnosis and a clear next step:

  • Both high and flat — underfitting. The net has not got enough capacity. Or has not trained long enough, to capture the pattern.
  • Both falling and close together — healthy. Keep going.
  • Training falling, validation turning upward — overfitting. The turning point is where you should have stopped.
  • Validation below training — often not a miracle. Dropout is active in training but not test. Or the validation split happens to be easier.

The visualisation above lets you drag the epoch slider and watch both curves respond in real time. So each of these shapes is something you can build and inspect right.

Reading real counts

Training loss 0.08, validation loss 0.34. The gap of 0.26 is the net's memorisation of the training set — that is overfitting, no matter how good 0.08 looks in isolation.

Training loss 0.31, validation loss 0.33. A tiny gap, but both are high. The net is not overfitting. It simply is not good enough yet. These two cases need opposite replies. It is just why looking at one curve is not enough.

Reading the gap between the curves

The two curves matter less individually than the distance between them. And how that distance changes over time.

A gap that stays narrow while both curves fall is a healthy run. A gap that opens steadily — training continuing down while validation flattens or rises — is overfitting. And the epoch where validation turns is where early stopping should trigger. Both curves flat and high means the net has not got started: check the learning rate before assuming the design is too small.

The size of the gap is not it a problem. A large but stable gap on a net whose validation loss is still the best you have reached is fine. It is the trend in validation loss that decides whether to stop.

Curves that mean something is broken

  • Loss turns NaN. Exploding gradients or a numerical error such as log(0). Less the learning rate, clip the gradient norm. And check for unscaled inputs.
  • Loss is fully flat from step one. Nothing is learning. Often a learning rate near zero, a disconnected graph. Or gradients not flowing — verify the optimiser is really stepping the params you think it is.
  • Loss oscillates violently without trending down. Learning rate too high. Divide by ten.
  • Validation loss much less than training loss. Often dropout and batch norm being active in training just. If the gap is large and persistent, suspect a leak or a validation split that is easier than the training set.
  • Loss drops sharply at each epoch edge. The data is not being reshuffled. So the net is memorising batch order.

What a healthy run looks like

A steep initial drop as the net learns the easy structure, then a long shallow decline as it refines. Validation tracks training closely at first and gradually separates. Both curves are noisy step to step — that is mini-batch sampling, not instability — and the trend over a window of epochs is what to judge.

If loss is still falling meaningfully when training ends, you stopped too early. If validation has been flat or rising for many epochs, you trained too long and the useful checkpoint is behind you.

The most informative plot in machine learning

Two lines — training loss and validation loss against epochs — diagnose more problems faster than any other single output.

Read them together, never apart. The level of the training curve measures bias: how well the net can fit at all. The gap between the curves measures variance: how much of that fit was memorisation.

ShapeDiagnosisAction
Both falling, close togetherHealthy, still learningKeep training
Both flat and highUnderfittingBigger model, better features, higher rate
Training falls, validation risesOverfittingRegularise, augment, stop earlier
Training falls, validation flatMild overfitting or a ceilingMore data or regularisation
Both flat from step oneLearning rate far too low, or a bugCheck gradients and the rate
Loss jumps to NaNRate too high, or log(0)Lower the rate, clip gradients
Validation below trainingAugmentation or dropout artefact, or a leakCheck the pipeline

That last row is worth expanding. Validation loss below training loss is often benign: dropout and augmentation are active in training and disabled at validation. So the training count is measured under harder conditions. If neither is in use, suspect a leak.

Reading the shape of the descent

Beyond the broad diagnosis, the curve's shape carries set information.

A sharp initial drop then a long plateau is normal. The net learns the easy structure — class priors, obvious features — in the first epoch or two. And the rest is slow refinement.

A staircase means a step learning-rate schedule. Each drop is a rate reduction letting the net settle into a narrower min.

A sudden improvement in the final epochs is the cosine schedule's low-rate phase working as intended. Expect it, and set early-stopping patience long enough not to cut it off.

A sudden permanent jump upwards means the learning rate was too high for the sharper region the net had entered. The weights have been thrown somewhere worse. A decaying schedule stops it.

Noise batch to batch, smooth across epochs is expected. Judge the trend over a few epochs. A single bad epoch is not a signal.

Curves worth plotting beyond the loss

Learning rate. Plot it alongside the loss and the connection between schedule and progress turns visible at once. It also catches the common bug of a scheduler stepped at the wrong interval.

Gradient norm per layer. A steady decay from output to input means vanishing gradients. Vals in the thousands mean exploding. This is the fastest diagnosis on hand for a network that will not train.

The task metric. Accuracy or F1 alongside the loss, since they can diverge — loss rising while accuracy holds means growing overconfidence rather than worse classification.

The fraction of zero activations. Around 50% after ReLU is healthy. 90% and rising means units are dying.

Logging all four costs almost nothing and turns debugging from guesswork into reading.

Try this above

  1. Set Net Complexity low and Data Noise low. Both curves flatten out high — the underfitting signature.
  2. Raise Net Complexity and let it run the full Total Epochs. Find the epoch where validation stops falling and starts to climb.
  3. Raise Data Noise and repeat. The turning point arrives earlier, since there is more noise on hand to memorise.
  4. Set Learning Rate too high and watch both curves turn jagged rather than smooth.

What often goes wrong

Judging on training loss alone. It almost always keeps falling. A net can drive training loss to nearly zero while getting steadily worse at its actual job.Training for a fixed epoch count. The right count is wherever validation loss bottoms out. And that moves with each change to the data, the net or the learning rate.Reading noise as trend. With a small validation set, a wobble of a couple of percent between epochs is sampling noise. Wait for a sustained rise before concluding anything.

In one line

The gap between the curves is the diagnosis. Either curve alone is not.

Learning curves: a other plot with a close name

A learning curve plots performance against the amount of training data rather than against epochs. And it answers a question no other diagnostic does: would more data help?

Train on 10%, 20%, … 100% of the data and plot both scores:

Both curves converging to a high error means you are limited by the net, not the data. More rows will not help. More capacity or better features will.

A large left gap, with validation error still falling means you are limited by data. Collecting more is the highest-value action on hand.

Validation error flat as data grows

That distinction is worth an afternoon of compute before committing to an costly annotation project.

A real checklist

When a training run looks wrong, work through this in order:

  1. Can the net overfit 20 cases? If not, it is a bug — wrong labels, a broken loss, gradients not reaching the params.
  2. Is the initial loss about ln(C)? If not, the output layer or the labels are misaligned.
  3. Is the learning rate right? A short exponential sweep answers this in a minute.
  4. Are the inputs scaled? Unscaled features look like each other problem.
  5. Are gradients reaching the early layers? Log per-layer norms.
  6. Is the validation set representative and large enough? A few hundred cases give metrics that swing a few percent.
  7. Is the data shuffled? Batches sorted by class break batch normalisation.

Most training failures are caught by the first four.

Six curves and what each one is telling you

Training curves are the main diagnostic you get. And most of their shapes have a set cause. Here are six, made from those causes, with the reading for each.

example_01.pyNumPy
Output

The left three curves cover a learning rate that is too high, too low. And the confusing case where validation sits below training.

example_02.pyNumPy
Output

Two real rules summarise the diagnostic, plus a reminder about log-scale plotting.

example_03.pyNumPy
Output

Questions people ask

How many epochs should I train for? Until validation stops improving, with early stopping deciding rather than a fixed count.

Should the training loss reach zero? On real data, no — noise sets a floor. Reaching zero often means memorisation.

Why is my validation loss so noisy? A small validation set. Or a high learning rate. Increase the set size or smooth over a few epochs.

My training loss is less than validation from the start. Overfitting? Not necessarily — some gap is normal from the first epoch. Watch whether it widens.

Should I plot loss or accuracy? Both. Loss is the smoother signal. Accuracy is what you report. And the two can disagree informatively.

What if both curves are flat at just the same value? The net is predicting a constant. Check the learning rate, the initialisation. And whether the optimiser is stepping at all.

Recap in one screen

  • The level of the training curve measures bias. The gap between the curves measures variance.
  • Falling together is healthy. Diverging is overfitting; both flat and high is underfitting.
  • A final-epoch improvement is the learning-rate schedule working — do not stop before it.
  • Log the learning rate, per-layer gradient norms and the task metric alongside the loss.
  • A learning curve against dataset size is what tells you whether more data would help.

Check yourself

0 of 3

Answer without scrolling back up.

  1. Training loss keeps falling while validation loss rises. The right reading is:

  2. Both curves are flat and high from the very first epoch. Most likely:

  3. Validation loss sits consistently *below* training loss. The usual explanation is:

Cheat sheet

Model Training Curves

Read training and validation curves like a practitioner: spot underfitting, a healthy fit and overfitting from their shape alone.

DEEP LEARNING · vizlearn.in/deep_learning/model_training_curve.html

About the author

Ashish Jangra builds and maintains VizLearn. Every module here is written and the visualisation behind it hand-built, so the numbers in a readout come from the same code that draws the picture. Corrections are genuinely welcome and get priority over everything else — if a page states something wrong, or an animation misrepresents what the algorithm does, get in touch.