Sam Babichenko

Reading notes / Bandits and exploration

Contextual bandits

Li et al., 2010; Agarwal et al., 2014, 2016

Contextual bandit
tta round, t=1,…,Tt=1,\dots,T
TTnumber of rounds, or of logged rounds
xtx_tcontext of round tt: what the learner knows when it decides, such as features of the user
KKnumber of actions
ata_taction chosen in round tt
rt(a)r_t(a)reward of action aa in round tt, in [0,1][0,1]; the learner sees only rt(at)r_t(a_t)
π\pia policy: a rule that maps each context xx to an action π(x)\pi(x)
Π\Pifinite class of policies the learner competes with
∣Π∣|\Pi|number of policies in Π\Pi
R(π)R(\pi)expected reward of policy π\pi per round
π∗\pi^*best policy in the class, arg⁡max⁡π∈ΠR(π)\arg\max_{\pi\in\Pi}R(\pi)
Reg(π)\mathrm{Reg}(\pi)regret of policy π\pi, R(π∗)−R(π)R(\pi^*)-R(\pi)
pt(a)p_t(a)probability that the learner picks action aa in round tt, given the history and xtx_t
ptp_tpropensity of round tt, pt=pt(at)p_t=p_t(a_t), recorded with the action
R^t(π)\hat R_t(\pi)IPS estimate of R(π)R(\pi) from the first tt rounds
pmin⁡p_{\min}smallest probability any action gets; ε/K\varepsilon/K under ε-greedy; the papers write μ\mu (2014) and ϵ\epsilon (2016)
ε\varepsilonε-greedy's exploration rate: the probability of a uniformly random action in a round
δ\deltafailure probability: the guarantees hold with probability at least 1−δ1-\delta
CCsmall constant in the bound for many policies on one log
Agarwal et al. (2014)
Q(π)Q(\pi)weight on policy π\pi; nonnegative, summing to at most 1, nonzero for few policies
Q~(a∣x)\tilde Q(a\mid x)probability of action aa in context xx after mixing with uniform exploration, (1−Kpmin⁡)∑π:π(x)=aQ(π)+pmin⁡(1-Kp_{\min})\sum_{\pi:\pi(x)=a}Q(\pi)+p_{\min}
πt\pi_tthe leader: the policy with the largest IPS estimate after tt rounds
Reg^t(π)\widehat{\mathrm{Reg}}_t(\pi)estimated regret, R^t(πt)−R^t(π)\hat R_t(\pi_t)-\hat R_t(\pi)
V^π(Q)\hat V_\pi(Q)average over the logged contexts of 1/Q~(π(x)∣x)1/\tilde Q(\pi(x)\mid x); it bounds the variance of π\pi's IPS estimate
ψ\psiconstant scaling the estimated regret in the variance condition; ψ=100\psi=100 in the paper
LLln⁡(16t2∣Π∣/δ)\ln(16t^2|\Pi|/\delta), the logarithmic factor in pmin⁡p_{\min}
c0c_0absolute constant in the factor-2 comparison of true and estimated regret
r^τ\hat r_\tauIPS reward vector of round τ\tau: rτ(aτ)/pτr_\tau(a_\tau)/p_\tau at the logged action, 0 elsewhere
r~τ\tilde r_\taureward vector given to the argmax oracle, r~τ(a)=1/Q~(a∣xτ)+r^τ(a)/(ψpmin⁡)\tilde r_\tau(a)=1/\tilde Q(a\mid x_\tau)+\hat r_\tau(a)/(\psi p_{\min})
Regression oracles (2020, 2022)
y^(a)\hat y(a)predicted reward of action aa in the current context
y^best\hat y_{\rm best}largest predicted reward, that of the greedy action
γ\gammahow sharply probability falls with an action's predicted gap
F\mathcal Fclass of reward models the regression learner fits
LinUCB (Li et al., 2010)
xt,ax_{t,a}feature vector of article aa for the user of round tt, with dd entries
θ^a\hat\theta_aridge estimate of article aa's coefficients, Aa−1baA_a^{-1}b_a
AaA_aId+∑xx⊤I_d+\sum xx^\top over the past rounds in which article aa was shown
bab_a∑rx\sum rx over the same rounds, rr the reward (1 for a click)
α\alphamultiplier of LinUCB's bonus, tuned on a separate day of data

