Skip to content

Part 8 · Blueprint 50

Feature Store Architecture for Real-Time ML (Feast / Tecton Scale)

15 min reading · Sources · Editorial review pending

A training join can leak information unavailable when the historical prediction was made.

More
20px
Reading list
Page details

Published date · Last edited:

Draft edition. Editorial review and supplementary reading recommendations are still being completed.

Format: Architecture walkthrough. Prerequisites: the beginner bootcamp. Chapter prerequisites: Time, Clocks & Distributed Ordering: Lamport to TrueTime, Change Data Capture (CDC) & Outbox Pipelines (Debezium Scale), Real-Time Stream Processing Engine (Apache Flink Internals).

Sixty-second mental model

Problem: A training join can leak information unavailable when the historical prediction was made.

Use: Separate event time, availability time and online freshness.

Design boundary: Keep training and online feature values consistent in meaning without leaking future data into historical examples. Event time, availability time and feature-definition version all matter.

Layer 1 · Intuition

Hypothetical scenario: Northwind is designing feature stores. Maya represents product requirements, Dev implementation and Priya reliability. The team must agree what one feature value means and which component owns the feature definition and observation time.

Think of a shared recipe for historical and current model inputs. Separate the requester from feature definition and observation time, then identify the retained evidence needed after failure.

Authority
The entitled state owner.
Invariant
A rule preserved across concurrency and failures.

Architecture and worked reasoning

Design boundary: Keep training and online feature values consistent in meaning without leaking future data into historical examples. Event time, availability time and feature-definition version all matter.

Responsibilities on the request path

Feature stores: responsibilities and request directionKeep training and online feature values consistent in meaning without leaking future data into historical examples. Event time, availability time and feature-definition version all matter.Source eventsFeature transformOffline historyOnline values
Keep training and online feature values consistent in meaning without leaking future data into historical examples. Event time, availability time and feature-definition version all matter.

Workload and limiting resource

Hypothetical 1,000,000 entities × 20 float32 features use 80 MB raw for one dense value vector/entity before keys, timestamps and replicas. Keeping 100 historical versions changes that raw component to 8 GB.

Keep the units attached to each intermediate result. The assumptions above describe a hypothetical exercise, not observed vendor capacity. A real capacity decision also needs a measured service curve, skew, recovery traffic and an explicit admission policy for overload.

Mutation or publication path

Feature stores: mutation boundaryVersion feature definitions and input evidence. Then: Compute event-time values with availability metadata. Then: Publish latest eligible online values and retain historical versions.Step 1
Version feature definitions and input evidence.
Step 2
Compute event-time values with availability metadata.
Step 3
Publish latest eligible online values and retain historical versions.
Version feature definitions and input evidence. Then: Compute event-time values with availability metadata. Then: Publish latest eligible online values and retain historical versions.
  1. Version feature definitions and input evidence.
  2. Compute event-time values with availability metadata.
  3. Publish latest eligible online values and retain historical versions.

Observation and recovery path

Feature stores: observation boundaryJoin training rows as of the prediction time. Then: Read online values under freshness/default rules. Then: Compare training/serving interpretation and missing-value handling.Step 1
Join training rows as of the prediction time.
Step 2
Read online values under freshness/default rules.
Step 3
Compare training/serving interpretation and missing-value handling.
Join training rows as of the prediction time. Then: Read online values under freshness/default rules. Then: Compare training/serving interpretation and missing-value handling.
  1. Join training rows as of the prediction time.
  2. Read online values under freshness/default rules.
  3. Compare training/serving interpretation and missing-value handling.

Failure that changes the decision

Hypothetical scenario: A historical training join uses a correction that became available after the target prediction. The model learns future information and offline quality becomes misleading.

Attempt this decision before reading the explanation

Does matching feature names guarantee training/serving equivalence?

No. Definitions, windows, cutoff times, availability and null/default semantics can differ under the same name. Version and evaluate those meanings explicitly.

Supporting mechanism analysis

Hypothetical scenario: Northwind. Maya represents product, Dev implementation and Priya reliability. The following workflow develops the underlying mechanism.

Hypothetical scenario. Northwind wants better supervision for its support-routing adapter. Maya sees a growing set of paraphrased requests, but Dev finds descendants of the same conversation in training and evaluation. Priya asks what independent behavior the reported improvement actually tests.

