Quantifying Hidden Temporal Leakage in Machine Learning
An empirical evaluation of how record availability affects historical feature construction and offline model scores.
Two timestamps, one prediction.
A transaction may happen on Monday and reach the feature pipeline on Thursday. A Tuesday prediction would have to proceed without that record.
The study compared event-time-only, fixed-lag, and dual-clock feature construction across 36 simulated datasets spanning finance, healthcare, and retail. The dual-clock rule checks both when the event happened and when its record became available.
What could the model know?
This example follows one transaction. It happens on Monday at noon, and its record reaches the feature pipeline on Thursday at noon.
Drag the slider or use the arrow keys to change the prediction day. All times are noon.
Sun
MonEvent occurs
Tue
Wed
ThuRecord arrives
Fri
Tuesday prediction
The transaction has happened. Its record is still unavailable to the pipeline.
Event-time-only rule
Included in hindsight
Dual-clock rule
Waits for the record
Compare evaluation scores
The same event-time-only logistic regression models were scored on two versions of the same holdout. The deployment-equivalent version uses only records available at prediction time.
0.60AUROC scale0.70
Finance0.6754
Healthcare0.6830
Retail0.6496
Logistic regression means across 12 simulations per domain
Across the simulated domains and model families, event-time-only construction inflated average offline AUROC by about 0.011. A fixed reporting lag also changed the feature data: it excluded some usable recent records and admitted some older records that arrived late.
Limitations
The benchmark used simulated finance, healthcare, and retail event streams with controlled reporting delays. The size of the effect in deployment depends on how records arrive and how reliably the pipeline captures availability timestamps.
What to take into your own evaluation
Track when each record becomes usable by the feature pipeline. Use that availability cutoff alongside event time when rebuilding historical features. In the simulations, a fixed global lag excluded usable recent records and still let some late records through.
The ZIP contains the Python runner, pinned dependencies, the study protocol, and the recorded CSV outputs. The runner generates the simulated event data from a fixed seed.