AnyLearn
All lessons
AIintermediate

Ranking and Objectives: What Should the Model Optimise?

The ranker is a prediction machine, and the hard question is what it should predict. Clicks are plentiful and poisonous, watch time bends toward length, likes are rare and unrepresentative. This lesson covers implicit feedback, the position bias baked into every training log, multi-objective ranking, and calibration.

Updated · AI-authored, review-gated · how lessons are made

Not signed in: your progress and quiz score won't be saved.
Progress1 / 7

The ranker's actual job description

The ranking stage receives a few hundred candidates and must order them. Under the hood, orderings come from predictions: for each candidate, the model estimates the probability or magnitude of some user response, and the list is sorted by a function of those estimates.

That sentence hides the entire difficulty in two words: some response. Which response?

  • Predict clicks, and the system learns to prize whatever gets clicked, including regret-clicks on sensational packaging.
  • Predict completion, and short items win a structural advantage.
  • Predict watch or listen time, and length gets rewarded independent of quality.
  • Predict explicit likes, and you optimise for the tiny, unusual minority who presses buttons.

Key idea: the objective is not a technical detail; it is the product's values, executed at scale, millions of times a day. Every recommender heuristic you have ever disliked, clickbait rising, feeds full of one topic, is usually not a model failing its objective but a model succeeding at an objective that was chosen badly.

So before any architecture: what signal is worth predicting, and what does each signal secretly reward? That is this lesson.

Full lesson text

All 7 steps on one page, for reading, reference, and search.

Show

1. The ranker's actual job description

The ranking stage receives a few hundred candidates and must order them. Under the hood, orderings come from predictions: for each candidate, the model estimates the probability or magnitude of some user response, and the list is sorted by a function of those estimates.

That sentence hides the entire difficulty in two words: some response. Which response?

  • Predict clicks, and the system learns to prize whatever gets clicked, including regret-clicks on sensational packaging.
  • Predict completion, and short items win a structural advantage.
  • Predict watch or listen time, and length gets rewarded independent of quality.
  • Predict explicit likes, and you optimise for the tiny, unusual minority who presses buttons.

Key idea: the objective is not a technical detail; it is the product's values, executed at scale, millions of times a day. Every recommender heuristic you have ever disliked, clickbait rising, feeds full of one topic, is usually not a model failing its objective but a model succeeding at an objective that was chosen badly.

So before any architecture: what signal is worth predicting, and what does each signal secretly reward? That is this lesson.

2. Implicit feedback: abundant, and never neutral

Recommenders train almost entirely on implicit feedback, behaviour observed in passing, because explicit feedback is scarce: most users never rate, and the ones who do are systematically unusual.

The menu, with each signal's built-in slant:

SignalVolumeWhat it secretly rewards
Click / play startEnormousPackaging: thumbnails, titles, curiosity gaps
Dwell / watch timeEnormousLength, and content that is hard to stop
Completion rateLargeBrevity; punishes long-form structurally
Skip / abandonLargeA genuine negative, but entangled with mood and context
Like, share, followSmallThe expressive minority's tastes
Return next daySmall, slowClosest to real value, hardest to attribute to one item

Two structural facts about this table run the field. First, every signal is a proxy: the thing you want, the user was glad this was recommended, is unobservable, and each proxy diverges from it somewhere specific. Second, the divergences are exploitable, and models find the exploits reliably: optimise clicks hard enough and the catalogue's suppliers learn to manufacture clickability, an ecosystem response no offline evaluation predicts.

The craft is therefore not finding the one true signal, it does not exist, but combining proxies so their failure modes partially cancel, which is where multi-objective ranking comes from.

3. The log is not the truth: position bias in training data

Before any objective can be optimised, there is a problem with the training data itself, and it is the same demon that haunts search evaluation: the log records what users did with what they were shown, and what they were shown was chosen by the previous model.

Position bias is the sharpest form. Items placed at the top get seen and clicked more, regardless of quality; items below the fold barely get examined at all. A model trained naively on this log learns two things at once, what users like, and what the old system used to rank highly, inseparably blended. The second part is pure contamination: it teaches the new model to imitate the old one's placements, including its mistakes.