Start with a dataset specification, not a target row count. State the input that the deployed model will receive, the response behavior it should learn, the allowed evidence and the reasons to reject a candidate example. Include unknown and disputed labels explicitly. A pipeline that turns every uncertainty into a confident target silently changes the problem.

Before you continue: A generated paraphrase differs in wording from its training parent. May it enter the held-out set as independent evidence of generalization?

Different wording can preserve the same answer-bearing facts. String inequality does not make related examples independent, and the evaluation can reward familiarity with the parent source.

This preserves the intended split boundary. Choose conversation, source, customer or time grouping for the generalization question, then track descendants before generation and review their target suitability separately.

A row is a storage unit. It is not necessarily an independent observation. A conversation can have many turns, an incident can create multiple tickets, and a policy document can produce many generated questions. If those related rows cross partitions, an evaluation may reward remembering the underlying source.

Choose grouping keys appropriate to the intended generalization. Group by conversation when evaluating new conversations; by source document when evaluating new documents; by customer or time interval when those define the deployment change. There can be several useful evaluations with different boundaries. One split cannot answer all questions merely because it uses a familiar percentage.

Perform this assignment before paraphrasing or generating descendants. Children inherit the partition of their parent evidence. Deduplicating exact strings afterward is insufficient because a paraphrase can preserve the same answer-bearing facts. Keep parent identifiers and transformation history so the relationship remains inspectable even when the words differ.

Hypothetical scenario. Several synthetic questions are generated from one policy document. Randomly splitting those questions can put nearly identical evidence into training and test, overstating generalization. Choose the independent source group before expansion.

An example records original source revision, transformation, label/rubric and any generated teacher output. Synthetic supervision is a proposal requiring checks, not new independent ground truth. Corrections and deletion obligations need a path back through generated descendants. Keep contamination checks and held-out acceptance cases separate from the training objective, and document where source permissions permit the selected use.

For each example, retain source identity, the input presented to the model, the target, the label policy and relevant review state. For generated material, also retain the generator configuration and parent source. Store this information under appropriate access controls; provenance should not become a second uncontrolled copy of sensitive source data.

The label policy should distinguish evidence-derived facts from preferred response style. A target may be factually supported but too verbose, or concise but unsupported. Training these as one undifferentiated “good” label hides the correction required. Specify how disagreements are resolved and preserve unresolved cases outside the accepted training pool.

Hugging Face's dataset-card documentation provides a concrete documentation mechanism for a dataset's scope and use. Such a card helps communicate the record. It is not evidence that every row is correct or that a claimed restriction is actually enforced by the storage and training systems.

Hypothetical scenario. Begin with 1,200 source conversations. A selected review finds 100 conversations whose data may not be used for this training purpose and 100 without a supportable target. Assume these groups do not overlap. The eligible set is 1,200 − 100 − 100 = 1,000 conversations.

Assign these conversation groups before augmentation: 800 to training, 100 to validation and 100 to final testing. The sum is 800 + 100 + 100 = 1,000. Choose to generate two additional candidate demonstrations from each training conversation. There are 800 × 2 = 1,600 generated candidates, alongside 800 original training examples.

If a chosen review rejects 400 generated candidates, 1,600 − 400 = 1,200 remain. The training pool becomes 800 + 1,200 = 2,000 examples. The final test still represents 100 independent conversations, not 2,000. Generation enlarged the training representation, not the amount of independent held-out evidence.

Suppose a separate audit samples 100 accepted generated examples and finds 8 incorrect targets. The observed sample error fraction is 8 / 100 = 8%. It is not proof that precisely 8% of all 1,200 accepted generated examples are wrong. Sampling design, category coverage and uncertainty matter; the result is a reason to investigate the acceptance process rather than a license to extrapolate a precise count.

A model can propose alternative requests, candidate answers or difficult contrasts. Each operation has a different failure mode. A paraphrase can change the requested action; a generated answer can add an unsupported exception; a negative example can actually be a valid alternative. Evaluate the transformation against the source and the intended task.

Using the same generator to produce and approve every answer can reproduce its blind spots. Another model is not automatically an independent authority either. For facts, compare with the underlying authorized source. For executable constraints, use the relevant deterministic check. For subjective response quality, use a clear human-review policy and record disagreement rather than pretending the label is a measurement of truth.

Separate generation novelty from useful coverage. Many paraphrases of easy examples may teach surface variety without covering rare decisions. Select candidates for missing behaviors and failure categories. Do not claim synthetic data is intrinsically better or worse; its value depends on what was generated, what was filtered and how the resulting model performs on independent tasks.

