5.3.5 · D1MLOps & Deployment

Foundations — Feature stores

1,997 words9 min readBack to topic

The parent note throws a lot at you fast: entities, timestamps, , , , , TTL , , , offline vs online stores. This page slows down and earns every one of those symbols, in an order where each rests on the previous.


0. What is a "feature", really?

Figure — Feature stores

The whole topic is about keeping the numbers in these columns honest — the same in training as in serving, and never borrowed from the future. See Feature engineering for how these columns get built in the first place.


1. The entity and its key — WHO a row is about


2. Time — the symbol

Everything dangerous in feature stores is about time. So we need a symbol for it.

Figure — Feature stores

3. The comparison symbols — , ,

We also meet (" is after the event") — that's the forbidden set, the future readings we must throw away.


4. Sets and the "for all" symbol


5. Functions — and

Figure — Feature stores

6. The "argmax" symbol — the heart of the point-in-time join

This is the scariest-looking symbol in the parent note. It's actually simple.

Now read the parent's formula slowly:

Piece by piece:

  • — "find which index ...",
  • the little "" under it — "...but only look at observations at or before the event...",
  • on the right — "...and among those, pick the one with the largest time."
  • (star = "the winning one") — the index that wins. Then is that winner's value.

That's the entire point-in-time rule — see Data leakage for why step 1 is non-negotiable.


7. TTL and the symbol

Figure — Feature stores

8. Where the numbers physically live

Two symbols left: the two stores. These aren't math, they're places.


The prerequisite map

Feature = one number in a column

Entity and join key

Timestamps t_e and t_i

Comparisons less-or-equal

argmax = which one wins

Point-in-time join

TTL tau = max age

Functions f_off and f_on

Training-serving skew

Feature Store

Offline and online stores

Read it bottom-up: Feature Store sits on top of two pillars — the point-in-time join (built from time, comparisons, argmax, TTL) and the no-skew guarantee (built from the two functions) — plus the two physical stores.


Equipment checklist

Test yourself — cover the right side and answer:

What does a subscript like the in do?
It labels different copies of the same symbol apart — is the event time, the -th feature reading.
What does mean in plain words?
Feature reading happened at or before the event — i.e. it was already known, not from the future.
Difference between and ?
returns the biggest value; returns which input produced it.
In , what is the little "" doing?
Restricting the search to only observations at or before the event before we pick the latest.
What is and what does it add to the picture?
TTL, the maximum allowed age of a feature; it adds a second wall at , turning the "past" into a window.
Why are and written as two symbols?
They are two code paths (offline/bulk vs online/live) that must produce the same output; their disagreement is training-serving skew.
What does demand in ?
Equality for every possible input, not just tested ones.
Offline store vs online store in one line each?
Offline = huge slow warehouse of all history for training; online = tiny fast key-value drawer of latest values for serving.