Why do separate training and serving implementations of one feature transform cause training-serving skew?

Quick Overview

Asks why keeping two separate implementations of a feature transform, one for training and one for serving, leads to training-serving skew. Tests knowledge of how the code paths diverge, why the failure is silent, and how to prevent it.

Why do separate training and serving implementations of one feature transform cause training-serving skew?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Why does maintaining separate implementations of the same feature transform for training and serving cause training-serving skew? A typical setup has a batch pipeline that computes features for training and a separate online service that recomputes them at request time. Explain what goes wrong and how you would prevent it. ```hint What must match List everything two pieces of code must agree on to produce identical feature values for every input. ``` ```hint Detection Ask how anyone would find out if the two versions stopped matching. ``` ### What a Strong Answer Covers - How the model ends up receiving feature values at serving time that differ from what it learned on, and why that hurts predictions. - Concrete sources of divergence between the two paths. - Why the failure is silent and how it usually shows up. - How to prevent and detect skew. ### Follow-up Questions - How would you build an automated parity test between the offline and online feature pipelines? - What are the drawbacks of training only on features logged at serving time? - How does point-in-time correctness of training data relate to training-serving skew? - If the serving path has to stay in a different language for latency reasons, how would you keep the two implementations in sync?

Overview: Asks why keeping two separate implementations of a feature transform, one for training and one for serving, leads to training-serving skew. Tests knowledge of how the code paths diverge, why the failure is silent, and how to prevent it.

General logo
General
Nov 25, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

Why does maintaining separate implementations of the same feature transform for training and serving cause training-serving skew?

A typical setup has a batch pipeline that computes features for training and a separate online service that recomputes them at request time. Explain what goes wrong and how you would prevent it.

What a Strong Answer Covers Guidance

  • How the model ends up receiving feature values at serving time that differ from what it learned on, and why that hurts predictions.
  • Concrete sources of divergence between the two paths.
  • Why the failure is silent and how it usually shows up.
  • How to prevent and detect skew.

Follow-up Questions Guidance

  • How would you build an automated parity test between the offline and online feature pipelines?
  • What are the drawbacks of training only on features logged at serving time?
  • How does point-in-time correctness of training data relate to training-serving skew?
  • If the serving path has to stay in a different language for latency reasons, how would you keep the two implementations in sync?