Learning to Rank: Point, Pair, List
Getting the order right, not just the scores.
The Three LTR Paradigms
POINTWISE PAIRWISE LISTWISE
Score each item in isolation Compare pairs of items Optimize full list
Item A -> Score 0.8 Item A vs Item B [Item A, Item B, Item C]
Item B -> Score 0.4 Loss: P(A > B) Loss: ΔNDCG / Permutation
| Approach | Input Instance | Loss Function | Key Algorithms | Pros & Cons |
|---|---|---|---|---|
| Pointwise | Single Item | Regression (MSE) / Binary Cross-Entropy | Logistic Regression, GBDT | Fast, standard ML loss. Con: Ignores relative list context. |
| Pairwise | Pair of Items | Pairwise Cross-Entropy / Margin Loss | RankNet, LambdaMART, BPR | Focuses on correct ordering. Con: pairs per query. |
| Listwise | Full Item List | Cross-Entropy over Permutations / SoftNDCG | ListNet, SoftRank, LambdaLoss | Directly optimizes NDCG/MRR. Con: Computationally complex. |
Pairwise Loss & RankNet
For a pair of items and where item is known to be more relevant than item ():
If model scores , loss is low. If , loss penalizes the wrong pairwise ordering.
LambdaMART: The Industry Workhorse
Directly optimizing NDCG is impossible because sorting operations yield step functions with zero derivatives.
LambdaMART Innovation (Burges, 2010):
- Compute pairwise gradient for items .
- Multiply by (the exact change in NDCG if item and swapped positions):
If swapping items and causes a huge drop in NDCG (e.g. swapping rank 1 and rank 50), scales up dramatically, forcing gradient boosting trees to fix top-of-list errors.
Say this out loud
"Learning to Rank optimizes item list order for queries across Pointwise, Pairwise, and Listwise approaches. Pointwise scores items independently; Pairwise optimizes relative order between item pairs; Listwise optimizes the full list metric. LambdaMART is the industry standard—it scales pairwise gradients by ΔNDCG, penalizing mis-orderings at the top of search result lists."
Follow-ups to expect
- What is Bayesian Personalized Ranking (BPR)? A popular pairwise ranking loss for implicit feedback in RecSys: , where item is an interacted item and item is an unobserved negative item.
- How do search engines compute features for LTR? Features combine Query features (length, intent), Item features (quality score, page age), and Query-Item interaction features (BM25 score, TF-IDF, embedding cosine similarity, historical click rate).
Check yourself
Why is Pointwise ranking (predicting standalone CTR per item using Binary Cross-Entropy) sub-optimal for search ranking?