Single Source of Truth: Unified Feature Definitions
The Foundational Strategy
The foundational strategy for preventing training serving skew is establishing a single source of truth for all features. This means maintaining one declarative feature registry that describes the logic, keys, freshness requirements, and both training and serving semantics for every feature your models consume. Without this, teams inevitably write separate implementations: data scientists build features in Python notebooks for training, while engineers rewrite them in Java or C++ for production, introducing subtle bugs at each translation.
Two Execution Modes
A production feature store provides two execution modes from one definition. The offline mode performs batch computation with time travel capabilities, allowing you to backfill features as they would have appeared at any historical timestamp. This ensures point in time correctness: when training on data from March 15th, you only use features available on March 15th, never leaking future information. The online mode materializes features into a low latency key value store with TTL and freshness SLAs, typically targeting p95 fetch latency under 5 milliseconds.
Production Examples
At Uber, this pattern powers features across pricing, fraud detection, and matching systems. A single feature definition like "rider 7 day trip count" computes identically whether you are building training data for last year or serving a real time prediction. Meta's feature store serves billions of feature reads per second for News Feed ranking, with the same transformation code running in Spark for training and in optimized C++ for serving.
Versioning Everything Together
The key is versioning everything together: feature definitions, vocabularies, transformation functions, and model artifacts all carry consistent version identifiers. When you deploy model version 47, it explicitly depends on feature registry version 23, ensuring the serving infrastructure loads exactly the transform logic that training used.