Skip to content

Feature Stores Explained: What Problem They Solve

One central feature store feeding both a historical training store and a fast online store.

A feature store is a system for defining, storing and serving the inputs that machine learning models use. It exists to solve a specific, common problem: the features a model was trained on are not always computed the same way as the features it sees in production.

The problem it solves

A data scientist builds a feature in a notebook, such as a customer’s average order value over the last 30 days. Later, an engineer rewrites that logic for the live system. If the two versions differ even slightly, the model receives inputs in production that do not match what it learned from, and its accuracy falls without any obvious error. This mismatch is called training-serving skew, and it is one of the most frustrating bugs in applied machine learning.

What a feature store does

A feature store keeps each feature’s definition in one place and uses that single definition to produce the values for both training and serving. Teams get a shared catalog of features, so a feature built for one model can be reused by another instead of being rebuilt. If you are still deciding what features to build, start with feature engineering vs feature selection.

Offline and online stores

Most feature stores have two parts. The offline store holds historical feature values, often in a warehouse or data lake, and is used to build training datasets. The online store holds the latest values in a fast lookup system, so a live application can fetch a customer’s features in milliseconds. The same definitions feed both, which is how the store keeps training and serving consistent. Whether your predictions need that live path at all is the question in batch vs real-time inference, and how fresh the feature data must be ties to batch vs streaming processing.

Point-in-time correctness

When building a training set, each row must use only feature values that were known at the time of that example, not values computed later. Joining the latest feature value to an old label quietly gives the model information from the future. A good feature store handles these point-in-time joins for you, which protects against a form of data leakage that is easy to introduce by hand.

Monitoring and lineage

Because features are defined centrally, you can monitor them centrally too: check that their distributions have not shifted, which is the early warning described in model drift. You can also trace which models depend on which feature, an application of data lineage.

When you do not need one

A feature store adds infrastructure to run and concepts to learn. If you have one or two models, a small team, and features that are simple to compute in the same way in training and production, a shared code module and a well-tested pipeline may be enough. A feature store pays off when several models share features, when training-serving skew keeps appearing, or when low-latency lookups are required. Open-source options such as Feast exist, and managed feature stores are offered by the major cloud and data platforms, so compare them against your needs instead of defaulting to one.

A quick checklist

  1. Is each feature computed by exactly one definition for both training and serving?
  2. Do your training sets use point-in-time correct values?
  3. Do you actually need low-latency online lookups?
  4. Are several models reusing the same features?
  5. Is a shared, tested code module enough for your current scale?

If you want help setting up the pipelines and monitoring around your models, see my machine learning and MLOps service.

FAQ

What is a feature store in machine learning?
It is a system that defines, stores and serves model input features from one shared definition, so training and production use the same values.

What is training-serving skew?
It is a mismatch between how features are computed in training and in production, which makes a model perform worse live than its offline tests suggested.

Do I need a feature store for every ML project?
No. For small projects with few models and simple features, a shared, well-tested code module is often enough.

Related posts

Leave a comment

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