Problem
Recommendation models rely on sparse categorical features such as user and item IDs. Their number keeps growing, and popular IDs occur millions of times while rare ones occur a handful of times. Frameworks keep embeddings in a fixed-size variable, so teams hash IDs into a smaller space, and collisions grow with the table. Training and serving are also separate: a user's latest reaction reaches the model only after the next batch retrain, while interests drift within minutes.
Example from the article: a production model with about 1000 embedding tables and an original ID space of was shrunk with a hashing trick and scored lower online AUC than the collisionless version.
Solution in brief
Monolith keeps sparse parameters in its own cuckoo-hash table with no collisions, filters rare IDs and expires inactive ones. Training continues after deployment: a stream joiner builds examples from live actions, and only embeddings touched in the last minute are copied to serving. Snapshots of the parameter servers are taken once a day.
Questions this case answers
- How to keep a high-cardinality sparse-feature model current under concept drift when batch retraining and serving are separated
- How to represent an unbounded, growing set of categorical IDs in embeddings without collisions and within a fixed memory budget
- How to keep a production ranking model fresh when user interests drift by the minute?
- How to store embeddings for millions of growing user and item IDs without hash collisions or running out of memory?
Tools and methods
- Collisionless HashTable (cuckoo hashing) — one embedding per ID, as a native TensorFlow operation.
- Occurrence filter and ID expiry — keep memory bounded.
- Online training — Kafka queues, a Flink joiner and a training parameter server (PS) that feeds the serving PS.
- Negative sampling with log odds correction — handles rare positives.
- DeepFM — the model used in the public-data experiments.
Google or a one-time email code. No password.