Home / Blogs & Insights / Feature Stores for Production ML

Feature Stores for Production ML

Feature store architecture for production machine learning

Table of Contents

A feature store gives a feature one definition and serves it two ways: as history, for training, and as the latest value, for live predictions.

Models are trained on features and scored on features. The trouble is that those two moments usually happen in different systems. Training reads months of history from a warehouse in a batch job. Inference needs the current value for one customer in a few milliseconds, inside a request.

When each side computes features in its own code, the two drift apart. A feature store is the part of an ML platform that prevents this. Features are defined once, computed by managed pipelines, kept as history for training and kept current for serving, with the same meaning in both places.

Key takeaways
  • Define each feature once and generate both its historical and online values from that definition.
  • Build training sets with point-in-time joins, so no row sees data from after its prediction time.
  • Treat freshness as a requirement per feature, not a property of the platform.
  • Version feature definitions and record which versions each model expects.
  • A feature store earns its cost when features are shared or served online. Otherwise it may not.

A Worked Example: Meridian Retail's Fraud Features

Meridian Retail is the illustrative retailer used across this series. Its fraud model scores every card-not-present order at checkout within an 80 millisecond budget. The figures below are part of the scenario, not measurements from a real system. The model depends on five feature families:

  • Account age: days since the customer account was created.
  • Transaction velocity: orders and distinct cards used in the last hour and the last day.
  • Payment-method history: how long the payment method has been in use and its prior chargebacks.
  • Device risk: a score for the device and network the order comes from.
  • Recent refunds: refunds requested by the account in the last 30 days.

Originally, training jobs computed these in warehouse SQL, and the checkout service computed them again in application code. Two defects followed. Velocity in training counted orders by settlement time, while the service counted them by creation time, so live values ran consistently higher than anything the model had seen. And the refund feature in training included refunds recorded after each order, information the model could never have at checkout, which made offline results look better than live performance would ever be.

Moving these features into a feature store fixed both. Each feature got one definition keyed to event time. Training sets were built with point-in-time joins. The same definitions fed an online store that the checkout service reads by account, card and device ID in a single lookup.

Neither defect was in the model. Both were in how features were computed on each side of the deployment boundary.

What a Feature Store Is and Why It Exists

A feature is a measurable input to a model, such as order count in the last hour. A feature store is a system for defining, computing, storing and serving those inputs consistently across training and inference. It is not only a database. The value comes from the definitions and pipelines around the storage.

The problems it addresses

Consistency: the same feature means the same thing in training and in production. Correct history: training data reflects what was known at each prediction time. Serving: current values are available at low latency. Reuse: a feature built by one team can be found and trusted by another, instead of being rebuilt with slightly different logic.

What it usually contains

A registry of feature definitions and metadata, transformation pipelines, an offline store for history, an online store for current values and a serving interface. Implementations differ in which of these they manage directly and which they leave to existing data platforms.

Feature Engineering Without a Store

Without a shared layer, features live inside individual training notebooks and serving services. That works for the first model. It becomes expensive as models and teams multiply.

  • Duplicated logic: the same concept, such as customer tenure, is coded several times with small differences.
  • Two implementations per feature: one in SQL or Spark for training and one in application code for serving.
  • Hidden leakage: hand-written joins pick up data recorded after the prediction moment.
  • No discovery: nobody can find out which features already exist, who owns them or whether they are trusted.
  • Fragile handover: moving a model into production means re-implementing its features under deadline pressure.

None of these problems is visible in a model's code or its offline metrics. They show up as a model that performs worse live than it did in evaluation, which is one of the harder failures to diagnose.

Offline and Online Feature Stores

Most feature stores keep two representations of the same features, because training and serving make opposite demands on storage.

Typical characteristics. Exact latency and volume depend on the architecture and platform.

