A feature store without leakage
One definition per feature, served offline for training and online for inference, with point-in-time joins that never peek at the future.
- Feast
- DuckDB / Parquet
- Redis
- Apache Airflow
- Great Expectations
Interactive demo
Join strategy
Drag a flag along the timeline to move its label · drag the background to orbit
Training rows this join produces
| Customer | Label | purchases_30d | Value from | Status |
|---|
The experiment
Same synthetic customers, same model (logistic regression on 3 features), two ways of building the training set. “Offline” is the validation score you would report; “production” is how the model actually scores when, at prediction time, only the past exists.
Point-in-time Latest value (naive)
Things to try
- Switch to “Latest value”: every join line that reaches past its flag turns red. Those rows teach the model what churn looks like after it already happened.
- Drag C-102’s flag left and right: the point-in-time join always picks the last bar strictly before it, never one after.
- Lower the TTL until C-104 loses its value: a stale feature becomes missing instead of silently pretending to be fresh.
- Run the experiment: the leaky model looks perfect offline and collapses to a coin flip in production. Nothing in the offline metrics warns you.
The problem
Most production models are worse than their notebooks because training used a value that did not exist yet at prediction time. A feature store exists to make that mistake impossible, and to stop five teams from computing “active users” five different ways.
How it works
- Features are declared once (source, entity, transformation, freshness) in a registry.
- The offline store keeps full history; training sets are built with point-in-time joins: for each label, the latest feature value strictly before the label’s timestamp.
- Materialisation jobs push the latest values to Redis for millisecond online reads.
- A consistency check compares online and offline values for the same entity and time.
What is real, what is simulated
Real
- The point-in-time join, the TTL rule and the leak detection in the timeline are the actual logic, running in your browser.
- The experiment really trains two logistic regressions on 2,800 rows and scores them on 1,200, computing AUC with the Mann–Whitney statistic.
Simulated in this demo
- Customers and their behaviour are synthetic, generated so that activity stops after churn, which is exactly what makes “latest value” leak.
- The registry entry is illustrative; no Feast server sits behind this page.
Not built yet
- Feast repository with offline (Parquet/DuckDB) and online (Redis) stores
- Materialisation job in Airflow
- Online/offline consistency check with Great Expectations