Predict first

An item was shown 1,000 times at position 1 with 50 clicks; another was shown 1,000 times at position 8 with 20 clicks. Which item do users actually prefer?

4. Multi-objective ranking: the weighted peace treaty

Production rankers predict several responses at once, a multi-task model with one head per signal, and combine the predictions into a single ranking score:

s(u,i)=jwjy^j(u,i)s(u, i) = \sum_{j} w_j \cdot \hat{y}_j(u, i)

where each head's prediction, click probability, expected watch time, like probability, skip probability with a negative weight, is scaled by a weight expressing how much the product values that outcome.

Two honest facts about the weights. First, they are a product decision wearing a mathematical costume: the vector of weights is the executive answer to "what do we want more of", and no gradient descent chooses it for you. Teams tune weights through online experiments, watching not one metric but the whole dashboard, because raising the click weight moves watch time, complaints, and creator behaviour all at once.

Second, the combination is where the proxy failures get their partial cancellation: watch time's length bias is checked by completion's brevity bias; click's packaging bias is checked by the skip head punishing fast regret. The weights are less a formula than a system of checks, and reading a company's ranking weights, where they have been published or leaked, reads like reading its values, which is exactly what they are.

In practice: expect the score function to also include hand-built terms no model predicted, freshness boosts, quality floors from human review, creator-diversity bonuses, because some product values have no behavioural signal to learn from.

5. Short-term signals, long-term product

The deepest objective problem is temporal. Every signal in the table is measured within minutes of the recommendation; the outcomes the business actually cares about, retention, subscription renewal, the user's sense that the product respects their time, unfold over months and cannot be attributed to a single ranked item.

The tension is not hypothetical. Optimising short-term engagement can degrade the long-term outcome through mechanisms that are well understood qualitatively: sensational content that wins the click and erodes trust; binge patterns that maximise tonight's minutes and tomorrow's uninstall; monocultures that deepen engagement per session while narrowing the reasons to return.

What serious teams do about a gap that cannot be closed directly:

  • Guardrail experiments: ranking changes ship behind long-running holdbacks, small user groups kept on the old system for months, so retention effects invisible in a two-week test have somewhere to show up.
  • Long-horizon proxies in the objective: heads that predict return-tomorrow or session-after-this-one, weak signals, but pointed at the right target.
  • Constraint-based formulations: maximise engagement subject to floors on diversity, freshness, or quality metrics, encoding as constraints what cannot be learned as objectives.
  • Periodic value audits: reading the top of the funnel, what actually got recommended this week, against stated product values, because the aggregate dashboard hides composition.

None of this is fully solved, and the honest position is the useful one: the objective function is a permanent negotiation, not a settled artefact, and the teams that treat it as finished are the ones whose products drift somewhere nobody chose.

6. Calibration: when the probabilities have to be real

One technical property becomes load-bearing the moment scores are combined or thresholded: calibration. A model is calibrated when its predicted probabilities match observed frequencies, among items given a 10 percent click probability, about 10 percent actually get clicked.

Ranking alone does not need it: any monotone distortion of the scores produces the same order. But the multi-objective sum does need it, because the weighted combination adds predictions from different heads, and if the click head runs systematically hot while the watch-time head runs cold, the weights stop meaning what the product team thinks they mean: the effective policy silently differs from the intended one. Ads systems need it even more desperately, since predicted click probability multiplies directly into auction prices.

Miscalibration creeps in through routine causes: training on down-sampled negatives, distribution shift between training and serving, and the feedback data itself moving as the ranking changes. The standard hygiene: measure calibration continuously per head, segment by the slices that matter, new items versus established, head versus tail users, and re-calibrate with simple post-hoc maps, Platt scaling or isotonic regression, rather than retraining the world.

It is unglamorous machinery, but it is the difference between a weighted objective that encodes the product's chosen trade-offs and one that encodes them plus a hidden, drifting error term.

7. A worked objective review

Close the lesson the way a real team closes a quarter: by interrogating a live objective. A video platform ranks with 0.3 times click probability, plus 0.6 times predicted watch minutes, capped per item, plus 0.4 times like probability, minus 0.5 times early-skip probability.

