What Overfitting Actually Taught Me About My First ML Model

99% training accuracy, 58% validation accuracy, and a night of tweaking parameters before understanding why.

By Akshay More · 2026-08-02 · 4 min read · AI

What Overfitting Actually Taught Me About My First ML Model

I was building my first ML model. Training accuracy: 99%. Validation accuracy: 58%. Classic overfitting.

What overfitting actually is

Overfitting is when a model memorizes the training data so well that it fails on anything new. It's the equivalent of a student who mugs up last year's question paper word for word, then freezes when the exam has one new question. Perfect on what it already knows, a disaster in the real world.

What I tried first (and why it didn't work)

Changed the learning rate. Adjusted batch size. Tried different optimizers.

None of it worked, because none of it addressed why the model was memorizing instead of learning.

The actual fixes

1. Dropout — randomly switches off neurons during training so the model can't just memorize, forcing it to learn actual patterns. 2. Regularization (L1/L2) — adds a penalty for complexity, discouraging the model from overfitting to noise. 3. More data — obvious, but the most effective lever. A model that has seen more examples generalizes better. 4. Early stopping — stop training once validation loss stops improving, instead of letting it over study the training set.

Takeaway

A model that only performs well on training data is useless. Generalization is everything, in ML and, honestly, in life.