MLOps & Infrastructure

Feature Stores Solve Training-Serving Skew, Not Data Access

Key takeaway: The failure a feature store prevents is a model that validates well and underperforms in production because the numbers it sees at inference were computed by different code.

The Bug It Exists to Fix

Training runs in a notebook against a warehouse. Features are computed in SQL and pandas: rolling averages, counts over windows, aggregates by customer.

Serving runs in a request handler. The same features are recomputed in application code, because the warehouse is too slow for a synchronous call.

Two implementations of the same logic will diverge. A window defined as thirty days inclusive in one and exclusive in the other. A null handled as zero here and as the mean there. A timezone difference shifting daily boundaries.

The model was trained on one distribution and is served another. Offline metrics look correct; production performance is worse, and the cause is invisible because both code paths appear right in isolation.

What a Feature Store Provides

The central property is one definition serving both paths.

Capability Value
Single feature definition Eliminates skew by construction
Point-in-time correct joins Prevents label leakage
Low-latency online serving Makes real-time features viable
Feature reuse across models Reduces duplicated work
Lineage and documentation Answers where a number came from

Point-in-time correctness deserves emphasis because it prevents a subtle and severe bug. Building a training set by joining current feature values to historical labels leaks future information — the model learns from data that did not exist when the prediction was needed, then fails in production where that data genuinely is not available. Getting this right manually requires careful temporal joins that are easy to write incorrectly.

When It Is Not Worth It

A feature store is real infrastructure with real operational cost. It is not justified when:

  • Features are computed at request time from data already in the request
  • You have one or two models and no cross-team reuse
  • Everything is batch scoring with no online serving path
  • The team lacks capacity to operate another distributed system

For batch-only pipelines, a well-structured shared transformation library with versioned outputs achieves most of the benefit. The skew problem largely disappears when there is only one execution path.

A Lighter Approach That Often Suffices

Before adopting a platform, extract feature computation into one library that both training and serving import. That single change eliminates the majority of skew, because there is now one implementation rather than two.

Add a validation step comparing feature distributions between training data and live serving traffic. Skew that survives shared code shows up here as a distribution shift, and catching it in monitoring is far better than inferring it from degraded business metrics.

The Bottom Line

Adopt a feature store when you have online serving, multiple models sharing features, and genuine skew or leakage risk. Otherwise share one computation library between paths and monitor feature distributions — most of the value for a fraction of the operational cost.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button