Problem
A marketplace builds personal recommendations with a classic two-tower model (DSSM, Deep Structured Semantic Model): one tower encodes the user ID, the other the product ID. The model is tied to IDs, so a new product or user forces retraining. Training from scratch needs a lot of interaction data, which not every platform has. Adding product text is costly: a transformer text network would have to run at inference next to the main model, which is not feasible for millions of users.
Example from the article: a supplier adds a new product to the Wildberries catalog, and an ID-based model has no vector for it until retraining.
Solution in brief
Replace the ID towers with one pretrained text encoder (Sentence Transformer). Users, purchase histories and products are written as text and embedded in one space. Candidates come from cosine search in a vector database, so new products and users need no retraining. Per-user deduplication and noise in numeric user features stop the model from memorizing past purchases.
Questions this case answers
- How to build a candidate generator for personal recommendations that covers new items and new users without retraining, from limited interaction data
- How to replace ID-based embeddings with text-based embeddings in a two-tower retrieval model so that inference stays affordable for millions of users
- How to build a two-tower candidate generator that works for new products and new users without retraining
- How to generate recommendations with limited interaction data using a pretrained text encoder
Tools and methods
- Two-tower retrieval (DSSM) — the baseline the talk modifies
- Sentence Transformer — BERT-like pretrained encoder, fine-tuned on recommendation data
- Margin loss on users and on baskets — the two parts of the training loss
- Vector database with cosine search — candidate retrieval at inference
- Text descriptions of users and products — replace the IDs
- Per-user deduplication and noise augmentation — data preparation
Google or a one-time email code. No password.
