Paper commentary
A Contextual-Bandit Approach to Personalized News Article Recommendation
Contextual bandits pick personalized news articles from changing pools
- Problem Recommending news articles is hard because the article pool keeps changing and new users have no history. Each visitor reveals a click only for the article shown.
- Method LinUCB scores each candidate article with a ridge-regression payoff estimate plus a confidence width, instead of tracking each article separately.
- Results On Yahoo! Front Page traffic, the method gave a 12.5% click lift over a standard context-free bandit.
Why article selection is a contextual bandit problem
The work casts article selection on a web front page as a contextual bandit. At each trial the system observes the current user and the candidate articles with their feature vectors, shows one article, and updates its strategy from the click on that one article. The feedback is partial: a payoff is recorded only for the arm that was shown, so the system cannot learn how the unshown articles would have fared.
The pool keeps changing, with frequent insertions and deletions, and new visitors often have no consumption history, which makes a purely content-based or collaborative model hard to keep current.
Showing an uncertain article gathers information about it but can lower clicks in the short term, so the system has to trade exploitation of the current best guess against exploration. Context-free bandits such as ǫ-greedy and UCB handle this trade-off for each article separately, so a new article must collect its own clicks before its estimate becomes useful.
Using features lets information about one article or user carry over to others, which the authors need for new users and articles.
Disjoint LinUCB: a ridge estimate and a width per arm
Each arm keeps a design matrix D_a built from the contexts seen for it and a response vector c_a built from the clicks, and the coefficient is fitted by ridge regression. The estimate is \[ \hat{\theta}_a = (D_a^\top D_a + I_d)^{-1} D_a^\top c_a \] where I_d is the d-by-d identity matrix, so the ridge term keeps the inverse defined even before an arm has any data.
The first term is the estimated payoff. The second term is a width scaled by α, which is large in directions of the feature space that the arm's data have covered little, so the choice favours arms whose payoff is still uncertain.
After a choice, only the chosen arm's matrix and vector are updated, by adding the outer product of its context and the observed payoff, so the other arms' statistics stay as they were. The algorithm has a single input parameter α, and the authors note that the value suggested by the analysis can be conservatively large, so tuning it may give higher payoffs in practice.
Hybrid LinUCB: a coefficient shared by all arms
The hybrid model adds a linear term with a coefficient vector β shared by all arms to the arm-specific term, so the expected payoff becomes z^\top β + x^\top θ_a. Here z_{t,a} is the feature vector of the current user and article combination, while x_{t,a} carries the arm-specific part, which lets one article's clicks inform the estimate for another.
Once β is shared, the confidence intervals of different arms are no longer independent, so the disjoint procedure cannot be run arm by arm. The authors instead use block matrix inversion to obtain the shared estimate from a matrix A_0 and a vector b_0 accumulated across all arms, and each arm's coefficient is then fitted to its responses after subtracting the shared part carried by B_a.
The width for each arm combines terms from A_0 with that arm's own matrices, and the score adds the shared term z^\top β̂ to the arm term before the α-scaled width.
The building blocks have fixed dimensions and are updated incrementally, and arms that are not in the current candidate set no longer enter the computation. The derivation is given only as pseudocode in this paper, with the detailed derivation deferred to a full version.
Scoring a policy on logged random traffic
Running every candidate policy live is usually infeasible, and a simulator built from logs adds modelling bias that is hard to justify, so the authors replay logged events instead. The logged events come from a logging policy whose payoff is observed only for the single arm it chose, and the analysis assumes the events are i.i.d. and that this logging policy chose each arm uniformly at random.
Policy_Evaluator takes a policy and a target number of retained events T, then reads the log one event at a time, and an event is kept only when the evaluated policy picks the same arm as the logging policy. Each kept event is appended to the history and its payoff is added to a running total, while other events are skipped without changing the state.
Because each event is kept with probability 1/K, the retained events follow the same distribution as interactions with the evaluated policy on real traffic.
Theorem 1 states that every history of length T has the same probability under the policy evaluator as under the real process, and that the expected number of logged events needed to collect a history of length T is KT. The proof is an induction over t, relying on the independence of the data and of the policy's randomization, and it gives the expected count directly from the 1/K retention rate.
The average payoff RT/T returned by the evaluator is therefore treated as an unbiased estimate of the value of the policy.
Data, features and competing policies
The events come from a random bucket of Yahoo! Front Page traffic in May 2009, where each event records the randomly chosen article, the user and article information, and whether the story-position article was clicked. About 4.7 million events from May 01 serve as tuning data, and about 36 million events from May 03–09 serve as evaluation data.
The abstract refers to a dataset of over 33 million events, while the evaluation section gives about 36 million events for the one-week set.
Raw user features were kept when their support was at least 0.1, which left over 1000 categorical components covering demographics, about 200 locations and about 1000 behavioural categories.
A bilinear logistic regression is fitted to project user features onto article categories, and K-means then groups users into 5 clusters in the projected space. Each user is represented by a six-dimensional vector: five cluster membership values and a constant 1. Each article gets the same six-dimensional reduction, and the outer product of the two gives 36 shared interaction features.
The authors keep the feature space small because storing and retrieving large user and article information would be expensive in an online service.
The baselines are context-free policies: random, ǫ-greedy, UCB and omniscient, where omniscient picks the article with the highest empirical CTR in hindsight. Warm-start variants add a user-specific correction from an offline bilinear logistic regression to the context-free CTR estimate. Segment variants run a separate ǫ-greedy or UCB in each of the five user clusters, and the disjoint and hybrid variants of ǫ-greedy and LinUCB learn user-specific CTRs online.
Every CTR is reported relative to the random policy's CTR, and the random policy's own relative CTR is therefore always 1.
Tuning the exploration parameter
Each competing algorithm has one parameter, ǫ for ǫ-greedy and α for the UCB methods, and it was tuned on the one-day tuning data before a single run on the evaluation data. On the tuning data, the CTR curves in the learning bucket usually take an inverted U-shape: a parameter that is too small under-explores and a parameter that is too large over-explores.
The tuning plots show that warm-start information helps compared with the versions that use no features, and both ǫ-greedy (warm) and ucb (warm) beat the omniscient policy. Warm-start results are less stable than those of the online learners, and the authors did not carry the warm-start algorithms to the evaluation data. The ǫ-greedy and UCB families reach similar deployment-bucket CTRs when their parameters are well chosen, but ǫ-greedy has the lower learning-bucket CTR.
Evaluation results at full data size
The omniscient policy reaches a relative CTR of 1.615 on the evaluation data, which serves as the reference for what a context-free policy can achieve in hindsight. Using user features raises the CTR by roughly 10% over ǫ-greedy for the segment, disjoint and hybrid ǫ-greedy variants, and for ucb (seg) and the two LinUCB variants.
The abstract describes the 12.5% click lift as relative to a standard context-free bandit algorithm.
Sparse data and the value of shared features
UCB methods score higher than ǫ-greedy methods in the deployment bucket at every data size, and the gap grows as data become smaller. At the 1% level, linucb (hybrid) is reported at 1.493 in the text, a 10.3% improvement over ucb's 1.354, while Table 1 lists 1.482 for the same deployment-bucket cell.
The authors attribute the hybrid advantage under sparse data to shared features, which let CTR information from one article transfer to others, while disjoint models do not share feedback across arms. The authors expect that adding more diverse features, such as principal components, would be needed to separate linucb (disjoint) from ucb (seg).
Limitations
The unbiasedness of the offline evaluator depends on i.i.d. events and on uniform random logging; the authors say a general randomized logging policy can be handled by rejection sampling at a cost in data efficiency, but they omit those details. The tuning results come from a single run per algorithm, and the authors rely on the size of the dataset and on Theorem 1 to call the numbers statistically reliable.
Warm-start variants were less stable than the online learners and were not evaluated on the evaluation data. The regret bound for a fixed arm set is stated as following from an adaptation of Auer's analysis, and the hybrid derivation is deferred to a full paper. All experiments use one Yahoo! Front Page module with the feature construction described here and five user groups.
Paper info
- Authors
- Lihong Li, Wei Chu, John Langford, Robert E. Schapire
- Venue
- arXiv · Preprint
- First published
- 2010-2-28
- Added
- 2026-11-12
- Updated
- 2012-3-1
- Version
- v2
- arXiv
- 1003.0146
- DOI
- 10.1145/1772690.1772758
- Category
- cs.LG · cs.AI · cs.IR
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Lihong Li, Wei Chu, John Langford, Robert E. Schapire (2010). A Contextual-Bandit Approach to Personalized News Article Recommendation. arXiv:1003.0146v2. https://doi.org/10.1145/1772690.1772758
BibTeX
@article{li2010contextual,
title = {{A Contextual-Bandit Approach to Personalized News Article Recommendation}},
author = {Lihong Li and Wei Chu and John Langford and Robert E. Schapire},
year = {2010},
eprint = {1003.0146},
archivePrefix = {arXiv},
doi = {10.1145/1772690.1772758},
url = {https://arxiv.org/abs/1003.0146v2}
}