AreaOffline storeOnline store
Primary useTraining and batch scoringLow-latency inference
Data volumeLarge historical datasetsLatest feature values per key
LatencySeconds to minutes acceptableMilliseconds
Access patternAnalytical scans and joinsKey-value lookup by entity ID
Point-in-time historyEssentialUsually latest state only
Typical workloadsTraining sets, backfills, batch predictionsOnline predictions

The offline store is often a warehouse or lakehouse table that keeps every value with its timestamp. The online store is often a key-value database holding the most recent value per entity. SageMaker Feature Store, for example, documents an online store that keeps only the latest records and an append-only offline store in Amazon S3 that keeps the full history.

Not every system needs both. A demand forecast scored weekly in batch can read from the offline store alone. Meridian's fraud model needs both: history to train, and current values at checkout.

Training-Serving Skew

Training-serving skew is a difference between the features a model was trained on and the features it receives in production. The model artifact is unchanged, the code passes its tests, and prediction quality still degrades, because the inputs no longer mean what they meant during training.

Where skew comes from

Different implementations of the same logic. Different time bases, such as settlement time against creation time. Different handling of nulls, defaults and unseen categories. Different data sources, where training reads a cleaned warehouse table and serving reads a raw event stream. And stale values, where the online copy lags behind what training assumed.

  1. Share definitions A feature is defined once, and both offline and online values are produced from that definition.
  2. Keep transformations consistent The same transformation code, or code generated from one specification, runs in batch and serving paths.
  3. Version everything Feature definitions carry versions, and a model records which versions it was trained on.
  4. Join point-in-time Training sets are assembled as of each prediction time, so history matches what serving would have seen.
  5. Test parity Compare offline and online values for a sample of entities regularly, and alert when they diverge.

Parity checks belong in two places. Before release, the delivery pipeline can compare a candidate's training features against online values for the same entities, as part of the gates described in ML CI/CD and model deployment pipelines. After release, continuous comparison of serving inputs against training distributions is a monitoring task, covered in AI model monitoring in production.

Skew is not a model defect, so retraining will not fix it. The fix is one definition and a parity test.

Point-in-Time Correctness

A training row should contain only information that was available at the moment the prediction would have been made. Point-in-time correctness is the discipline of building training data that way. Without it, models learn from the future and then fail when the future is not available.

Leakage and event timestamps

Every feature value needs an event timestamp: when the fact became true or was recorded. Each training example has a prediction timestamp. A point-in-time join takes, for each example, the latest feature value with a timestamp at or before the prediction time, and nothing later. Meridian's refund feature leaked because refunds were joined by account alone, with no time condition.

Late-arriving data

Some facts are recorded after they happen. A chargeback may arrive weeks after the order. If the feature is keyed on when the event occurred, but serving can only see it once it is recorded, training will still be optimistic. Where late data is common, keep both timestamps. Feast, for example, documents an option to filter on a created timestamp so each row only sees values recorded at or before its own timestamp.

Backfills

When a new feature is added, its history has to be computed for past periods so models can be trained on it. A backfill must follow the same point-in-time rules, using only data that would have been available at each historical moment, not today's corrected records.

Point-in-time joins are expensive to write correctly by hand and easy to get subtly wrong. Having the feature store generate them is one of its most practical benefits. The Feast documentation on point-in-time joins is a clear description of the mechanics.

If a training row could not have been assembled at prediction time, the model is learning something it will never see live.

Batch, Streaming and On-Demand Features

Features differ in how quickly they change and how quickly the model needs to see the change. That decides how each one is computed.

Choose the cheapest computation that meets each feature's freshness need.

TypeComputedSuitsMeridian example
BatchOn a schedule from warehouse dataSlow-changing attributesAccount age, payment-method history
StreamingContinuously from event streamsValues that change within minutesTransaction velocity
On-demandAt request time from request dataValues that only exist in the requestOrder amount against account average

Mixing types is normal. A single fraud score may combine a batch account profile, a streaming velocity count and an on-demand comparison computed from the order itself. The feature store's job is to present them to the model under one set of definitions, whatever the computation path.

