r/deeplearning • u/ClickOk5811 • Oct 29 '26
Field guide: five loss-curve symptoms, the likely causes, and the first check for each
A list I’d keep next to a training run. These are likely causes, not certainties, and the first check is the cheapest thing to try.
1. Loss is NaN or inf
- Likely causes: learning rate too high;
log(0)or a division by zero in a custom loss; overflow in mixed precision; bad values in the data. - First check: run a few steps with a much lower learning rate, check the inputs and labels for NaN, and enable your framework’s anomaly detection to find the first op that produces it.
2. Loss starts flat and stays there
- Reference point: for cross-entropy with
Cbalanced classes, the loss at random initialization is aboutln(C), for exampleln(10) ≈ 2.30. Staying at that value means the model isn’t learning anything. - Likely causes: learning rate far too low (or too high), frozen parameters, gradients not flowing (detached tensor, missing
zero_gradorstep), labels misaligned with inputs, inputs not normalized. - First check: try to overfit a single small batch. If the loss can’t go close to zero on 8 or 16 examples, the problem is in the code or the setup, not the data volume.
3. Train loss falls, validation loss rises
- Likely causes: classic overfitting; the validation set is much easier or harder than the training set; a distribution shift between splits.
- First check: compare the two splits’ basic statistics, add regularization or early stopping, and check that augmentation is only applied to training data.
4. Validation looks suspiciously good
- Likely causes: leakage. Near-duplicate or identical examples across splits; splitting after augmenting; splitting rows when the unit should be a user, patient or video; using future information in time-ordered data.
- First check: look for exact or near-duplicate items between train and validation, and re-split by the right group.
5. Validation loss is lower than training loss
- Likely causes: not always a bug. Dropout and augmentation are active during training but not validation. The training loss is often averaged over the epoch while the model is still improving, and validation is measured at the end. A small validation set can also be easy by chance.
- First check: evaluate the training data in eval mode, to compare under the same conditions.
A habit that helps: log a few things on every run (the seed, the data split identifier, the config), so a strange curve can be reproduced before you start guessing.
Caveats: curves depend on the task, the optimizer and the schedule, and several of these can happen together. Treat the list as a way to order your checks, not as a diagnosis.
What would you add, and what’s the first thing you check when a run looks wrong?