Context. A news page chooses a featured story, an ad server picks an ad, and a cloud controller decides how long to wait before rebooting a machine. Each sees information about the current request, takes one action, and observes the outcome only for that action. A system that always serves its current best guess never sees what the other actions would have done. Its logs cannot tell whether a different rule would have worked better, and a model retrained on them reinforces the system's own past choices. The a repeated decision in which each round shows a context, the learner picks one of finitely many actions, and only the chosen action's reward is revealed; the target is the best rule from contexts to actions models this problem. Li et al. (2010) guide exploration with the uncertainty of a linear model on Yahoo!'s front page. Agarwal et al. (2014) give an algorithm with optimal regret for any policy class a supervised learner can search. Agarwal et al. (2016) build that exploration-and-logging loop into a production system called the Decision Service.

Exploration is a data-collection design problem. Suppose a system randomizes its choices and logs the chosen action's probability at decision time. Those logs can then evaluate any a rule that maps each context to an action, including one that never ran. In round tt, a context xtx_t arrives and the learner picks an action ata_t from KK choices with probability ptp_t, called the the probability with which the logged action was chosen, recorded when the decision is made. Reading note: Doubly robust policy evaluation. It observes only that action's reward rt(at)∈[0,1]r_t(a_t)\in[0,1]. To estimate a policy's expected reward R(π)R(\pi), IPS: estimating a policy's reward from logged rounds by dividing each logged reward by its propensity and counting it only where the policy would have taken the logged action. Reading note: Doubly robust policy evaluation (IPS) uses the Horvitz-Thompson estimator from survey sampling:R^T(π)=1T∑t=1Trt(at) 1{π(xt)=at}pt.\hat R_T(\pi)=\frac{1}{T}\sum_{t=1}^T\frac{r_t(a_t)\,\mathbb 1\{\pi(x_t)=a_t\}}{p_t}.Write pt(π(xt))p_t(\pi(x_t)) for the probability the learner assigned to π\pi's action. The indicator equals 1 with that probability, canceling the denominator. Each term therefore has mean rt(π(xt))r_t(\pi(x_t)) and second moment at most 1/pt(π(xt))1/p_t(\pi(x_t)). The estimate is unbiased whenever π\pi's actions had positive probability, and those probabilities govern its variance.

Every logged round informs every policy that agrees with the logged action, so one exploration log evaluates an entire policy class Π\Pi at once. Suppose every action receives probability at least the smallest probability that any action gets, in each round or in the logged data; ε/K\varepsilon/K under ε-greedy over TT logged rounds. With probability at least 1−δ1-\delta, one log estimates every policy in Π\Pi simultaneously within the first error below, while separate A/B tests splitting traffic across policies incur the second (Agarwal et al., 2016):one log:Cln⁡(∣Π∣/δ)pmin⁡T,A/B tests:C∣Π∣ln⁡(∣Π∣/δ)T.\begin{aligned}\text{one log:}&\quad C\sqrt{\frac{\ln(|\Pi|/\delta)}{p_{\min}T}},\\\text{A/B tests:}&\quad C\sqrt{\frac{|\Pi|\ln(|\Pi|/\delta)}{T}}.\end{aligned}Here CC is a small constant. Collecting that log costs the reward given up on randomized rounds. The design problem is choosing how much probability each action gets.

Uniform exploration pays too much for actions that already look bad. The learner competes with the best policy π∗\pi^* in a finite class Π\Pi, judged by the reward lost against the best policy in the class: per round for a single policy, Reg(π)=R(π∗)−R(π)\mathrm{Reg}(\pi)=R(\pi^*)-R(\pi), and summed over rounds for a learner. Under ε-greedy, exploring uniformly at rate ε\varepsilon forfeits about εT\varepsilon T reward while leaving every IPS estimate with variance about K/εK/\varepsilon. The greedy policy played between explorations then errs by about Kln⁡∣Π∣/(εT)\sqrt{K\ln|\Pi|/(\varepsilon T)} per round. Balancing εT\varepsilon T against TKln⁡∣Π∣/(εT)T\sqrt{K\ln|\Pi|/(\varepsilon T)} stalls regret at order (Kln⁡∣Π∣)1/3T2/3(K\ln|\Pi|)^{1/3}T^{2/3}. Agarwal et al. (2014) budget exploration by the stakes and reach the optimal T\sqrt{T} rate. They keep each policy's estimate only as precise as its estimated regret requires.

