Hard system-design machine-learning

How does a new item get useful embeddings before it has any behaviour?

The 30 second answer

Content features such as title, category and price give a new product a vector on day one, but behaviour usually predicts purchases better once it exists. I give the model an input such as item age or purchase count, so it can rely on content when history is thin and on behaviour as it grows. Training data must contain items at every age, which feature logging provides.

Content versus behaviour. Content features, through a product tower or an inductive graph model, make an embedding available at listing time. But in many problems that look content-driven, behaviour matters more: what shoppers buy together predicts the next purchase better than titles do, and in video what people enjoy is rarely just the topic. Behaviour has a hard cold start, so content has to carry new items until behaviour takes over.

Making the handoff smooth.

  1. Give the model a signal of how much history to expect, such as the item's age or purchase count, so it can learn to lean on content when that number is small and on behaviour as it grows.
  2. Train on examples across the whole age range. A common mistake is building training data from today's catalog features: most products are old, so the model rarely sees what a product looked like in its first days.

Feature logging. Record each item's features as they were when it was shown. Training then sees snapshots at every age, including the first hours, and avoids leaking later popularity into earlier examples.

Pulling the page together. Start from the business objective that defines close, name the method and its training data, start from a baseline, say how you will measure it, and name the serving constraints: size, versions and freshness.

Sources (2)
  1. Hamilton et al., GraphSAGE (embeddings for unseen nodes from features)
  2. Yi et al., Sampling-Bias-Corrected Neural Modeling (two-tower item features)