XGBoost Ranker
Not every part of a recommender benefits from a neural network. Once retrieval hands over a few hundred candidates described by dense, hand-built features, a gradient-boosted tree ensemble is frequently the strongest ranker available — and the fastest to train.
Ranking objectives on top of boosting
XGBoost's ranking mode trains the usual additive ensemble of decision trees, but on a loss defined over a query group rather than over individual rows. In recommendation the group is one user request together with its candidate items. The objectives available are pairwise, which penalises inverted pairs, and NDCG- or MAP-weighted variants, which scale each pair's gradient by how much swapping it would move the metric — the LambdaMART idea, implemented inside the booster. Training data must be sorted by group and accompanied by group sizes, or the loss degenerates quietly into pointwise regression.
Why it survives
Trees handle heterogeneous tabular features — counts, ratios, recency, price, even a two-tower score passed in as a feature — with no scaling and no embedding layer, and they tolerate missing values natively. For a few hundred rows per request, inference costs microseconds, which fits a tight latency budget comfortably.
Its limits
It cannot learn representations: high-cardinality ids must arrive pre-encoded, as target-encoded columns or embeddings from another model. It scores each item independently, so list-level properties like diversification need a separate re-ranking pass. And it trains on logged impressions, so position bias enters as a feature-shaped artefact unless the data is corrected with propensity weights.
An XGBoost ranker is a gradient-boosted decision-tree ensemble trained with a ranking objective — pairwise, or NDCG- and MAP-weighted in the LambdaMART style — over query groups, where each group is one request and its candidate items. It is a standard choice for the ranking stage on dense tabular features: accurate, cheap to score, and robust without feature scaling. It learns no representations, so item and user ids must arrive pre-encoded.
Think of a shortlist of twenty flats and an estate agent who has learned, from thousands of past viewings, how to put them in the order you are most likely to like. They did not build the shortlist — someone else did that — they just order it well.
An XGBoost ranker plays that role in a recommendation system. After a first pass has narrowed millions of options down to a few hundred, this part decides the order you actually see. It works by combining thousands of simple yes-or-no questions about each option — how recent, how popular, how close to your past choices — into one confident ranking.