The leader πt\pi_t is the policy with the largest IPS estimate R^t\hat R_t after tt rounds. To set the exploration budget, the learner places nonnegative weights the weight on policy π\pi; the weights are nonnegative, sum to at most 1, and are nonzero for few policies on a few policies and puts any leftover mass on πt\pi_t. It then mixes the sampled policy's action with uniform exploration at floor probability pmin⁡p_{\min}. The average inverse probability of π\pi's action over logged contexts, V^π(Q)=1t∑τ≤t1/Q~(π(xτ)∣xτ)\hat V_\pi(Q)=\frac{1}{t}\sum_{\tau\le t}1/\tilde Q(\pi(x_\tau)\mid x_\tau), with Q~(a∣x)=(1−Kpmin⁡)∑π:π(x)=aQ(π)+pmin⁡\tilde Q(a\mid x)=(1-Kp_{\min})\sum_{\pi:\pi(x)=a}Q(\pi)+p_{\min} the probability that the weights and the uniform mixing give action aa; the paper writes QμQ^\mu for Q~\tilde Q, bounds policy π\pi's IPS variance. Write Reg^t(π)=R^t(πt)−R^t(π)\widehat{\mathrm{Reg}}_t(\pi)=\hat R_t(\pi_t)-\hat R_t(\pi) for estimated regret, and fix a constant ψ\psi, set to 100 in the paper. For every π∈Π\pi\in\Pi, the weights must satisfy∑πQ(π) Reg^t(π)≤2Kψpmin⁡,V^π(Q)≤2K+Reg^t(π)ψpmin⁡.\begin{aligned}\textstyle\sum_\pi Q(\pi)\,\widehat{\mathrm{Reg}}_t(\pi)&\le2K\psi p_{\min},\\\hat V_\pi(Q)&\le2K+\frac{\widehat{\mathrm{Reg}}_t(\pi)}{\psi p_{\min}}.\end{aligned}The first condition keeps played policies close to the leader. The second lets bad policies carry higher variance. Any policy with Reg^t(π)≤2Kψpmin⁡\widehat{\mathrm{Reg}}_t(\pi)\le2K\psi p_{\min} still gets variance bound V^π(Q)≤4K\hat V_\pi(Q)\le4K, within a factor of 4 of uniform exploration. The algorithm recomputes the weights at doubling epoch ends with pmin⁡=min⁡{1/(2K),L/(Kt)}p_{\min}=\min\{1/(2K),\sqrt{L/(Kt)}\} and L=ln⁡(16t2∣Π∣/δ)L=\ln(16t^2|\Pi|/\delta), shrinking exploration as estimates sharpen.

That precision keeps true and estimated regret aligned. Each IPS term is at most 1/pmin⁡1/p_{\min}. a Bernstein-type bound for martingales: a sum of tt martingale differences, each at most MM and with summed conditional variances VV, exceeds about Vln⁡(1/δ)+Mln⁡(1/δ)\sqrt{V\ln(1/\delta)}+M\ln(1/\delta) with probability at most δ\delta, so the deviation is set by the variance more than by the range (Beygelzimer et al., 2011) and a union bound over Π\Pi therefore limit ∣R^t(π)−R(π)∣|\hat R_t(\pi)-R(\pi)| to about V^πL/t+L/(tpmin⁡)\sqrt{\hat V_\pi L/t}+L/(tp_{\min}). With pmin⁡2=L/(Kt)p_{\min}^2=L/(Kt), both KL/t\sqrt{KL/t} and L/(tpmin⁡)L/(tp_{\min}) equal Kpmin⁡Kp_{\min}. Plugging in the variance bound for V^π\hat V_\pi gives∣R^t(π)−R(π)∣≲2KLt+Kpmin⁡+Reg^t(π) Lψpmin⁡t=(2+1)Kpmin⁡+Reg^t(π) Kpmin⁡/ψ≤14Reg^t(π)+3Kpmin⁡.\begin{aligned}&|\hat R_t(\pi)-R(\pi)|\\&\quad\lesssim\sqrt{\frac{2KL}{t}}+Kp_{\min}\\&\qquad+\sqrt{\frac{\widehat{\mathrm{Reg}}_t(\pi)\,L}{\psi p_{\min}t}}\\&\quad=(\sqrt2+1)Kp_{\min}\\&\qquad+\sqrt{\widehat{\mathrm{Reg}}_t(\pi)\,Kp_{\min}/\psi}\\&\quad\le\tfrac14\widehat{\mathrm{Reg}}_t(\pi)+3Kp_{\min}.\end{aligned}The last line applies AM-GM in the form ab≤a/4+b\sqrt{ab}\le a/4+b and uses 2+1+1/ψ≤3\sqrt2+1+1/\psi\le3.