The Self-Instruct paper describes generating instruction data and filtering candidates. It is a primary example of a generation-and-selection approach. Its existence does not establish that Northwind can copy its conclusions to different data, task requirements or source restrictions.

The useful mechanism is the separation between candidate production and acceptance. Northwind still needs a target policy, lineage and a held-out task. Treat the paper as a worked research approach, not as a guarantee that increasing generated row count improves a particular deployed assistant.

Layer 3 · Internals

A feature store must distinguish when an event happened from when its value became available to a prediction system. A training row for time T may use only information available under the declared historical rule at T. Joining the latest known customer balance to every old transaction can leak future information even though the SQL join is syntactically correct.

Feast's point-in-time joins reconstruct feature values relative to entity timestamps and freshness constraints. Online serving adds another contract: a materialized feature can be present but too old for the current task. Keep feature definitions, transformation versions and entity keys aligned across offline and online paths. Late correction of source data needs an explicit policy for historical retraining and live refresh. A feature vector's presence is not evidence that every field was computed under the same version. Missing-value handling and default values can change model behavior, so their version and monitoring belong beside the feature schema rather than in undocumented client code.

Trade-offs and limits

ApproachProvidesRequires
Point-in-time offline joinReconstructs the information allowed at prediction time.Historical availability and feature versions must be retained.
Latest-value online lookupServes current predictions with low retrieval work.Freshness, missing values and training-serving alignment remain separate obligations.

Recovery decision

Hypothetical scenario: A historical training join uses a correction that became available after the target prediction. The model learns future information and offline quality becomes misleading.

No. Definitions, windows, cutoff times, availability and null/default semantics can differ under the same name. Version and evaluate those meanings explicitly.

Write your design before revealing the review

Does matching feature names guarantee training/serving equivalence?

Evidence you can explain in your own design

Drafts and self-review are stored only in this browser. They are separate from reading completion.

Compare your decision

No. Definitions, windows, cutoff times, availability and null/default semantics can differ under the same name. Version and evaluate those meanings explicitly.

A historical training join uses a correction that became available after the target prediction. The model learns future information and offline quality becomes misleading.

Check your understanding

Does matching feature names guarantee training/serving equivalence?

No. Definitions, windows, cutoff times, availability and null/default semantics can differ under the same name. Version and evaluate those meanings explicitly.

How would you recover from this failure: A historical training join uses a correction that became available after the target prediction. The model learns future information and offline quality becomes misleading.

Start with the exact boundary that failed. Version feature definitions and input evidence. Compute event-time values with availability metadata. Publish latest eligible online values and retain historical versions. Then recover evidence through the observation path: Join training rows as of the prediction time. Read online values under freshness/default rules. Compare training/serving interpretation and missing-value handling. Preserve the distinction between a confirmed state change and an unavailable response.

Which assumption in the worked calculation would a burst or concentrated tenant invalidate first?

Hypothetical 1,000,000 entities × 20 float32 features use 80 MB raw for one dense value vector/entity before keys, timestamps and replicas. Keeping 100 historical versions changes that raw component to 8 GB. Recompute the affected resource rather than multiplying unrelated storage and network budgets by the same factor. Keep training and online feature values consistent in meaning without leaking future data into historical examples. Event time, availability time and feature-definition version all matter.

Which component in this topology could be removed from a smaller first deployment?

Source events, Feature transform, Offline history, Online values name responsibilities, not a requirement for separate processes. Co-locate responsibilities when their transaction, trust and capacity boundaries permit it. Version feature definitions and input evidence.

What evidence must a caller have before relying on the observation path?

Join training rows as of the prediction time. Read online values under freshness/default rules. Compare training/serving interpretation and missing-value handling. No. Definitions, windows, cutoff times, availability and null/default semantics can differ under the same name. Version and evaluate those meanings explicitly.

45-minute interview rubric

  1. 00–05: scope feature value and feature definition and observation time.
  2. 05–12: identify the limiting resource and derive the domain workload above, retaining units and assumptions.
  3. 12–28: draw feature definition and observation time, numbered writes and reads.
  4. 28–40: challenge recovery: Separate event time, availability time and online freshness.
  5. 40–45: defend entity_id placement, observations and remaining assumptions.

Go deeper

Decision log

Separate event time, availability time and online freshness.

Preserve feature value identity and feature definition and observation time ownership.

Revisit changed workload, observations or recovery objectives.