Problem
A recommender team wants to bring a transformer into production. Papers and open-source code mostly show a one-stage selector trained with random negatives. In an industrial multi-stage system it must instead rank a few thousand candidates and feed a meta-model, and there it often adds nothing. Extra inference time also hurts latency, and slow apps lose users.
Example from the article: VK shipped a transformer into Dzen's ranking stage. On top of an ensemble of existing features it gave +2.5% Timespent and +2.7% Like in an A/B test.
Solution in brief
Take plain SASRec and change the task to match ranking. Predict only the last item, rank shown items with a pairwise loss on explicit feedback, add negative actions to the input, and build items from content features. Validate with a global time cutoff plus a lag, and serve user embeddings from a storage so requests never wait for the model.
Questions this case answers
- How to make a sequential transformer add value as one feature in a multi-stage ranking pipeline, where it must rank thousands of candidates and feed a meta-model
- How to validate a sequential model offline without leaking future interactions and serve it without adding latency to each request
- How to make a sequential transformer improve a production ranking model, not only candidate selection
- How to validate a recommendation transformer offline without leaking the future
Tools and methods
- SASRec — baseline sequential transformer with late fusion (output is the user embedding)
- Pairwise ranking loss (PairLogit) — trains the model to separate like from click, ignore and dislike
- Inductive item tower — item embedding built from title, image and content features
- Time-based validation — global cutoff, train-test lag, user-level lag, session-level pairs
- Embedding storage — precomputed user embeddings read by the backend as a feature
- Quantization and h-swish — CPU speedups for inference
Google or a one-time email code. No password.