The leader has estimated regret 0, and π∗\pi^*'s estimate cannot exceed the leader's. Applying the deviation bound to π\pi, the leader, and π∗\pi^* then pins true and estimated regret within a factor of 2 of each other, up to a floor proportional to Kpmin⁡Kp_{\min}:Reg(π)≤2 Reg^t(π)+c0Kpmin⁡,Reg^t(π)≤2 Reg(π)+c0Kpmin⁡.\begin{aligned}\mathrm{Reg}(\pi)&\le2\,\widehat{\mathrm{Reg}}_t(\pi)+c_0Kp_{\min},\\\widehat{\mathrm{Reg}}_t(\pi)&\le2\,\mathrm{Reg}(\pi)+c_0Kp_{\min}.\end{aligned}Here c0c_0 is an absolute constant, and the paper makes this comparison exact by induction over epochs. Because a policy's estimation error is a fixed fraction of its distance from the leader, a clearly bad policy cannot masquerade as the best. It is estimated only well enough to stay ruled out. By the first weight condition, played policies have average estimated regret O(Kpmin⁡)O(Kp_{\min}), so each round costs O(Kpmin⁡)O(Kp_{\min}) in expectation. Summing over rounds gives ∑t≤TKpmin⁡≤K∑t≤TL/(Kt)≤2KTL\sum_{t\le T}Kp_{\min}\le K\sum_{t\le T}\sqrt{L/(Kt)}\le2\sqrt{KTL}. On i.i.d. rounds, regret after TT rounds is O(KTln⁡(T∣Π∣/δ)+Kln⁡(T∣Π∣/δ))O\big(\sqrt{KT\ln(T|\Pi|/\delta)}+K\ln(T|\Pi|/\delta)\big) with probability at least 1−δ1-\delta, the optimal order against T2/3T^{2/3} for uniform exploration.

Checking the variance condition directly for every policy in a large class Π\Pi is intractable. Instead, the algorithm finds the weights by calling a supervised learner as an a routine that, given contexts x1,…,xtx_1,\dots,x_t with nonnegative reward vectors, returns arg⁡max⁡π∈Π∑τ≤trτ(π(xτ))\arg\max_{\pi\in\Pi}\sum_{\tau\le t}r_\tau(\pi(x_\tau)); this is cost-sensitive classification, which supervised learners solve, which acts as a separation oracle. Write the IPS reward vector of round τ\tau: rτ(aτ)/pτr_\tau(a_\tau)/p_\tau at the logged action and 0 at the others, so that R^t(π)\hat R_t(\pi) averages r^τ(π(xτ))\hat r_\tau(\pi(x_\tau)) for round τ\tau's IPS reward vector, and define modified rewards r~τ(a)=1/Q~(a∣xτ)+r^τ(a)/(ψpmin⁡)\tilde r_\tau(a)=1/\tilde Q(a\mid x_\tau)+\hat r_\tau(a)/(\psi p_{\min}). Policy π\pi's variance violation, V^π(Q)−2K−Reg^t(π)/(ψpmin⁡)\hat V_\pi(Q)-2K-\widehat{\mathrm{Reg}}_t(\pi)/(\psi p_{\min}), equals the average of r~τ(π(xτ))\tilde r_\tau(\pi(x_\tau)) over the logged rounds plus terms independent of π\pi. Because r~τ(a)\tilde r_\tau(a) is large for actions the current weights rarely play and for actions with high estimated reward, a single oracle call returns the most violated policy.

