---
title: "Space efficient machine learning feature stores using probabilistic data structures - a benchmark"
description: "A Bloom-filter-backed in-process feature store matched a conventional key-value feature store's click-prediction accuracy (AUC ≈0.7997 vs ≈0.80) using about 3% of the memory (470MB vs 15GB)."
url: "https://swe.quest/articles/space-efficient-machine-learning-feature-stores-using-probabilistic-data-be147985e009951b"
canonical: "https://engineering.zalando.com/posts/2021/10/space-efficient-machine-learning-feature-stores-using-probabilistic-data-structures.html"
source: "Zalando Engineering"
published: "2021-10-04"
difficulty: "medium"
kind: "Research"
reading_minutes: 9
tags: ["ml-platform","data-structures","recommendation-systems","machine-learning"]
---

# Space efficient machine learning feature stores using probabilistic data structures - a benchmark

A post on [Zalando Engineering](https://swe.quest/sources/zalando.md), published 2021-10-04, 9 min read, Research. Original: [https://engineering.zalando.com/posts/2021/10/space-efficient-machine-learning-feature-stores-using-probabilistic-data-structures.html](https://engineering.zalando.com/posts/2021/10/space-efficient-machine-learning-feature-stores-using-probabilistic-data-structures.html)

## Summary

A Bloom-filter-backed in-process feature store matched a conventional key-value feature store's click-prediction accuracy (AUC ≈0.7997 vs ≈0.80) using about 3% of the memory (470MB vs 15GB). It kept 90% of the history uplift at roughly 40MB, with no measurable throughput cost. Features are stored as composite user^value keys and reconstructed by probing every possible value, so false positives inject tunable noise in exchange for space. The approach suits cases where an extra network call or many lookups per request are too expensive. It is not a drop-in replacement, though: you must know the full feature domain, high-volume real-time updates must hit every node, and deletions or expiry require rebuilding the filter from scratch.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [ML platforms](https://swe.quest/tags/ml-platform.md) (AI & ML)
- [Data structures](https://swe.quest/tags/data-structures.md) (Architecture & design)
- [Recommendations & ranking](https://swe.quest/tags/recommendation-systems.md) (AI & ML)
- [Machine learning](https://swe.quest/tags/machine-learning.md) (AI & ML)

## Prerequisites

- Bloom filters
- feature stores
- logistic regression
- ROC-AUC

## Keywords

Bloom filter, Redis, Age-partitioned Bloom Filters, HyperLogLog, Count-Min Sketch

## Related posts

- [Engineering stories behind the Medium Daily Digest Algorithm: Part 2](https://swe.quest/articles/engineering-stories-behind-the-medium-daily-digest-algorithm-part-2-d64641974e16e6ff.md): Medium Engineering · 2025-08-28 · Medium · 17 min read · Recommendations & ranking, Data structures, Cost optimization, Databases
  Medium replaced the Bloom filters behind its recommendation filters (muted writers, already-read, presented 3+ times) with per-user DynamoDB queries against the source-of-truth tables, cutting filtering cost roughly 10x and simplifying maintenance.
- [Bloom filters: the niche trick behind a 16× faster API](https://swe.quest/articles/bloom-filters-the-niche-trick-behind-a-16-faster-api-f8c936f8ee9c7bb2.md): incident.io · 2025-11-14 · Medium · 16 min read · PostgreSQL, Data structures, Performance engineering, API design
  incident.io cut P95 latency of its alert-filtering API for large organisations from 5s to 0.3s by pushing JSONB attribute filters into Postgres using bloom filters.
- [Modeling Machine Learning Data in OLAP databases](https://swe.quest/articles/modeling-machine-learning-data-in-olap-databases-0fad2c579add8f45.md): ClickHouse · 2024-08-08 · Medium · 26 min read · ML platforms, Analytics & OLAP, SQL, Data pipelines
  ClickHouse can act as the transformation engine and offline store of an ML feature store, with features modeled as timestamped tables and assembled into point-in-time correct training sets.
- [Why OpenAI chose ClickHouse for petabyte-scale observability](https://swe.quest/articles/why-openai-chose-clickhouse-for-petabyte-scale-observability-dd57167d0fc8c4cb.md): ClickHouse · 2025-06-30 · Medium · 6 min read · Observability, Performance engineering, Analytics & OLAP, Scaling, Data structures
  OpenAI ingests petabytes of logs daily, growing over 20% monthly, into a ClickHouse cluster of 90 shards with two replicas each, fed by Fluent Bit agents.
- [Announcing General Availability of ClickHouse Full-text Search](https://swe.quest/articles/announcing-general-availability-of-clickhouse-full-text-search-d53df0e10ad889b4.md): ClickHouse · 2026-03-10 · Medium · 13 min read · Search, Analytics & OLAP, Observability, Performance engineering
  ClickHouse Full-text Search is now generally available, implemented as a Lucene-style inverted index that maps tokens to row numbers using configurable tokenizers and preprocessors defined in SQL.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