Feature Pipelines, Freshness and Validation

Feature pipelines compute feature values from source data and write them to the offline and online stores. Moving values from the offline store into the online store is often called materialization.

Freshness as a requirement

Freshness is the age of a feature value when it is read. Set a target per feature from how it is used: account age can be a day old, velocity cannot. Record freshness at read time, and decide what serving does when a value is older than its limit, such as using a default or flagging the prediction.

Validating features

Validate feature values before they are published: schema and type, null rates, value ranges and distribution against recent history. A broken upstream feed that writes zeros to the online store will change live decisions immediately, with no model change to review.

Feature pipelines are data pipelines, and they need the same orchestration, retries and alerting. The difference is the consumer. A late dashboard is an inconvenience. A late online feature changes decisions made about real customers.

Feature Versioning and Lineage

A change to a feature's logic creates a different feature, even if the name stays the same. Changing a definition in place silently changes the inputs of every model that uses it.

  • Version on change: a logic change produces a new version, and both run side by side until consumers move.
  • Pin versions per model: each model records the exact feature versions it was trained with.
  • Trace upstream: lineage links each feature to its sources and transformation code.
  • Trace downstream: lineage shows which models and services consume each feature.

Downstream lineage is what makes a change safe to plan. Before retiring or altering a feature, the owner can see every model that would be affected. On the model side, the version record belongs in the registry: model registry and experiment tracking explains how a model version records the feature definitions it expects, so rollback restores matching features as well as the model.

Discovery, Reuse and Ownership

Reuse is often the stated reason for a feature store, and it is the benefit most likely to fail without governance. A feature nobody can find or trust will be rebuilt.

  • Discoverable: features are searchable by name, entity, description and owner.
  • Described: each feature states its meaning, unit, time semantics, freshness target and known caveats.
  • Owned: a named team owns correctness, freshness and changes.
  • Lifecycle: features move from proposed to production to deprecated, with notice before removal.
  • Access-controlled: features derived from personal or sensitive data carry the same restrictions as their sources.

At Meridian, the risk team owns the device risk features and the payments team owns velocity. When the marketing team built a promotion-abuse model, it reused both instead of writing its own, and inherited their freshness targets and ownership along with them.

Serving Features in Production

Online feature retrieval sits on the prediction path, so its latency and availability become part of the model's. A slow feature lookup is a slow prediction.

  1. Batch the lookup Fetch all features for all entities in a request in one call rather than one call per feature.
  2. Budget latency Allocate a share of the end-to-end budget to feature retrieval and measure it separately.
  3. Define fallbacks Decide in advance what happens when a feature is missing or stale: a default, a simpler model or a rule.
  4. Log what was served Record the feature values used for each prediction, so decisions can be explained and training data can be built from real serving inputs.

Some platforms go further and let a deployed model look up its own features. Databricks, for example, documents automatic feature lookup at inference for models trained with its feature engineering tables. Either way, feature retrieval is a dependency like any other, and its latency and error rates belong in system telemetry, as described in AI observability for enterprise systems.

Feature Store Architecture

Implementations vary, but the moving parts are consistent. Reading an architecture as these six components makes platforms easier to compare.

  1. Sources Warehouse and lakehouse tables, event streams and operational databases.
  2. Definitions and registry Feature definitions as code, with entities, timestamps, owners and versions.
  3. Transformation Batch, streaming and on-demand pipelines that compute values from the definitions.
  4. Offline store Full timestamped history, used for point-in-time training sets and backfills.
  5. Online store Latest values per entity, kept current by materialization or streaming writes.
  6. Serving and retrieval An interface for historical retrieval to training jobs and low-latency retrieval to inference.

Platforms name these parts differently. Feast registers feature views as code and materializes them into an online store. SageMaker Feature Store organizes features into feature groups with a record identifier and event time. Google Cloud's Feature Store uses BigQuery as its offline source and registers feature groups and feature views. Databricks treats a Unity Catalog Delta table with a primary key as a feature table. See the SageMaker Feature Store documentation, Google Cloud's Feature Store overview and the Databricks feature engineering documentation for current details.

