Skip to main content

The Recommendation Problem

Recommendation looks like supervised learning and behaves nothing like it. The data is almost entirely missing, the missingness is not random, the output is a ranked list rather than a prediction, and the model's own outputs determine what data you collect next.

Key idea

The userโ€“item matrix is typically 99 %+ empty, and the empty cells are not missing at random โ€” people watch what they were shown. Recommendation is a ranking problem under feedback loops, not a regression problem on ratings.

A sparse user-item rating matrix with most cells marked unknown, and a factorisation of it into a user factor matrix times an item factor matrix
The task in one picture: most of the matrix is unobserved, and the goal is to fill it. Factorisation does that by learning a small number of latent factors per user and per item from the cells you do have.

Why it is not ordinary supervised learningโ€‹

Ordinary supervisedRecommendation
Data densityEvery row has a label99โ€“99.9 % of cells empty
MissingnessUsually ignorableInformative โ€” you only rate what you saw
OutputOne predictionA ranked list of k items
MetricAccuracy, RMSENDCG, recall@k, and business metrics
FeedbackStatic datasetThe model shapes its own future data
New rowsFineCold start โ€” new users and items have no history

Explicit and implicit feedbackโ€‹

Explicit โ€” a rating the user deliberately gave. Unambiguous but extremely rare; most users never rate anything, and those who do are unrepresentative.

Implicit โ€” clicks, watches, purchases, dwell time. Abundant, and how essentially all production systems work. But it carries a catch:

Implicit feedback has no negatives

A user who did not click an item may have disliked it โ€” or never seen it. Absence of interaction is not evidence of dislike, but the naive framing treats every unobserved cell as a zero.

This is why implicit-feedback models use confidence-weighted objectives (weight observed interactions highly, unobserved ones weakly) or sample negatives explicitly, rather than treating the matrix as a complete label set.

The sparsity numbersโ€‹

A mid-sized service: 1 million users, 100,000 items, 50 million interactions.

density=5ร—107106ร—105=0.05%\text{density} = \frac{5 \times 10^7}{10^6 \times 10^5} = 0.05\%

99.95 % of the matrix is unknown. Any method that requires the full matrix in memory is out โ€” the matrix has 101110^{11} cells โ€” and any method needing dense per-user data will fail for the long tail of users with three interactions.

The two-stage architectureโ€‹

A three-stage pipeline narrowing from millions of candidates through scoring to a re-ranked final list of about ten items
No production system scores a whole catalogue per request. Cheap approximate retrieval cuts millions to hundreds; an expensive model ranks those; a final pass applies diversity and business rules. The latency budget is what forces this shape.
StageScaleModel
Candidate generationmillions โ†’ ~1,000Cheap: approximate nearest neighbour over embeddings, co-occurrence, popularity
Ranking~1,000 โ†’ ~100Expensive: gradient boosting or a deep model with rich features
Re-ranking~100 โ†’ ~10Diversity, freshness, business rules, de-duplication

Recall matters at stage one โ€” an item not retrieved can never be recommended, whatever the ranker would have done with it. Precision matters at stage two.

Cold startโ€‹

CaseProblemMitigations
New userNo history to match onPopularity, onboarding survey, demographics, contextual bandits
New itemNobody has interacted with itContent features, forced exploration
New systemNeitherContent-based only until interactions accumulate

Cold start is not an edge case. On a catalogue with constant new arrivals โ€” news, marketplaces, short video โ€” most of the inventory is always cold, and a pure collaborative-filtering system structurally cannot surface any of it. That is the main practical argument for hybrid models.

Feedback loopsโ€‹

A recommender trains on data generated by its own previous recommendations. Items it showed get interactions; items it did not show get none, and so look unpopular, and so are shown even less.

The consequences compound:

  • Popularity bias. Popular items are recommended more, become more popular, and crowd out the tail.
  • Filter bubbles. Narrow user profiles get narrower.
  • Offline metrics become self-congratulatory. A model evaluated on logged data is rewarded for agreeing with the model that produced the logs.

Mitigations are all forms of deliberate exploration: ฮต-greedy or bandit-based slots, inverse-propensity weighting when training on logged data, and explicit diversity terms in re-ranking. None is free โ€” exploration costs short-term engagement to buy long-term data quality, and that trade is a product decision.

Beyond accuracyโ€‹

A recommender that maximises predicted rating alone tends to be a bad product. The dimensions that matter alongside accuracy:

PropertyQuestion
CoverageWhat fraction of the catalogue ever gets recommended?
DiversityAre the k items different from each other?
NoveltyAre they things the user would not have found alone?
SerendipityAre they surprising and liked?
FairnessDo item providers get equitable exposure?

Recommending the ten most popular items to everyone scores respectably on accuracy metrics and is a useless product. This is why the field moved from RMSE to ranking metrics, and then to online experiments โ€” covered in Evaluating Recommenders.

See alsoโ€‹