Skip to content
ML Academy

Neural networks, deep learning, NLP · insight-0424

Overfit a tiny batch before launching full training

Evidence type
practitioner heuristic
Difficulty
easy
Roles
ML engineer, Data scientist, Applied AI
Industries
cross-industry

Summary: situation, action, reason, boundary

  1. Situation

    A new model or data pipeline is ready and you are about to start a multi-hour training run.

  2. Action

    Train on a fixed batch of 2 to 32 examples with regularization off until training loss is near zero and predictions match labels exactly. Only then train on the full data.

  3. Reason

    Networks can memorize even random labels, so failing to memorize a tiny batch points to a bug, not to insufficient capacity or data.

  4. Boundary

    Every new architecture, loss, label encoding or data loader.

Symptom or risk

Bugs in labels, loss wiring, masking or the optimizer step let training run but learn nothing useful; you discover it hours later from flat curves.

Exceptions

Heavily augmented or stochastic objectives need augmentation and dropout disabled for the test.

Trade-offs

A few minutes per change; passing it proves the pipeline can learn, not that it generalizes.

Pitfalls

Shuffling or augmenting the tiny batch so the target keeps changing; leaving weight decay on and blaming the model.

Lessons and concepts

Claims and their sources