← Lessons

quiz vs the machine

Gold1450

Machine Learning

The Learning to Rank

Pointwise, pairwise, and listwise ways to teach a model to order.

6 min read · core · beat Gold to climb

Ranking is not regression

Ordering items is different from predicting a single number. Learning to rank methods optimize the relative order of items, and they come in three families that differ in what unit of data the loss looks at.

Pointwise

  • Treats each item independently, predicting a score or relevance label.
  • Loss is per item, like squared error or cross entropy.
  • Simple and scalable, but it ignores that ranking only cares about order, not exact scores.

Pairwise

  • Looks at pairs of items and learns which should rank higher.
  • Loss penalizes pairs that are ordered wrongly, as in RankNet.
  • Captures relative preference directly, but treats all misordered pairs as equally costly.

Listwise

  • Considers the whole ranked list at once.
  • Optimizes a list level objective, often a smooth surrogate for a ranking metric, as in ListNet or LambdaMART style approaches.
  • Aligns best with metrics like normalized discounted cumulative gain, but is more complex to train.

Choosing a family

Pointwise is a fast baseline. Pairwise improves order sensitivity cheaply. Listwise squeezes out the most metric aligned gains when the ranking quality justifies the added complexity.

Key idea

Learning to rank optimizes order, with pointwise, pairwise, and listwise losses trading simplicity for ever tighter alignment to ranking metrics.

Check yourself

Answer to earn rating on the learn ladder.

1. What does a pairwise learning to rank loss focus on?

2. Which family aligns most directly with metrics like NDCG?

3. Why is pointwise ranking considered a limited but useful baseline?