Clinic: data faults
Why it matters "The bug is always in the model" is false. Data faults are common and they hide well, because the training loop itself is fine.
Leakage: the validation set contains training examples, so validation accuracy looks wonderful and means nothing. Not shuffling: batches come one class at a time, the model chases whichever class it saw last, and accuracy on mixed data is poor. Wrong labels: many training labels are random, so the training loss cannot fall far even though the model can memorise a batch.
Each case below is a training run with one fault planted in it. For each: spend probes to find the fault, then write a fix as config changes. The faults in this lesson: leak, no_shuffle, noisy_labels. Fewer probes is better; a good diagnostician rarely needs more than two per case.
| Probe | What it tells you |
|---|---|
loss_curve(c) | Training loss every 50 steps and final validation accuracy. Always look first. |
loss_at_init(c) | Loss before training. A fresh 10-class model should be near ln(10) = 2.30. |
overfit_one_batch(c) | Can it memorise 32 examples? A healthy setup gets near 0. |
grad_norms(c) | Gradient size per weight matrix at the start. Zero means nothing can learn. |
update_ratio(c) | Plain SGD step size relative to weight size. Healthy is about 0.001 to 0.1 (a rule of thumb for plain SGD; Module 14 shows why Adam differs). |
act_stats(c) | Hidden activations: mean, largest value, share of dead units. |
lr_schedule(c) | The learning rate at steps 0, 50, 100 and so on. |
batch_labels(c) | The labels in the first few batches. |
overlap(c) | How many validation examples also appear in training. |
Words and symbols in this lesson
- probe
- a quick measurement of a run, such as gradient sizes or dead units
- leakage
- test or validation information reaching training
Fill in diagnosis (case to fault name) and fixes (case to a dictionary of config changes) for cases A, B and C. A fix must remove the fault and train to at least 90% validation accuracy.
Spotted a problem in this lesson? Report it · Ask about this lesson
This exercise opens soon
Finish the lesson before it and this one unlocks. The whole course is free, no account needed, and you can read this lesson right now.
This browser is blocking cookies for learn.floati.life, so lessons you finished here cannot open in order. Allow cookies for this site and reload.