Key takeaways
- Overfitting means the model memorised the training data's specifics instead of learning the general pattern; it looks great on training data and fails on new data.
- A proper train/validation/test split, kept genuinely separate, is the single most important defence, because it is how you notice overfitting is happening at all.
- Regularization, dropout and early stopping directly limit a model's capacity to memorise; more and more varied data reduces the incentive to.
- Overfitting during LLM fine-tuning has its own signature, the model repeats training phrasing verbatim, and its own fix, fewer epochs and more varied examples.
- The loss curve tells the story before the metrics do; a training loss still falling while validation loss rises is overfitting happening in real time.
What is overfitting?
Overfitting is when a model learns the specifics of its training data, including its noise and quirks, instead of the general pattern underneath it, so it performs very well on the data it was trained on and measurably worse on new data it has not seen. The model has effectively memorised answers rather than learned to reason from inputs to outputs, and the gap between training performance and validation or real-world performance is the tell.
Also asked as: what is overfitting · overfitting explained · overfitting in machine learning · overfitting meaning · what causes overfitting · overfitting vs underfitting · signs of overfitting
Every training run I evaluate, classic model or LLM fine-tune, gets checked against this exact failure before I trust a good-looking training metric.
A model that aces its training data and stumbles on anything new hasn't learned. It has memorised the answer key. Pranjul Rathour
How is overfitting different from underfitting?
Overfitting is too much capacity relative to the signal in the data, or too little regularization, so the model fits noise as if it were signal. Underfitting is the opposite: the model is too simple, or trained too little, to capture even the real pattern, and performs poorly on both training and new data. Overfitting shows a large gap between training and validation performance; underfitting shows both scores mediocre and close together. The fixes are opposite too: overfitting needs less capacity or more regularization, underfitting needs more capacity or more training.
Also asked as: overfitting vs underfitting · difference between overfitting and underfitting · how to tell overfitting from underfitting · underfitting explained · bias variance tradeoff
How does a train/validation/test split actually catch overfitting?
Training data is what the model learns from. Validation data is held out and checked periodically during training, specifically to notice when validation performance stops improving or starts getting worse while training performance keeps improving, which is overfitting happening in real time. Test data is held out entirely until the very end, used exactly once, to report a final, honest number that was never used to make any decision during development. Without this separation, you have no way to distinguish a model that generalises from one that has simply memorised what you are checking it against.
Also asked as: train validation test split explained · why do we need a validation set · how does validation set detect overfitting · train test split machine learning · what is a holdout set

What actually prevents overfitting?
Regularization techniques such as L1 and L2 penalties discourage the model from relying too heavily on any single feature or weight [1]. Dropout randomly disables a fraction of neurons during training, forcing the network to not depend on any one path through it [2]. Early stopping halts training the moment validation performance stops improving, rather than training until training performance maxes out. More data, and more varied data, reduces the model's ability to memorise specifics because there are simply more specifics than it has capacity to memorise. Simplifying the model, fewer parameters or a shallower architecture, directly reduces its capacity to overfit in the first place.
Also asked as: how to prevent overfitting · overfitting prevention techniques · regularization explained · dropout explained · early stopping machine learning · how to reduce overfitting in neural networks
What does overfitting look like when fine-tuning an LLM specifically?
The model starts repeating training examples' exact phrasing verbatim, even in contexts where it does not quite fit, a strong sign it has memorised specific training completions rather than learned the underlying behaviour. Validation loss on held-out examples rises while training loss keeps falling, the same signature as classic overfitting, but often appearing faster than in classic ML because fine-tuning datasets are typically much smaller than pretraining corpora. The standard fixes shift accordingly: fewer training epochs, a lower learning rate, more varied examples per behaviour rather than many near-duplicates, and parameter-efficient methods like LoRA, which constrain how much the model's weights can shift in the first place [5].
Also asked as: overfitting when fine tuning llm · llm fine tuning overfitting signs · how many epochs before overfitting llm · lora and overfitting · fine tuning validation loss rising
My longer walkthrough of reading a fine-tuning loss curve specifically, including what a healthy one looks like against an overfitting one, is on the portfolio [9].
How do I catch overfitting early rather than after the fact?
Watch the training and validation loss curves together from the first epoch, not just the final metric. The moment validation loss stops improving while training loss keeps dropping, that gap is overfitting starting, and it is far cheaper to stop or adjust there than to discover it only after evaluating a finished model. Set up automatic checkpointing at the point of best validation performance, not the last epoch, so the model you actually keep is the one before the overfitting started, not after.
Also asked as: how to catch overfitting early · monitoring loss curves during training · when to stop training to avoid overfitting · validation loss vs training loss divergence
What mistakes do people make with overfitting?
Reporting training accuracy as if it were the model's real performance. Peeking at the test set during development and unconsciously tuning toward it, which quietly turns the test set into a second validation set and inflates the final number's honesty. Training for a fixed number of epochs regardless of what the validation curve says. Assuming more data always fixes overfitting, when sometimes the actual fix is a simpler model or a smaller learning rate. Ignoring that a small, over-repeated fine-tuning dataset can cause the exact same failure a huge classic-ML model shows with too little data.
Also asked as: overfitting common mistakes · test set leakage · why is my model overfitting · overfitting debugging checklist
Overfitting interview questions
Define overfitting and contrast it with underfitting. Explain why a validation set is necessary and what leaking the test set into development actually breaks. Name three concrete techniques to prevent overfitting and what each one limits. Explain how overfitting shows up differently when fine-tuning an LLM compared with training a classic model. Describe how you would catch it early in a real training run. The strongest answer includes a loss curve you actually read and a decision it drove.
Also asked as: overfitting interview questions · machine learning fundamentals interview · bias variance interview question · regularization interview questions
Where should I start?
Look at the training and validation loss curves from your last training run, classic model or fine-tune, side by side. If you cannot find that plot, that is the first thing to fix before the next run. For a hands-on session on training and evaluating models honestly, from loss curves to held-out test sets, email pranjulrathour41@gmail.com or use pranjulrathour.scult.in/invite.
Sources
- Goodfellow, Bengio, Courville, Deep Learning (2016), regularization chapterdeeplearningbook.org
- Srivastava et al., Dropout: A Simple Way to Prevent Neural Networks from Overfitting (2014)jmlr.org
- Google, Machine Learning Crash Course, overfittingdevelopers.google.com
- Scikit-learn, cross-validation documentationscikit-learn.org
- Hu et al., LoRA: Low-Rank Adaptation of Large Language Models (2021)arxiv.org
- How to fine-tune an LLM, Pranjul Rathourpranjulrathour.github.io
- How to prepare a dataset for fine-tuning, Pranjul Rathourpranjulrathour.github.io
- LoRA vs QLoRA, Pranjul Rathourpranjulrathour.github.io
- Reading a loss curve, fine-tuning, Pranjul Rathourpranjulrathour.scult.in