When You Do Not Need a Feature Store

A feature store adds infrastructure, pipelines and an ownership model. It pays off when features are shared or served online. Without those conditions, simpler options are often better.

  • Batch-only scoring: models scored in batch from the same warehouse they train on can use versioned tables and point-in-time SQL.
  • One model, one team: with no sharing, reuse and discovery add little.
  • Request-only inputs: if every feature comes from the request itself, there is nothing to store.
  • LLM applications: retrieval-augmented systems need fresh documents and embeddings more than tabular features. The differences are set out in MLOps vs LLMOps.

The disciplines still apply without the product. Point-in-time joins, one definition per feature and version pinning can be implemented with a warehouse and good conventions. Adopt a feature store when keeping those conventions by hand starts to cost more than the platform.

Choosing a Feature Store Approach

The choice is usually less about features on a comparison sheet and more about where data and models already live.

Start from the platform your data and models already use.

ApproachFits whenWatch for
Warehouse conventionsBatch scoring, few shared featuresHand-written point-in-time logic; no online serving
Open-source frameworkMixed infrastructure; need for portabilityYou operate the online store and pipelines
Cloud-managed serviceTraining and serving already on that cloudCoupling to one provider's serving and storage
Data-platform nativeFeatures built where data engineering already runsServing options tied to the platform

Whichever approach you choose, test it against your hardest feature, usually a streaming value with a tight freshness target that must also appear correctly in point-in-time history. A platform that handles that well will handle the rest.

Frequently Asked Questions

What is a feature store?

A feature store is a system for defining, computing, storing and serving machine learning features consistently. It keeps historical feature values for training and current values for live predictions, both produced from the same feature definitions.

Why do production ML systems use feature stores?

To keep features consistent between training and inference, to build training data without leakage, to serve current values at low latency and to let teams reuse trusted features instead of rebuilding them.

What is the difference between an offline and online feature store?

The offline store keeps the full timestamped history of feature values for training, backfills and batch scoring. The online store keeps the latest value per entity for low-latency lookup during live predictions.

What is training-serving skew?

Training-serving skew is a difference between the features a model was trained on and the features it receives in production, caused by different logic, time bases, data sources or staleness. Prediction quality drops even though the model itself has not changed.

What is point-in-time correctness?

It means each training example uses only feature values that were available at its prediction time. Point-in-time joins select the latest value at or before that timestamp, which prevents the model from learning from future information.

Do all ML systems need a feature store?

No. Batch-only models, single-team projects and systems whose inputs all arrive with the request can often use versioned warehouse tables and careful point-in-time SQL instead.

How does a feature store work with a model registry?

The feature store manages feature definitions and values. The model registry records which feature versions each model version was trained on, so deployment and rollback use matching features.

ABOUT THE AUTHOR

Anuj Yadav

Anuj Yadav is the CBO of SDLC Corp, leading business strategy across AI, blockchain, Web3, and digital innovation. He focuses on helping businesses plan and commercialize AI-led products, including generative AI and machine learning, while aligning technology with market fit, implementation, and growth.
PLAN YOUR SOLUTION

More Insights
You Might Find Useful

Explore expert perspectives, practical strategies, and real-world solutions related to this topic.

Experiment runs feeding a versioned model registry, approval, production environments and archive

Model Registry and Experiment Tracking for Production ML

How experiment tracking and a model registry record how models
ML CI/CD and model deployment pipeline

ML CI/CD and Model Deployment Pipelines

ML CI/CD is the set of pipelines that move a

Data pipeline monitoring and observability signals with downstream impact

Data Pipeline Monitoring and Observability

Pipeline observability is the ability to tell, without being told

Let’s Talk About Your Product

Get expert guidance on scope, architecture, timelines, and delivery approach so you can move forward with confidence.

What happens next?