Temporal Correctness and Point in Time Joins
What Temporal Leakage Is
Temporal leakage is one of the most insidious forms of training serving skew. It occurs when training joins use the latest snapshot of data instead of a point in time view, leaking future information that will not be available at serving. Your offline AUC looks fantastic at 0.94 because the model secretly learned from tomorrow's data, but in production it collapses to 0.72 because those features do not exist yet. This is not a rare edge case; it is the default behavior of naive batch joins.
Point in Time Joins
Point in time correctness requires joining labels with features using event timestamps and effective from or effective to intervals. When you train on a fraud transaction from March 15th at 14:30, you must only use features that existed at March 15th 14:30, not features computed later that day or week. For rolling aggregates like "user transaction count in last 7 days," you compute the window as it would have been at event time, never with full day hindsight.
Feature Freshness Complexity
The problem compounds with feature freshness requirements. Real time features like "clicks in last 5 minutes" provide strong predictive signal (boosting CTR by 3 to 5 percent in recommendation systems) but introduce complexity. At training time, you must reconstruct these streaming aggregates from logs with exactly the same window logic and update frequency as production. If production updates every 60 seconds but training uses daily snapshots, the distribution mismatch creates skew.
Temporal Validation
Temporal validation extends this principle to evaluation. Hold out a forward in time window (t plus 1 to t plus n days) for validation to approximate deployment conditions, rather than random splitting which mixes past and future. For ranking systems, this catches feedback loop issues before deployment.