← Machine Learning for EveryoneToolsInVisionLearning Center
Responsible Operations · Lesson 73

Audit Leakage Before Deployment

An unexpectedly predictive field appears in the deployment pipeline.

Read the full lesson and open its transcript below. A narrated video will be added after production.

Lesson overview

What you will learn

An unexpectedly predictive field appears in the deployment pipeline.

  1. A practical question
  2. The useful idea
  3. Work through the example
  4. Limits and next step
01

A practical question

During final deployment checks, a new field predicts lateness almost perfectly. Before celebrating, trace when it is created. Does it contain the driver's after-departure status or even the final arrival record?

02

The useful idea

Audit each input's source and timestamp. Check duplicate trips across splits, preprocessing fitted on held-out records, and labels accidentally embedded in identifiers. Replay a historical prediction using only values that would truly have existed before departure.

03

Work through the example

If the perfect feature disappears under that replay, update the pipeline and rerun the honest evaluation. Keep the audit as a repeatable checklist tied to real columns, not a one-time warning in a report. A field that predicts delay almost perfectly deserves suspicion if it might be created after departure. Trace the column to its source and timestamp, then replay a historical prediction using only data that existed at the decision moment. Repeat on multiple dates, since one clean example does not clear a pipeline join. If the score falls after removing future information, update the feature recipe and rerun evaluation. Document the exact leaking step so the same shortcut cannot return in a later export. Now check the idea on a concrete example: Replay a historical predeparture prediction with only truly available fields. A possible trap is worth naming: Leakage can create a strong validation score that collapses live. The answer follows from that evidence: Audit timestamps, data lineage, duplicates, and preprocessing to catch leakage before release. Recreate one warning from a date before the suspicious field existed, then from a date after it appeared. If the model depended on information recorded after departure, remove the field and rerun the whole honest split. Save that check in the pipeline tests.

04

Limits and next step

Next, we'll inspect whether errors fall disproportionately on particular routes or districts.

Worked example

Replay a historical predeparture prediction with only truly available fields.

Knowledge check

Quick check: test your understanding

Try it yourself: Consider this case: Replay a historical predeparture prediction with only truly available fields. Explain how you would check the result. In your answer, address this limitation: Leakage can create a strong validation score that collapses live.

Check the reasoning

Audit timestamps, data lineage, duplicates, and preprocessing to catch leakage before release. Leakage can create a strong validation score that collapses live.

What is the main idea behind audit leakage before deployment?

Audit timestamps, data lineage, duplicates, and preprocessing to catch leakage before release.

How is it used in the example?

Replay a historical predeparture prediction with only truly available fields.

What limitation should be checked?

Leakage can create a strong validation score that collapses live.

Further reading

Machine Learning — Tom M. Mitchell.

Original ToolsInVision teaching examples. Editorial approach · Suggest a correction

Accessible referenceLesson 73 transcript290 words · Narration ready for the upcoming videoOpen transcript

During final deployment checks, a new field predicts lateness almost perfectly. Before celebrating, trace when it is created. Does it contain the driver's after-departure status or even the final arrival record?

Audit each input's source and timestamp. Check duplicate trips across splits, preprocessing fitted on held-out records, and labels accidentally embedded in identifiers. Replay a historical prediction using only values that would truly have existed before departure.

If the perfect feature disappears under that replay, update the pipeline and rerun the honest evaluation. Keep the audit as a repeatable checklist tied to real columns, not a one-time warning in a report. A field that predicts delay almost perfectly deserves suspicion if it might be created after departure. Trace the column to its source and timestamp, then replay a historical prediction using only data that existed at the decision moment. Repeat on multiple dates, since one clean example does not clear a pipeline join. If the score falls after removing future information, update the feature recipe and rerun evaluation. Document the exact leaking step so the same shortcut cannot return in a later export. Now check the idea on a concrete example: Replay a historical predeparture prediction with only truly available fields. A possible trap is worth naming: Leakage can create a strong validation score that collapses live. The answer follows from that evidence: Audit timestamps, data lineage, duplicates, and preprocessing to catch leakage before release. Recreate one warning from a date before the suspicious field existed, then from a date after it appeared. If the model depended on information recorded after departure, remove the field and rerun the whole honest split. Save that check in the pipeline tests.

Next, we'll inspect whether errors fall disproportionately on particular routes or districts.