What is this objective buying, and where will it leak?

The heavy watch-time weight, even capped, tilts toward longer items; the cap limits single-item domination but does nothing across the session, so bingeable series content still compounds. The click term is small, sensible, packaging bias is real, but combined with the skip penalty it creates a specific incentive: content that is clicked and held, which mostly means strong openings; expect creators to discover this within months and front-load accordingly. The like term quietly over-serves the expressive minority's tastes to everyone. Nothing in the sum values diversity, freshness, or return probability: those must live in constraints and retrieval mix, or they live nowhere.

That analysis, objective to incentives to predictable ecosystem response, is the transferable skill, and it needs no access to the model: published weights, or even observed behaviour, support the same reading.

One loose end remains, and it is the biggest one. This whole lesson trained on logs of what the system previously chose to show, and treated that as given. What happens when today's model decides tomorrow's training data, in a loop, is the final lesson: feedback loops, and the exploration that keeps a recommender from eating its own tail.

Check your understanding

The lesson ends with a 5-question quiz. Take it in the player above to see your score.

  1. Why do recommenders train on implicit rather than explicit feedback?
    • Implicit signals are more accurate expressions of preference
    • Explicit ratings are too expensive to store
    • Explicit feedback is scarce and comes from a systematically unusual minority, while behaviour is abundant
    • Privacy law forbids using ratings
  2. What does optimising pure watch time secretly reward?
    • Item length, independent of quality
    • Strong thumbnails
    • Short-form content
    • Content the expressive minority likes
  3. Item A: 1,000 impressions at position 1, 50 clicks. Item B: 1,000 impressions at position 8, 20 clicks. Why can't the log alone say which users prefer?
    • The sample sizes are too small
    • Clicks compare exposure as much as preference: position 1 receives several times the attention, so B's per-attention appeal may be higher
    • Click counts are unreliable below position 5
    • Preference requires explicit ratings
  4. Why does a multi-objective ranking score require calibrated prediction heads?
    • Uncalibrated models cannot be trained jointly
    • Ranking order is undefined for uncalibrated scores
    • Calibration reduces serving latency
    • The weighted sum adds probabilities from different heads, so a systematically hot head silently changes the effective policy away from the intended weights
  5. Why do teams keep long-running holdback groups on the old ranking system?
    • To reduce serving costs on a fraction of traffic
    • Because retention-scale effects of ranking changes are invisible in two-week experiments and need months to surface
    • To satisfy audit requirements
    • To train the old model as a baseline for distillation

Related lessons

AI
intermediate

The Two-Stage Machine: Why No Model Ranks the Whole Catalogue

A recommender has milliseconds to pick ten items from millions, and no model good enough to rank them all is cheap enough to run on them all. The industry's answer is a funnel: cheap candidate generation cuts millions to hundreds, an expensive ranker orders those hundreds. This lesson builds that architecture, its latency arithmetic, and the multi-source retrieval layer real systems run.

7 steps·~11 min
AI
intermediate

Feedback Loops: The Model Trains on Clicks It Caused

A deployed recommender chooses its own future training data: it shows items, users respond to what was shown, and those responses become the next model's ground truth. This lesson maps the loop's consequences, exposure bias, popularity compounding, narrowing candidate pools, explains why offline metrics reward imitation of the loop, and covers the exploration budget that keeps the system learning.

7 steps·~11 min
Math
intermediate

Gradients, Jacobians, and Hessians: Calculus in Many Dimensions

One derivative becomes three objects once a function has many inputs and many outputs. This lesson builds the gradient, the Jacobian and the Hessian, shows what each one actually tells you, and explains why curvature decides how many steps an optimiser needs and why nobody ever writes the Hessian down.

10 steps·~15 min
Math
intermediate

The Derivative Is a Local Linear Model

Machine learning uses the derivative as a search strategy, not a symbolic exercise. This lesson builds it as the best local linear approximation, derives the gradient descent update from it, and shows why estimating derivatives numerically loses half your digits and costs one function evaluation per parameter.

10 steps·~15 min