Kinds of learning
Ranking, Scoring, and Structured Prediction
Explore supervised tasks where relative order, multiple linked decisions, or structured outputs matter more than independent class predictions.
By the end you can
- Distinguish ranking and structured prediction from ordinary classification
- Explain why local prediction quality may not produce a coherent final output
- Identify position bias and incomplete feedback in ranking data
- Choose evaluation evidence that reflects the output structure
Example
A search page is not a stack of unrelated classifications
A search system must decide which candidates appear and where they appear. In the European Union those decisions are a legal object as well as an engineering one. The Platform-to-Business Regulation, Regulation (EU) 2019/1150, has applied since 12 July 2020. It defines 'ranking' as the relative prominence given to goods or services, and Article 5(1) says what a platform owes the businesses it ranks: “Providers of online intermediation services shall set out in their terms and conditions the main parameters determining ranking and the reasons for the relative importance of those main parameters as opposed to other parameters.” Article 5(3) adds disclosure wherever remuneration can influence ranking. The Commission issued ranking transparency guidelines on 7 December 2020.
The disclosures exist. Booking.com's own published description of how it works names click-through rate, gross bookings and net bookings as its ranking areas. It also states that commission paid, payment speed and programme membership can influence an accommodation's ranking. The rules layer around a ranking model is not a rumour about search systems. Here it is written down twice: once in a statute, once in a platform's own terms.
- Candidate eligibility determines which documents can enter the competition.
- A relevance score estimates usefulness for a particular query and user context.
- Ranking orders candidates relative to one another rather than judging them independently.
- Business or safety rules may remove, pin, diversify, or demote certain results — Booking.com names commission paid, payment speed and programme membership among the things that can influence an accommodation's ranking.
- Clicks provide feedback only for items that were shown, often at biased positions.
- Success may depend on the whole page, not the score of one document.
Comparison
Four output structures with different constraints
Not every target behaves alike. Two of them can both be called “prediction” and still need very different learning and evaluation logic.
Scoring assigns a numeric value to each item independently, then a threshold converts it to action — a fraud risk score is the familiar case. It is useful for prioritization and blind to competition among items. Ranking produces an ordered list for a context: relative order is central, top positions carry more value, and exposure creates biased feedback. Sequence labeling predicts linked labels along an ordered input, so neighbouring outputs affect coherence, errors propagate, and evaluation can be token- or span-level. A set or assignment output chooses a collection under global constraints, where capacity and exclusivity matter, independent scores can conflict, and optimization follows prediction.
Scoring looks like the mildest of the four. It carries the largest documented failure in this lesson. A commercial risk-scoring tool is applied to roughly 200 million people in the United States each year. It auto-enrolled patients above the 97th percentile of its score and referred those above the 55th percentile to a physician. It had been trained to predict health-care cost rather than illness. At the 97th-percentile threshold, Black patients carried 26.3% more chronic conditions than White patients — 4.8 against 3.8. Obermeyer and three colleagues put the size of the correction in one line of their abstract, in Science on 25 October 2019: “Remedying this disparity would increase the percentage of Black patients receiving additional help from 17.7 to 46.5%.” On the day the paper appeared, New York's Department of Financial Services and Department of Health wrote to UnitedHealth Group about the Optum 'Impact Pro' algorithm.
No step of that pipeline was exotic. A score was produced, two cut-offs were applied, and the choice of what the score predicted decided who got help.
Scoring
Assign a numeric value to each item independently.
- Useful for prioritization
- May ignore competition among items
- Thresholds convert score to action
- Example: fraud risk score
Ranking
Produce an ordered list for a context.
- Relative order is central
- Top positions carry more value
- Exposure creates biased feedback
- Example: search results
Sequence labeling
Predict linked labels along an ordered input.
- Neighboring outputs influence coherence
- Errors may propagate through a sequence
- Evaluation can be token- or span-level
- Example: entities in a sentence
Set or assignment output
Choose a collection under global constraints.
- Capacity and exclusivity may matter
- Independent scores can conflict
- Optimization may follow prediction
- Example: assigning jobs to workers
Why relative quality changes the learning problem
In ranking, the question is usually whether a useful item appears above a less useful one. A pointwise classifier can help without settling that. The final metric may emphasize order near the top.
That is measurable on a public benchmark. The TREC 2019 Deep Learning Track, run by NIST with Microsoft and UCL, evaluated ranking on the MS MARCO collections. The document task held 3.2 million documents with 367 thousand training queries. The track's overview paper describes the other one: “The passage retrieval task has a corpus of 8.8 million passages with 503 thousand training queries, for which we generate a reusable test set of 43 queries.” 15 groups submitted 75 runs, judged blind against reusable test sets of 43 queries each. The MS MARCO dataset underneath, published by Microsoft in 2016, holds 1,010,916 anonymized questions sampled from Bing query logs and 8,841,823 passages extracted from 3,563,535 web documents.
Hold those two numbers together: 8.8 million passages to learn from, 43 queries to be judged on. The judgments are expensive because a human has to read the top of each returned list. The top of the list is where the metric lives. Training scale is not evaluation scale, and the thing being scored is an order, not a pile of independent decisions.
Structured tasks add dependencies or constraints among outputs. Predict each component separately and you can produce impossible sequences, duplicate assignments, or combinations that violate policy.
Visual
How exposure shapes ranking feedback
A ranking system influences which outcomes it later observes. Policy and data form a closed loop. A first-stage retriever limits what can be ranked at all. The model then scores and orders those candidates according to learned and rule-based signals. The rendered positions allocate exposure, and higher positions receive more attention regardless of intrinsic relevance. Clicks, dwell time, purchases and skips are recorded selectively, only for what was shown. The next model trains on that record. It may amplify the patterns the previous ranking created.
1. Retrieve candidates
A first-stage system limits what can be ranked.
2. Score and order
The model places candidates according to learned and rule-based signals.
3. Allocate exposure
Higher positions receive more attention regardless of intrinsic relevance.
4. Observe behavior
Clicks, dwell time, purchases, or skips are recorded selectively.
5. Retrain or adjust
The next model may amplify patterns created by the previous ranking.
Key idea
Observed preference is confounded with exposure
An item cannot be clicked if the system never displays it. Items near the top may receive attention because of position, not because they are better.
Training directly on clicks can therefore reward the existing policy. Randomized exploration, counterfactual methods, or carefully designed interventions may be needed to separate relevance from exposure.
Interaction logs show behavior under a policy, not an unbiased census of preference.
Case
Swap the top two search results and users still click the top one
The size of that confound was measured in 2005. Joachims and four colleagues ran ten search tasks and reported that “we recruited 34 participants, all of which were undergraduate students … at Cornell University”, and that “comprehensive eye movement data was recorded for 29 of the subjects”. The abstracts ranked first and second were looked at with almost equal frequency. The first was clicked substantially more often.
In a second phase a proxy server silently swapped the top two results before the page was drawn. None of the 22 participants suspected any manipulation. The swapped pair still drew 64 clicks on position one against 36 on position two. With the whole list reversed, the average rank of a clicked document moved from 2.66 to 4.03, and clicks per query fell from 0.80 to 0.64. Users do respond to quality. They respond to position first.
Analogy
Editing a concert program
Arranging a concert program is not the same as filling one. Choosing good pieces individually does not guarantee a satisfying sequence; contrast, pacing, duration, and audience expectations affect the whole experience.
Ranking and structured prediction resemble this global coordination. A programmer chooses freely. No such freedom reaches a learned system, which infers from logged data, where earlier programs already shaped what audiences could hear.
The quality of a list can depend on relationships among its elements.
Steps
Specify the output before choosing the learner
Write the output contract first. A precise one prevents a ranking or structured task from collapsing into vague scoring. Name the unit — the query, sequence, session, batch, or assignment context. State the constraints: exclusivity, capacity, order, coverage, safety. Trace the feedback, identifying which outputs receive labels or interaction evidence and why. Choose the objective, deciding whether pointwise accuracy, pairwise order, or whole-list quality matters. Then evaluate the structure: top positions, complete spans, feasible assignments, important slices.
What a loose contract costs has been measured on a benchmark in use since 2003. In 2019 six authors re-checked the CoNLL-2003 English named entity recognition test set and reported the damage: “In the end, we have corrected label mistakes in 186 sentences, which is about 5.38% of the test set.” State-of-the-art F1 at the time was around 93%. A second team re-annotated the same test set independently in 2024, correcting 457 token labels plus 63 sentence-boundary repairs. Models scored far higher on the cleaned set: XLM-R FLERT rose from 93.64 to 95.98 F1, and LUKE from 94.44 to 97.10.
Part of that reported distance was disagreement about where a span begins and what it is — the output contract — rather than model quality. A benchmark that has been scored for two decades can still be arguing with itself about its own labels.
1. Name the unit
Define the query, sequence, session, batch, or assignment context.
2. State constraints
List exclusivity, capacity, order, coverage, and safety requirements.
3. Trace feedback
Identify which outputs receive labels or interaction evidence and why.
4. Choose the objective
Decide whether pointwise accuracy, pairwise order, or whole-list quality matters.
5. Evaluate the structure
Measure top positions, complete spans, feasible assignments, and important slices.
Prediction and optimization may be separate stages
A learned model may estimate relevance, duration, risk, or compatibility, while a downstream optimizer assembles the final list or assignment. The separation can make constraints explicit and simplify auditing.
The US residency match runs that separation at national scale. Applicants and programs submit rank order lists — the preference stage. Then one algorithm produces a stable assignment subject to constraints such as couples matching to paired positions. In the 2025 Main Residency Match, 52,498 applicants registered against 43,237 certified positions. The National Resident Matching Program published the outcome on 21 March 2025: “Of the 43,237 training positions offered, 94.3 percent (40,764) filled when the matching algorithm was processed.” Roth and Peranson redesigned the algorithm in use in 1999, precisely because the earlier one could be manipulated and could not handle complementarities such as couples. The couples constraint is stated in the algorithm, not learned from data. That is why it can be examined at all.
Do not credit the model alone for system behavior. Candidate generation, business rules, optimization, and interface design can dominate the observed result.
Case
€2.42 billion: what the European Commission priced a demotion at
What a demotion is worth has been established on a competition file. On 27 June 2017 the European Commission fined Google €2,424,495,000, with Alphabet jointly and severally liable for €523,518,000. Across 13 countries of the European Economic Area, the Commission found, rival comparison-shopping services appeared as ordinary blue links exposed to Google’s generic ranking algorithms. Google’s own service was shown in a box at the top, and was not subject to those demotions.
The mechanism was exemption from demotion. The Commission's own decision summary says so: “In relation to its positioning, the Decision explains that Google's service is positioned prominently and not subject to the dedicated algorithms that make competing comparison shopping services prone to having their ranking reduced in Google's general search pages.” The Commission also recorded that “even the most highly ranked rival service appears on average only on page four of Google’s search results”. Traffic to Google’s comparison-shopping service rose 45-fold in the United Kingdom and 35-fold in Germany. Certain rival sites suffered sudden traffic drops of 85% in the United Kingdom and up to 92% in Germany. The Court of Justice dismissed Google and Alphabet's appeal on 10 September 2024, closing the file.
None of those numbers measure a ranking model. They measure the rules around it — which candidates a demotion algorithm applies to, and which it does not.
Key idea
Offline relevance does not settle whole-page value
A ranker can improve pairwise relevance while making the first page repetitive, fragile, or commercially distorted. Candidate generation and post-ranking rules can erase the model’s apparent gain as well.
Reported gains often do not survive a tuned baseline either. Ferrari Dacrema and two colleagues took 18 neural top-n recommendation algorithms published at top conferences and tried to reproduce them; the study won best long paper at RecSys in 2019. Only 7 came back with reasonable effort, and 6 of those 7 were outperformed by simple nearest-neighbour or graph-based heuristics. Rendle and three colleagues at Google revisited the Neural Collaborative Filtering experiments the following year. Their abstract opens with the result: “First, we show that with a proper hyperparameter selection, a simple dot product substantially outperforms the proposed learned similarities.” They also found the MLPs too costly for production retrieval. The learned component was both worse and more expensive than the arithmetic it replaced.
Evaluate the rendered list under realistic traffic, position, diversity, latency, and policy constraints. Component success is not page success.
A ranking metric is evidence about one stage, not a verdict on the user experience.
Key takeaways
- Ranking concerns relative order, while scoring may assess items independently — and a threshold on an independent score decides outcomes: 97th percentile for auto-enrolment, 55th for referral, over roughly 200 million people a year.
- Structured outputs contain dependencies or constraints that local predictions can violate. A loose output contract left label mistakes in 186 sentences, about 5.38% of the CoNLL-2003 English test set.
- Candidate generation and downstream optimization are part of the system, not invisible plumbing. The European Commission priced one demotion rule at €2,424,495,000.
- Clicks and other interactions are observed under an exposure policy and can contain position bias: after a silent swap of the top two results, position one still drew 64 clicks against 36.
- Evaluation should reflect top positions, complete structures, feasibility, and whole-output utility. TREC 2019 judged 8.8 million passages of training data on reusable test sets of 43 queries.
- A predictive model and a constrained decision optimizer can be separate, auditable components, as in the 2025 match where 94.3 percent (40,764) of 43,237 positions filled when the algorithm was processed.