Skip to content
tezvyn:

Validation loss increases while training loss decreases: what is this?

Source: Wikipedia: OverfittingMediumHow cards are made

Validation loss increases while training loss decreases: what is this?

This tests recognition of overfitting and regularization. A strong answer names it, offers early stopping, dropout or weight decay, and data augmentation or more data. A red flag is suggesting longer training or more parameters without fixing generalization.

What's really being asked

The interviewer wants to see if you can distinguish memorization from generalization in large model training. They care whether you understand that divergence between training and validation loss signals the model is extracting noise or idiosyncrasies from the training set rather than learning transferable structure. They also want evidence that you have a toolbox of regularization techniques and know when to apply them.

The full answer

First, name the phenomenon immediately as overfitting. Second, explain that the gap between decreasing training loss and increasing validation loss means the model is memorizing training examples instead of learning patterns that generalize. Third, give three distinct and concrete techniques. Early stopping is the first: monitor validation loss and halt training when it rises for a sustained number of steps. Dropout or weight decay is the second: dropout randomly zeroes activations during training to prevent co-adaptation, while weight decay adds an L2 penalty to the loss function to keep parameters small. Data augmentation or additional training data is the third: for language models this can mean back-translation, synonym replacement, or simply collecting more diverse text so the training distribution better matches the target distribution. A senior candidate might also mention reducing model capacity or using label smoothing as valid alternatives.

The mistakes people make

A major red flag is suggesting to train longer or increase model size without qualification, since both actions typically worsen overfitting. Another weak response is proposing a lower learning rate as the primary fix; while scheduling matters, it does not directly address the memorization gap. Candidates who only know one technique or who confuse overfitting with underfitting by claiming the model needs more parameters will also signal shallow experience.

What usually comes next

The interviewer may ask how early stopping interacts with learning rate schedulers that decay over time. They might probe whether dropout is still used in modern transformer architectures or if alternatives like DropPath or stochastic depth are preferred. Another common follow-up is to ask how you would detect overfitting when validation loss is noisy rather than monotonically increasing, or how regularization trade-offs change with model scale.

A concrete example

Suppose you are pretraining a one billion parameter decoder-only transformer on fifty billion tokens and you see validation perplexity rise after the first one hundred thousand steps while training perplexity keeps falling. You would implement early stopping with a patience of five thousand steps, add weight decay set to one tenth of the learning rate, and augment the corpus with filtered web text from a different domain to broaden coverage. You would then retrain and verify that the validation curve flattens rather than climbs.

Interview question

When training a large transformer, training loss falls while validation loss rises. Which action most directly addresses the root cause?

  • a.Train for more steps to allow validation loss to converge
  • b.Apply early stopping or add regularization like weight decayCorrect
  • c.Increase model capacity to better fit the training data
  • d.Lower the learning rate to stabilize the optimization landscape
Why?

The divergence signals overfitting, where the model memorizes training noise instead of generalizable patterns. Early stopping and regularization directly combat this, whereas longer training or more parameters typically worsens the gap, and a lower learning rate does not directly fix memorization.

Just read this? Test yourself on what you have been reading.

Read the original → en.wikipedia.org

You just looked this up. Could you explain it out loud?

That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on llms — each one lists the topics its interview covers.

See open roles