Deep Ranking Models

By Ludovico Bessi, Senior ML Engineer at Google Β· Updated

A deep ranking model scores a few hundred retrieved candidates by combining user, item and context features in one network, usually predicting probabilities such as click or watch. Modern rankers descend from Wide & Deep and DLRM: embedding tables for sparse features, an interaction layer, and MLPs, trained on billions of logged impressions.

The Ranking Problem

The ranker receives a few hundred candidates and must order them as precisely as possible for one user in one context. Unlike retrieval, it can look at user and item features together β€” every layer can combine them β€” and it can afford tens of milliseconds and large models. The output is usually one or more probabilities (click, watch, like, share) that are combined into a final score.

A Brief Evolution

Logistic regression with crossed features

Early large-scale rankers (ads and feeds in the early 2010s) were logistic regression over millions of sparse features, including hand-crafted cross features such as user_country Γ— item_language. They were fast, interpretable and easy to train online, but every interaction had to be designed by hand.

Gradient-boosted trees + logistic regression

Facebook's 2014 ads paper combined gradient-boosted decision trees (to learn feature transformations and interactions) with logistic regression on top. Trees capture non-linear interactions automatically but handle very high-cardinality IDs poorly.

Embeddings + MLPs

The deep learning turn replaced hand-crafted crosses with embeddings for sparse IDs (users, items, creators, categories) and multi-layer perceptrons over the concatenated embeddings and dense features. This is the basis of every modern ranker.

Canonical Architectures

Wide & Deep (Google, 2016)

Two parts trained jointly:

  • A wide linear model over raw and crossed sparse features, good at memorizing specific co-occurrences.
  • A deep MLP over embeddings, good at generalizing to unseen combinations.

Used for Google Play app recommendations. The idea that memorization and generalization need different components shaped most later designs.

YouTube's ranking network (2016)

A deep network over hundreds of features scoring each candidate, trained with weighted logistic regression: positive (clicked) impressions weighted by watch time, so the model's odds approximate expected watch time. This let one model rank by watch time without a separate regression.

DeepFM, DCN and DCN-V2

These replace the hand-built wide part with learned interaction layers (see Feature Interactions & Engineering):

  • DeepFM adds a factorization-machine component that models all pairwise embedding interactions.
  • DCN (Deep & Cross Network) adds cross layers that explicitly compute bounded-degree feature crosses; DCN-V2 makes cross layers more expressive with full weight matrices (and a low-rank mixture variant for efficiency).

DLRM (Meta, 2019)

Meta's Deep Learning Recommendation Model formalized the common structure:

sparse features β†’ embedding tables ┐
                                   β”œβ†’ pairwise dot-product interactions β†’ top MLP β†’ prediction
dense features  β†’ bottom MLP β”€β”€β”€β”€β”€β”€β”˜

DLRM highlighted the systems challenge: embedding tables can hold billions of rows and terabytes of parameters, while the MLPs are comparatively small. Training needs model parallelism for embeddings and data parallelism for MLPs (see Training at Scale).

Features That Matter

Architecture matters, but in practice feature quality usually matters more:

  • User features: demographics, long-term interest embeddings, recent history (the most important; see User Behavior Modeling).
  • Item features: ID embedding, content embeddings, creator, age, quality signals.
  • Engagement statistics: item click rates, completion rates, by segment and time window.
  • User–item features: has the user engaged with this creator or category before, how recently, how much.
  • Context: time, device, surface, position, network speed.
  • Retrieval features: which source produced the candidate, its retrieval score.

Training Details That Make a Difference

  • Labels: choose labels that reflect value (long watches, not just clicks); use several via multi-task learning (see Multi-Objective Optimization).
  • Negatives: impressions that were shown but not engaged are the natural negatives. Unshown candidates are not reliable negatives.
  • Freshness: retrain frequently or continuously; item statistics and trends change hourly.
  • Calibration: keep predicted probabilities matched to observed rates, especially when scores are combined. Down-sampling negatives during training requires a correction at serving time.
  • Position bias: items at the top get engaged more regardless of quality; model it explicitly (see Bias & Debiasing).

Serving the Ranker

  • Batching candidates: score all candidates for a request in one batched forward pass.
  • Feature fetching: often the real latency bottleneck; user features are fetched once per request, item features in bulk from caches.
  • Model size vs. latency: embedding lookups dominate memory; MLP and interaction layers dominate compute. GPUs make larger interaction layers and sequence models affordable.
  • Cascades: a lightweight pre-ranker in front of the heavy ranker keeps cost bounded.

Where Ranking Is Going

  • Sequence-heavy rankers that use transformers over thousands of past actions.
  • Scaling laws for rankers: recent work (for example Meta's HSTU and Wukong) shows recommendation quality can keep improving with model compute, which was not true of classic DLRM-style models.
  • LLM-based rankers for text-heavy domains like search and jobs, with distillation into small cross-encoders for serving.

Key Takeaways

  1. Rankers score user–item pairs jointly with rich features and can afford much larger models than retrieval.
  2. The lineage runs from logistic regression with crosses, to GBDT+LR, to embeddings + MLPs.
  3. Wide & Deep, DeepFM, DCN-V2 and DLRM are the canonical architectures; DLRM made embedding tables the central systems problem.
  4. Features, labels, freshness and calibration often matter more than architecture.
  5. Modern rankers add long sequence modeling and are starting to show scaling-law behavior.