Raising that violated policy's weight is a coordinate-descent step on a potential that drops by a fixed amount at each update. Each solve therefore finishes in at most 4ln⁡(1/(Kpmin⁡))/pmin⁡4\ln(1/(Kp_{\min}))/p_{\min} such steps, one oracle call each. Over TT rounds, the algorithm makes big-O up to logarithmic factors in TT and KK(KT/ln⁡(∣Π∣/δ))\big(\sqrt{KT/\ln(|\Pi|/\delta)}\big) oracle calls in total. Earlier, Randomized UCB, the monster of the paper's title, required O~(T5)\tilde O(T^5) calls per round. The algorithm's total call count is close to tight. Each call adds at most one policy to QQ's support, and on some problems any distribution meeting the variance conditions after tt rounds needs at least on the order of Kt/ln⁡(∣Π∣t/δ)\sqrt{Kt/\ln(|\Pi|t/\delta)} policies. An oracle-based method therefore cannot make substantially fewer calls.

Later work replaces the classification oracle and iterative weight solve with a regression model and a closed-form sampling rule. Let y^(a)\hat y(a) be the predicted reward of action aa in the current context, and write y^best\hat y_{\rm best} for the largest prediction. SquareCB (Foster and Rakhlin, 2020) and FALCON (Simchi-Levi and Xu, 2022) give every non-greedy action probabilityp(a)=1K+γ (y^best−y^(a))p(a)=\frac{1}{K+\gamma\,\big(\hat y_{\rm best}-\hat y(a)\big)}and put the remaining mass on the greedy action. The inverse probability 1/p(a)=K+γ(y^best−y^(a))1/p(a)=K+\gamma(\hat y_{\rm best}-\hat y(a)) enforces the 2014 variance budget action by action. Each action's expected predicted cost, p(a)(y^best−y^(a))p(a)(\hat y_{\rm best}-\hat y(a)), stays below 1/γ1/\gamma however bad the action looks. Simchi-Levi and Xu make this link explicit. The policy distribution induced by their rule satisfies two conditions of the 2014 form, with γ\gamma replacing 1/(ψpmin⁡)1/(\psi p_{\min}) and predicted regret replacing IPS regret. Their proof then follows the same factor-2 comparison.

Both methods match the 2014 optimal regret order. Paired with an online regression learner, SquareCB attains regret O(KTln⁡∣F∣)O(\sqrt{KT\ln|\mathcal F|}) for a finite reward-model class F\mathcal F, even when contexts are chosen adversarially. On i.i.d. contexts, FALCON reaches O(KTln⁡(∣F∣ln⁡T/δ))O\big(\sqrt{KT\ln(|\mathcal F|\ln T/\delta)}\big) using only O(log⁡T)O(\log T) offline least-squares fits. Both require the true mean reward of every context and action is one of the models in F\mathcal F; the 2014 algorithm competes with the best policy in Π\Pi without any such assumption, which the 2014 algorithm does not need. an open-source online learning library that reduces contextual bandit learning to cost-sensitive classification or regression; the Decision Service is built on it implements the rule as --cb_explore_adf --squarecb, with γ\gamma growing like 10t10\sqrt t by default. It also provides --cover, an online variant of the 2014 algorithm.

LinUCB (Li et al., 2010) is a cheap parametric special case that replaces randomization with an optimism bonus from a linear model. It models article aa's click rate as linear in a dd-dimensional user-article feature vector xt,ax_{t,a}. From past rounds where article aa was shown, it forms AaA_a=Id+∑xx⊤{}=I_d+\sum xx^\top and ba=∑rxb_a=\sum rx, fits the ridge estimate θ^a=Aa−1ba\hat\theta_a=A_a^{-1}b_a, and servesat=arg⁡max⁡a(xt,a⊤θ^a+αxt,a⊤Aa−1xt,a).\begin{aligned}\htmlData{gr=gn2}{a_t}=\arg\max_a\Big(&x_{t,a}^\top\hat\theta_a\\&+\alpha\sqrt{x_{t,a}^\top A_a^{-1}x_{t,a}}\Big).\end{aligned}Under a standard normal prior on the coefficients and unit-variance Gaussian click noise, the square root equals the posterior standard deviation of the predicted click rate. It stays large when a user's features point in directions the article's past viewers have not covered, aiming exploration at the user-article pairs the model knows least about.

