Identify the feature and fitted state
At training time, a query can see a corrected feature value that did not exist when the original prediction was made. The row carries an old event timestamp, so a join that filters only by event time accepts it. The model is then evaluated on a better-informed world than the one it will encounter online.
The preview service gives us a small way to inspect this error. Its feature records below are independently authored; no learner data, churn dataset or production model is used. We will compare three joins and count changed decisions without claiming a measured model-accuracy improvement.
Share a feature definition and identify its state
Two pieces of code can both be called contrast while computing different quantities. One subtracts the minimum before scaling, another divides the raw value by its maximum. Both return numbers in the expected range and pass a basic schema check. A model trained on one definition has no reason to interpret the other correctly.
Keep the transformation definition and its fitted state together. A normalization function without its training mean is not the complete feature. A categorical encoder without its vocabulary cannot assign the same meaning to a column. Version the state that changes interpretation, not merely the function name.
A shared implementation reduces one source of divergence, but it does not make the two paths identical by itself. The same code applied to differently timed, filtered or authorized inputs can produce different values. Testing feature equality must therefore identify the inputs as well as the code.
Training–serving skew has several routes
Here, skew means a relevant mismatch between the features represented in training/evaluation and those available to the serving computation. Martin Zinkevich's Rules of Machine Learning discusses discrepancies in processing, changing data and feedback, and recommends observing the actual served features. Our case isolates timing while keeping the transformation simple.
A model can also lose quality because the population changed even when the two paths agree perfectly. Conversely, the two paths can disagree before any outcome labels arrive. Keep feature-consistency observations separate from estimates of predictive quality. Both matter, but they answer different questions.