Lightweight Representation Learning For Efficient And Scalable Recommendation

Olivier Koch6 Jan 2022

Problem

A web-scale recommender at Criteo has to serve billions of users and hundreds of millions of items. It must answer within a few milliseconds for banner display. Users come and go far faster than the catalog changes, so per-user parameters need constant recomputation. Feedback is mixed: abundant views and sales, scarcer clicks. The old engine, built on logistic regression and collaborative filtering, was due for a rebuild.

Example from the article: in 2019 a Criteo team replaced the engine with LED, which has run in production since.

Solution in brief

LED (Lightweight Encoder-Decoder) keeps one embedding and one bias per item and no per-user parameters. A user vector is the plain average of the embeddings of items in the user's timeline. Item embeddings are pre-trained by randomized SVD on view events, then tuned with a sampled ranking loss on click events. Recommendations come from approximate nearest-neighbor search.

Questions this case answers
  • How to build a candidate-generation model whose parameter count does not grow with the number of users and whose inference stays under a few milliseconds
  • How to exploit abundant weak feedback signals to pre-train item representations for a model evaluated on a scarcer strong signal
  • How to build a recommender that serves billions of users and hundreds of millions of items within a few milliseconds?
  • How to avoid retraining a recommender every time the user base changes?

Tools and methods

  • Randomized SVD on a PMI matrix (Spark-RSVD) — pre-train item embeddings from view events at scale
  • Amortized inference (average of item embeddings) — user representation without per-user parameters
  • Sampled ranking losses (BPR, negative sampling, Complementarity Sum Sampling) — train without a cost linear in the number of items
  • Approximate nearest-neighbor search (HNSWlib, per the paper) — retrieve top-k items in roughly logarithmic time
  • DeepR — Criteo's open-source TensorFlow library for training the model
Continue reading — it's free

Google or a one-time email code. No password.