Notes

Top-N Recommendation

Nobody opens a streaming service to learn that a film is predicted 3.8 stars. They want a short list worth looking at. Top-N recommendation is the formulation that takes that literally.

What the task is
The system scores items the user has not interacted with, sorts them, and returns the best N — typically five to fifty, whatever a shelf or a page holds. Only the ordering inside that cut matters; the absolute scores are instrumental. Three consequences follow:

  • Training uses implicit feedback and ranking objectives — BPR, pairwise and listwise losses, sampled softmax — not squared error against a rating.
  • Evaluation uses rank-sensitive metrics: Recall@k, Precision@k, NDCG, MAP and hit rate.
  • Serving splits into retrieval then ranking, because sorting a million-item catalogue per request is not affordable.

Why it matters
Rating prediction optimises an error the reader never sees. A model can cut RMSE by predicting the middle of the scale more accurately while the head of its list gets no better — and the head is the only part a user experiences. Top-N also exposes the hard parts: unseen items vastly outnumber seen ones, and an unobserved pair is ambiguous between disliked and never shown.

The budget of N
With only N slots, relevance is not the only objective — a list of ten near-identical items scores well and reads badly, which is why diversity, novelty and re-ranking live in this formulation rather than in rating prediction.

Top-N recommendation frames the task as returning a short ranked list of items the user has not seen, rather than predicting a rating for a given item. Only the order within the cut matters, so models are trained with ranking objectives on implicit feedback and judged by Recall@k, NDCG and MAP. It is the formulation production systems actually serve, and the reason retrieval and ranking are separate stages.

When a friend recommends films, they do not hand you a scored list of everything in existence. They name three.

Top-N recommendation is software doing the same thing: out of a catalogue of millions, pick the handful worth putting in front of you, in a sensible order. The N is just how many fit — ten on a shelf, five in an email. It sounds obvious, but it changes what counts as success. Getting the exact star rating right for an obscure item is worthless if the few things at the top of your screen are wrong. Only the top of the list is ever seen, so only the top of the list is judged.