Recommender systems
Interaction Logs, Exposure, and Missing-Not-at-Random Data
Learn why recommendation logs reflect prior exposure policies and how to preserve impressions, positions, eligibility, and propensities.
By the end you can
- Explain why implicit recommendation logs are missing-not-at-random
- Distinguish positive, exposed-but-unselected, and unexposed examples
- Identify the fields needed to reconstruct an historical recommendation decision
- Design exposure-aware logging and negative-example policies
Example
The model learned that unseen books were disliked
A bookseller trained on purchases and treated every unpurchased title as a negative. Most of those titles had never appeared to the user at all. So the model learned the old recommender's exposure pattern as if it were preference.
The way out of that is expensive, and the largest published example prices it. In May 2009 Yahoo!'s Front Page Today Module ran a random bucket. Instead of ranking articles, it drew them at random from the article pool. The point was to make the logged events usable for unbiased offline evaluation. About 4.7 million events came from 1 May alone, for tuning. The evaluation set ran from 3 to 9 May. Over 33 million events in all, and a 12.5% click lift for LinUCB over a context-free bandit.
The 2010 paper reporting that traffic makes the claim this lesson turns on: “we argue that any bandit algorithm can be reliably evaluated offline using previously recorded random traffic.”
Previously recorded random traffic is exactly what the bookseller's log did not contain. No amount of care in splitting that log creates it after the fact.
- Exposure dependence: A user can interact only with items that were available and visible.
- Position effect: Items near the top receive more attention even at equal relevance.
- Policy inheritance: Historical logs overrepresent candidates favored by previous systems.
- Missingness: No interaction may mean unseen, ignored, unaffordable, forgotten, or truly unwanted.
- Evaluation bias: Random row splits preserve the old policy's selection mechanism in every partition. That is why Yahoo! had to serve articles at random to obtain about 4.7 million events in a single day that its own ranker had not chosen.
Visual
What a useful exposure record contains
A log that starts at the click has already started too late. This record starts at the decision context and ends at the logging probability. The fields in between are the ones teams find they needed only after an analysis has failed.
The last box is the one most often left empty, and one public production log filled it. In 2016 Criteo released the first public dataset carrying accurately logged propensities for batch learning from bandit feedback. Over 103 million banner-ad impressions, 35GB gzipped, about 250GB raw on the dataset page and 256GB by the paper's own count. The logging policy sampled banners without replacement from a Plackett-Luce model. For every impression it recorded the probability with which the displayed banner had been sampled.
It also wrote down a second exposure decision that most teams would have taken silently: “Importantly, non-clicked examples were sub-sampled aggressively to reduce the dataset size and only a random 10% sub-sample of non-clicked impressions are logged.”
Because the sub-sampling rate is on the record, an analyst can reason about it. Apply the same thinning without a record and the file simply looks like an ad system whose banners were rarely ignored.
- 1
Decision context
User or session, surface, query, time, device, and policy version.
- 2
Eligible set
Items allowed before retrieval, including inventory and policy constraints.
- 3
Candidate set
Sources, scores, and filters that determined what ranking could consider.
- 4
Displayed slate
Order, position, page region, artwork, and visibility duration.
- 5
Action and delay
Clicks, dwell, purchase, skip, complaint, or delayed outcome with attribution rules.
- 6
Logging probability
Randomization or propensity information needed for some counterfactual analyses.
Recommendation data is generated by a policy
Implicit-feedback logs are not an independent sample of preferences. They record behavior after eligibility, retrieval, ranking, layout, and user choice have already filtered the world. The missing entries are therefore missing-not-at-random. A team that treats them all as equal negatives rewards whatever was already popular and punishes anything the old system never showed. It also scores any policy that resembles the logger too kindly. The log is not a picture of what users want. It is a picture of what the last system chose to show them.
Treat an unseen item as evidence about the old ranker's reach before treating it as evidence about the user.
Case
A perturbed search engine, and ratings volunteered on the radio
Two literatures put numbers under this, and the first is more crowded than it is usually credited as being. In 2008 an experiment tested four hypotheses about position bias, and it has four authors, not the two the paper is normally cited under. Ordinary traffic could not settle the question. The abstract says what Craswell's group did instead: “We carry out a large data-gathering effort, where we perturb the ranking of a major search engine, to see how clicks are affected.” A cascade model won: users read from the top down and leave on finding a worthwhile document. It best explained position bias in the early ranks. In 2017 Joachims and two colleagues built on that. They treated the click log as biased data and weighted it by propensity rather than reading it straight.
Ratings are no cleaner, and the study that established it had to buy its own comparison. Between 22 August and 12 September 2006, Yahoo!'s LaunchCast radio service asked listeners to rate ten songs drawn at random, without replacement, from a fixed set of 1,000. In total 35,786 users contributed data. Results were reported on the 5,400 participants who already had at least ten ratings. Ratings of the randomly drawn songs had markedly different properties from the ones the same population had volunteered.
The same study also surveyed the listeners, and they named the mechanism themselves: “64.85% of users responded that their preferences do affect their choice to rate a song.”
The filter was invisible in the ratings. The people doing the filtering could describe it.
Position
Watching users is not more honest than asking them
Both of the studies that carry this lesson had to interfere with a working system before they could see anything at all.
The interference went in the pipe. In 2005 Joachims and four colleagues routed results to each subject through a proxy that intercepted the HTTP request. Phase I eye-tracked 34 Cornell undergraduates, 29 of them with usable eye data. Phase II took 22 more, 16 usable: 6 in the “normal” condition, 5 in “swapped”, where the top two Google results were switched, and 5 in “reversed”, where the ten results were shown in reverse order. In the reversed condition 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. None of the subjects suspected any manipulation.
The eye data supplied a finding no click log could have produced: “It is very interesting that users click substantially more often on the first than on the second link, while they view the corresponding abstract with almost equal frequency.”
Two abstracts read with almost equal frequency. One of them clicked substantially more. In a click log that difference is indistinguishable from a preference.
The LaunchCast study bought the equivalent comparison on the ratings side, ten songs at a time drawn at random without replacement from a fixed set of 1,000. The comparison was manufactured both times. Neither team found it sitting in the log.
So the familiar hierarchy — behaviour honest, stated preference unreliable — does not survive this lesson. Both records are filtered, and only one of the filters tends to get declared. The listeners said as much and attached a figure to it: 64.85% of them responded that their preferences do affect their choice to rate a song. The position result carries its own limit too. The cascade model best explained position bias in the early ranks, which is a claim about the top of the page. None of that makes logs useless. It means a team that has never randomised anything, and never put a second instrument beside the click, holds one filtered record and no way to size the filter. “The data shows users prefer” is a sentence that needs the second thing.
A log records what the interface offered, in the order it offered it.
Example
Logging failures that corrupt future learning
Two of these are worth auditing before the others. When only clicks are stored, non-clicks and non-exposure become the same row forever. When late outcomes overwrite history, an old example quietly acquires information nobody had at recommendation time.
How long that second window stays open is a decision somebody has to write down, and Criteo wrote it down in public. Its attribution dataset covers 30 days of live traffic: 16.5 million impressions, 45,000 conversions, 700 campaigns. Each impression carries a timestamp, a click flag, a conversion flag defined as a conversion within 30 days, and whether the conversion was attributed to Criteo. The 2017 paper releasing it states the reason: “The industry standard for conversion attribution is to credit the advertizing platform which owns the last click in a 30 days window before the conversion.”
A label attached to an impression served today can still change a month from now. A training set assembled with no stated window is one whose labels depend on the day somebody happened to read them.
- Only clicks are stored: The team cannot separate non-clicks from non-exposure.
- Candidate sets disappear: Retrieval failures become invisible and are blamed on ranking.
- Position is missing: Presentation bias cannot be measured or adjusted.
- Policy versions drift: The same event schema mixes several ranking and UI policies.
- Late outcomes overwrite history: Past examples acquire information unavailable at recommendation time, the way a Criteo conversion flag stays open for the 30 days after the impression.
Comparison
Positive, unexposed, and exposed-but-unselected cases differ
Three cases, and most logs store only the first. A positive interaction and an item nobody ever saw look identical in a table that never recorded what was on the screen. Between them sits the case carrying most of the information: exposed but unselected, shown and passed over.
Separating the three cannot be done to a log afterwards. It has to be built, and the cost is visible in the datasets built for it. Schnabel and Joachims, with three colleagues, constructed the distinction by hand in 2016. Their Coat Shopping dataset paid 290 Mechanical Turk shoppers to browse an inventory of 300 items: “They were asked to find the coat in the store that they wanted to buy the most. Afterwards, they had to rate 24 of the coats they explored (self-selected) and 16 randomly picked ones on a five-point scale.”
The 24 are exposure the shopper chose. The 16 are exposure nobody chose, and they exist only because the experimenters paid for them. The same paper's other dataset, Yahoo! R3, pairs over 300,000 self-selected ratings from 15,400 users with a test set of 5,400 users each rating 10 randomly chosen songs. That is the going rate for a test set the old policy did not select.
Positive interaction
The user acted after exposure, under a particular interface and policy.
- Contains preference and presentation effects
- May reflect necessity or manipulation
- Can have delayed satisfaction
- Requires attribution to the correct impression
Exposed but unselected
The item had some opportunity but received no observed action.
- Stronger negative evidence than no exposure
- Still depends on position and attention
- May reflect competition within the slate
- Needs a visibility definition
Not exposed
The log provides no direct behavioral judgment.
- Could be relevant or irrelevant
- May have been ineligible or unretrieved
- Should not be treated as a certain negative
- Useful for carefully designed sampling
Steps
Build an exposure-aware event contract
The opportunity is logged before the click is. That ordering is the whole point of the contract, which is why by step five the team is auditing what never appeared at all.
Step three is the one whose payoff is easiest to underrate, because it looks like bookkeeping. A team that recorded which ranker served which impression need not degrade live results to learn its own propensities. Joachims and five colleagues showed that in 2019: “First, we show how to harvest a specific type of intervention data from historic feedback logs of multiple different ranking functions, and show that this data is sufficient for consistent propensity estimation in the position-based model.” They evaluated the estimator on two production systems, ArXiv Full-text Search and Google Drive Search.
The interventions were already in the history. Versioning is what makes them legible. A log that mixed several ranking functions without naming them has thrown that history away.
Step four is where a window of the Criteo kind gets stated explicitly, so that a past example is not quietly updated with a fact that arrived after it was served.
1. Log the opportunity
Define when an item counts as meaningfully visible.
2. Preserve the slate
Store positions, layout regions, creative variants, and candidate sources.
3. Record the logger
Version policy, model, rules, and randomized decisions.
4. Attach outcomes safely
Use explicit windows and avoid future leakage into past examples.
5. Audit missingness
Compare exposed, unexposed, eligible, and ineligible populations.
Key idea
The logging gate
No learning recommender should launch until the team can reconstruct why each displayed item was eligible, retrieved, placed, and observed. Criteo's test-bed stored the probability with which the displayed banner was sampled, for every one of its 103 million banner-ad impressions. That field costs almost nothing at serving time. It cannot be recovered from a file that never carried it.
Exposure that was never recorded cannot be reconstructed afterwards, so this gate has to hold before the first request is served.
Key idea
Silence in the log has two explanations
Interaction absence cannot reveal whether the user rejected an item or never had a meaningful opportunity to see it. In the Cornell eye-tracking study the two could be told apart: abstracts viewed with almost equal frequency, clicks substantially unequal. That was possible only because a second instrument was watching the screen alongside the click.
Two users with identical blank rows can be telling opposite stories, and the log alone will never say which is which.
Key takeaways
- Without exposure, the log describes actions but not the alternatives users could reasonably choose. The Cornell eye-tracking study found users clicking substantially more often on the first link than the second while viewing the corresponding abstracts with almost equal frequency.
- Implicit-feedback logs are not an independent sample of preferences, and 64.85% of the users surveyed in the Yahoo! LaunchCast study responded that their preferences do affect their choice to rate a song.
- Interaction absence cannot reveal whether the user rejected an item or never had a meaningful opportunity to see it. In the Criteo test-bed it can also mean the row fell outside the random 10% sub-sample of non-clicked impressions that was logged.
- Decision context matters — user or session, surface, query, time, device, and policy version. Recording which ranker served which impression let one team estimate propensities for ArXiv Full-text Search and Google Drive Search from historic logs instead of randomising live traffic.
- Storing only clicks remains a practical risk, since the team cannot separate non-clicks from non-exposure. Criteo's logging policy recorded, for every one of 103 million impressions, the probability with which the displayed banner was sampled.
- Comparing exposed, unexposed, eligible, and ineligible populations is what shows where the log is silent, and whether that silence came from the user or from the policy that decided what to show. It is why 290 Mechanical Turk shoppers had to rate 16 randomly picked coats each alongside the 24 they chose.