LearnQuestion bank

Your dataset is dominated by common, easy cases, and the events you care most about are rare (for example, near-misses in driving logs). How do you train and evaluate so the model handles the rare cases?

ResearchTechnicalMedium

Answer it yourself first, out loud or on paper, then compare.

Answer

Model answer, written in a candidate's voice

In short

  • Mine and label rare events deliberately, with scenario-level splits and audit trails
  • Use re-weighting/oversampling, focal loss, and curricula while keeping a clean validation set; recalibrate afterwards because resampling inflates rare-class probabilities
  • Add synthetic/simulated rare cases from learned world models, validated against real logs
  • Evaluate per slice with confidence intervals on held-out rare scenarios, not global accuracy
  • Close the loop with active learning: sample uncertain/disagreeing cases, label, retrain, re-check

In full

I would treat the rare events as the product, not as noise: first I mine logs for near-miss signatures and get expert labels, then I split by scenario/session so the same rare situation never leaks into both train and test. For training I would re-weight or oversample rare cases, use focal loss or a curriculum from easier to harder rare scenarios, and keep the original class distribution in the evaluation set so metrics stay honest. I would also add synthetic or simulated near-misses from a learned world model, but only after validating them against real logs and never letting them replace real held-out cases. Evaluation would be per slice—weather, vehicle, road type, driver state, time of day—with confidence intervals on held-out rare scenarios, reporting precision/recall or PR-AUC and calibration rather than accuracy, and recalibrating after re-weighting or oversampling, because both inflate the predicted probability of the rare class. Finally I would run an active-learning loop: pick uncertain or model-disagreeing cases, send them for labelling, retrain, and re-check the slices, stopping when the rare-slice gains stop justifying the labelling cost.

Corrected by an independent AI reviewer.

What a strong answer covers

  • Mine and label rare events.
  • Re-weighting or oversampling, focal loss, curricula.
  • Synthetic or simulated examples (learned world models).
  • Per-slice evaluation with confidence intervals on held-out rare scenarios.
  • An active-learning loop.

Common mistakes

  • Reporting only aggregate metrics.
  • Oversampling without checking calibration.