Because LinUCB is deterministic given the history, its own logs carry no propensities for IPS. Li et al. evaluate it offline by replaying uniformly logged traffic, keeping a logged event only when the algorithm picks the logged article. Uniform logging keeps each event with probability exactly 1/K1/K, independent of the history. The kept stream therefore matches live traffic in distribution and evaluates even algorithms that learn online. Replay requires uniform logs and roughly KK times as much data. User features lifted the served policy's click-through rate by around 10% over context-free ε-greedy across about 36 million visits to Yahoo!'s front page during one week of May 2009. Using the same per-article linear models, LinUCB earned 26% more clicks than ε-greedy while learning, because ε-greedy explores by showing random articles.

The Decision Service (Agarwal et al., 2016) builds randomization and logging directly into serving, splitting exploring, logging, learning, and deploying into separate components. A client library inside the application turns the context and current model into an action distribution and samples an action with a seeded generator. It logs (x,a,p)(x,a,p) at decision time so the recorded propensity matches what actually ran. The log component waits a fixed interval before joining each reward to its decision, supplying a default reward of 0 if none arrives. Waiting keeps the learner from favoring actions with fast feedback. The learner trains online in Vowpal Wabbit, evaluates candidate policies with real-time IPS, and logs a model ID with every decision so runs can be reproduced offline.

In production, even small logging errors distort the estimates sharply. To measure the damage, the authors injected real deployment bugs into a day of MSN data. They then took the ratio of a policy's IPS estimate on its training data to its IPS estimate on held-out data. On clean logs, those two estimates agree within 5%. Every injected bug inflated the training estimate, by factors of 1.2 to 8.7. The largest jump, 8.7 times, came from a feature marking the chosen action that exists only after the decision. Next came editors overriding 10% of actions, leaving the logged probability attached to a different action and inflating the estimate 3.0 times.

Deployed in production, the service beat each site's prior policy. At MSN, a two-week A/B test using ε-greedy with ε=33%\varepsilon=33\% outperformed the editors' ordering on two homepage blocks. Click-through rose by more than 25% on one block and by 5.3% on another with ten times the traffic, and the service became the default for logged-in users. Complex gained more than 30% over its editors, and TrackRevenue raised revenue by 18% over a context-free ε-greedy bandit. At Azure Compute, the default policy waits 10 minutes before rebooting an unresponsive virtual machine. Its logs directly reveal what any shorter wait would have done, yielding an offline estimate of 19% less wasted time. To learn from its own traffic, a system should randomize decisions it may later change and log the chosen action's probability at decision time. It should join rewards after a fixed wait and evaluate candidates offline before deploying. Running ε-greedy around the existing production policy is enough to make the logs usable.

Limits. IPS requires positive probability on every action a policy takes, and its 1/p1/p variance explodes when there are many actions. IPS applied only to the residual of a reward model ϱ^\hat\varrho: each term becomes ϱ^(xt,π(xt))+1{π(xt)=at} (rt(at)−ϱ^(xt,at))/pt\hat\varrho(x_t,\pi(x_t))+\mathbb 1\{\pi(x_t)=a_t\}\,(r_t(a_t)-\hat\varrho(x_t,a_t))/p_t; unbiased when either the propensities or the reward model are right, and with less variance than IPS when ϱ^\hat\varrho is accurate (Dudík et al., 2011). Reading note: Doubly robust policy evaluation estimates (Dudík, Langford, and Li, 2011) apply IPS only to a reward model's residual, cutting variance when the model is accurate. The theory also assumes a fixed distribution. At MSN, a policy trained on one day achieved only 73% of a freshly trained policy's click rate the next day, so the service keeps learning and resets its learning rate daily. LinUCB was tested on one site over one week with one run per setting. The 2014 guarantees assume i.i.d. rounds, a finite class, and an exact oracle. That paper's experiment instead runs Online Cover, an online variant with doubly robust estimates that sits outside the theory. Each production deployment compares against editorial orderings or a context-free bandit, with no competing contextual learner in the test.

