Recommendation Engine
Recommender systems: retrieval, ranking, YouTube, Meta's DLRM and HSTU, ByteDance's Monolith, feedback bias and experiments.
A recommender system chooses products, articles or offers for a user and a context. The Answerwell tool builds its own two-stage models and trains them on the platform’s interactions. Published research from large platforms provides architectural grounds; transferring their components needs validation on a different catalog and audience.
Architecture
Section titled “Architecture”Events → user and item features → candidate retrieval → ranking → constraints and diversity → display → feedback. The first stage quickly narrows an enormous catalog, the second uses a more expensive model. Item availability, language and other hard conditions are checked independently of the predicted interest.
| Stage | Model type | Main risk |
|---|---|---|
| Retrieval | Two towers, a graph, a sequential model | A useful item never reaches the candidates |
| Ranking | Multi-task neural network | Optimizing an incomplete objective |
| Re-ranking | Constraints and diversity | Monotony or violated conditions |
| Updating | Batch or streaming training | Lag and feedback loops |
The mathematics of retrieval and training
Section titled “The mathematics of retrieval and training”A simplified candidate model:
are the representations of the context and the item; is the catalog. On a large catalog, training uses approximations and negative sampling. The formula describes a class of models, not the single function used by every platform.
For binary tasks, the multi-task loss is:
is the task, the prediction, the label and the training weight. Watch time needs a different target model. A loss weight is not the same as a coefficient in the final ranking. An illustrative utility function may combine expected satisfaction, margin and risk, but its parameters belong to the specific implementation.
YouTube: published research
Section titled “YouTube: published research”In 2016 Covington, Adams and Sargin described YouTube’s neural candidate generation and separate ranking [1]. The work shows how history and context are turned into a user representation and how richer features are used at the next stage. It documents the system of its time and does not disclose the full 2026 stack.
In 2019 Zhao and colleagues studied multi-task ranking of the next video, including joint modelling of several objectives and the bias of training observations [2]. This explains why CTR is not enough to judge usefulness. Home, Watch Next and short videos have different selection conditions; results from one surface are not transferred without confirmation.
The practical conclusion for our own engine: measure candidate recall first, then the quality of each predicted action and the trade-offs of the overall objective. Otherwise an improvement in the ranker can stay invisible because the right item never made it through the first stage.
Meta: DLRM and HSTU
Section titled “Meta: DLRM and HSTU”DLRM combines embeddings of categorical features, processing of numerical features and explicit interactions [3]. In a large system, table memory, the distribution of rare categories and communication between accelerators matter as much as the number of neural network layers. Copying the architecture without matching data does not reproduce the quality.
The 2024 paper by Zhai and colleagues, Actions Speak Louder than Words, frames recommendation as sequential modelling and introduces HSTU [4]. The authors study scaling on streams of interactions. “Generative” here refers to modelling a sequence, not necessarily to creating text or images.
DLRM and HSTU are different published directions. They do not prove that the whole Facebook Feed, Reels or the ad auction currently uses one particular open implementation. Social connections, history and content may take part in different stages with coefficients unknown to an outside researcher.
ByteDance: Monolith and the limits of transfer
Section titled “ByteDance: Monolith and the limits of transfer”Liu and colleagues described Monolith: real-time training, a collisionless embedding table for identifiers, feature life-cycle management and fault tolerance [5]. The publication explicitly mentions its use in BytePlus Recommend. It does not certify that the open code is identical to today’s TikTok For You.
Streaming training shortens the delay between an action and a model update. It still needs consistent features, control of erroneous events and the ability to reproduce an earlier version. Avoiding collisions solves a specific problem of the parameter table, not every problem of representing interests.
TikTok’s official description of For You lists interactions, video information and settings as groups of signals [6]. It does not publish exact weights. Douyin, international TikTok, LIVE and shopping recommendations are separate products; research on one is not evidence of deployment in another. Unverified 2026 news is not used here as established fact.
Log bias and counterfactual evaluation
Section titled “Log bias and counterfactual evaluation”The items shown were chosen by the previous policy; whether anyone would have clicked an item that was never shown is unknown. With correctly known probabilities and sufficient coverage, inverse propensity scoring evaluates a different policy [7]:
is the context, the action, the outcome, the logging policy and the new policy. Small probabilities produce large variance. For an external platform is usually unknown, so such a calculation must not be presented as a completed unbiased estimate.
Protocol and limitations
Section titled “Protocol and limitations”Training and validation are split by time, and new users and items are evaluated separately. A popularity baseline, retrieval and the final list are compared on Recall, NDCG, calibration, diversity and latency. In our own A/B test, the useful action and the guardrail metrics are fixed in advance: returns, complaints, errors and long-term retention.
For example, 8% more clicks together with more returns does not prove an improvement. A high offline NDCG on historical impressions may also just reflect the previous policy. The final assessment must show which objectives improved, which got worse and for which audience. Reproducing individual components is a testable engineering task; a claim to have fully recovered closed weights needs a different kind of evidence.
Reproducibility and how Answerwell applies it
Section titled “Reproducibility and how Answerwell applies it”In the project’s research loop, Answerwell’s own robots and ML/DL models are applied to brand data. The grounds for each architecture, corpus versions, training parameters and compute are recorded according to the general methodology. Public, acquired and internal data each keep their own provenance; describing a method does not mean a proven match with the closed weights of an external platform.
The test set is separated from training by time and by object. Raw observations, failed attempts and unknown values are kept. Models are compared on the same data and budget, with the sample size and errors by segment reported. Illustrative calculations in this article are not a claim about an experiment Answerwell has carried out.
Sources
Section titled “Sources”- Paul Covington, Jay Adams, Emre Sargin. Deep Neural Networks for YouTube Recommendations, 2016. Google Research.
- Zhe Zhao et al. Recommending What Video to Watch Next, 2019. Google Research.
- Maxim Naumov et al. Deep Learning Recommendation Model, 2019. DLRM.
- Jiaqi Zhai et al. Actions Speak Louder than Words, 2024. HSTU.
- Zhuoran Liu et al. Monolith, 2022. Architecture.
- TikTok. How TikTok recommends videos #ForYou, 2020. Platform description.
- Thorsten Joachims, Adith Swaminathan, Tobias Schnabel. Unbiased Learning-to-Rank with Biased Feedback, 2017. Paper.