Terms

Contextual bandit
each round: see a context, pick one of KK actions, see only that action's reward; compete with the best policy in a class Π\Pi
Exploration as data collection
randomize and log the chosen action's probability at decision time, and the logs value any policy
IPS estimate
R^T(π)=1T∑trt(at)1{π(xt)=at}/pt\hat R_T(\pi)=\frac{1}{T}\sum_t r_t(a_t)\mathbb 1\{\pi(x_t)=a_t\}/p_t; unbiased, second moment at most 1/pt(π(xt))1/p_t(\pi(x_t))
One log, many policies
error Cln⁡(∣Π∣/δ)/(pmin⁡T)C\sqrt{\ln(|\Pi|/\delta)/(p_{\min}T)} for all policies at once, against C∣Π∣ln⁡(∣Π∣/δ)/TC\sqrt{|\Pi|\ln(|\Pi|/\delta)/T} for A/B tests
Budget by the stakes
V^π(Q)≤2K+Reg^t(π)/(ψpmin⁡)\hat V_\pi(Q)\le2K+\widehat{\mathrm{Reg}}_t(\pi)/(\psi p_{\min}): near-uniform precision for policies that might be best, less for bad ones
Factor 2
true and estimated regret within a factor of 2 plus c0Kpmin⁡c_0Kp_{\min}; summing Kpmin⁡Kp_{\min} gives 2KTL2\sqrt{KTL}
Argmax oracle
cost-sensitive classification; one call finds the most violated variance condition
Regret and calls (2014)
O(KTln⁡(T∣Π∣/δ))O(\sqrt{KT\ln(T|\Pi|/\delta)}) regret with O~(KT/ln⁡(∣Π∣/δ))\tilde O(\sqrt{KT/\ln(|\Pi|/\delta)}) oracle calls in all
Inverse-gap rule
p(a)=1/(K+γ(y^best−y^(a)))p(a)=1/(K+\gamma(\hat y_{\rm best}-\hat y(a))): the same budget per action from a regression model, under realizability
LinUCB
show arg⁡max⁡axt,a⊤θ^a+αxt,a⊤Aa−1xt,a\arg\max_a x_{t,a}^\top\hat\theta_a+\alpha\sqrt{x_{t,a}^\top A_a^{-1}x_{t,a}}; the bonus is the posterior standard deviation
Replay evaluation
keep a uniformly logged event only when the algorithm agrees with it; kept events are distributed as live ones, at KK times the data
Log at the decision
record (x,a,p)(x,a,p) when the action is chosen; injected logging errors inflated estimates 1.2 to 8.7 times
Fixed wait
join each reward to its decision after the same wait, so fast-feedback actions are not favored

Sources

Connected notes

  • Each token's gradient carries the ratio ρ\rho of its probability under the trained copy to that under the copy that sampled it; CISPO caps that weight at εmax⁡\varepsilon_{\max} where DAPO's clip drops the gradient of a token whose ratio has moved past the clipping range in the direction its advantage favors, which raises the fitted ceiling from 0.52 to 0.595; computing the output layer in FP32, which shrinks the kernel mismatch inside every ratio, raises the base recipe's ceiling from 0.52 to 0.61 on its own.

  • Optimizing against a learned reward raises gold score up to a KL that moves out smoothly with the log of the reward model's size and then lowers it, so early stopping or a KL target has a real effect on the gold score.

  • Sampling one action per decision divides each payoff by the probability ξ[z]\xi[z] of reaching it, and exploring at rate ε\varepsilon keeps that weight at most (∣Ai∣/ε)di(|A_i|/\varepsilon)^{d_i}, so the regret bound still holds but grows exponentially with the number of decisions.

  • Penalizing a model through a linear probe on its own activations creates an adversarial feedback loop in which the model shifts the concept onto a new direction entangled with core features or into a nonlinear ReLU product code, so monitoring breaks unless the score is detached or read from a frozen model and periodically refit.

Threads