Taming the Monster: A Fast and Simple Algorithm for Contextual Bandits
Alekh Agarwal, Daniel Hsu, Satyen Kale, John Langford, Lihong Li, Robert E. Schapire
Introduction
In the contextual bandit problem, an agent collects rewards for actions taken over a sequence of rounds; in each round, the agent chooses an action to take on the basis of (i) context (or features) for the current round, as well as (ii) feedback, in the form of rewards, obtained in previous rounds. The feedback is incomplete: in any given round, the agent observes the reward only for the chosen action; the agent does not observe the reward for other actions. Contextual bandit problems are found in many important applications such as online recommendation and clinical trials, and represent a natural half-way point between supervised learning and reinforcement learning. The use of features to encode context is inherited from supervised machine learning, while exploration is necessary for good performance as in reinforcement learning.
The choice of exploration distribution on actions is important. The strongest known results (Auer et al., 2002; McMahan and Streeter, 2009; Beygelzimer et al., 2011) provide algorithms that carefully control the exploration distribution to achieve an optimal regret after rounds of
with probability at least , relative to a set of policies mapping contexts to actions (where is the number of actions). The regret is the difference between the cumulative reward of the best policy in and the cumulative reward collected by the algorithm. Because the bound has a mild logarithmic dependence on , the algorithm can compete with very large policy classes that are likely to yield high rewards, in which case the algorithm also earns high rewards. However, the computational complexity of the above algorithms is linear in , making them tractable for only simple policy classes.
A sub-linear in running time is possible for policy classes that can be efficiently searched. In this work, we use the abstraction of an optimization oracle to capture this property: given a set of context/reward vector pairs, the oracle returns a policy in with maximum total reward. Using such an oracle in an i.i.d. setting (formally defined in Section 2.1), it is possible to create -greedy (Sutton and Barto, 1998) or epoch-greedy (Langford and Zhang, 2007) algorithms that run in time with only a single call to the oracle per round. However, these algorithms have suboptimal regret bounds of because the algorithms randomize uniformly over actions when they choose to explore.
The EXP4-family of algorithms (Auer et al., 2002; McMahan and Streeter, 2009; Beygelzimer et al., 2011) solve the contextual bandit problem with optimal regret by updating weights (multiplicatively) over all policies in every round. Except for a few special cases (Helmbold and Schapire, 1997; Beygelzimer et al., 2011), the running time of such measure-based algorithms is generally linear in the number of policies.
In contrast, the algorithm of Dudík et al. (2011a) is based on a natural abstraction from supervised learning—the ability to efficiently find a function in a rich function class that minimizes the loss on a training set. This abstraction is encapsulated in the notion of an optimization oracle, which is also useful for -greedy (Sutton and Barto, 1998) and epoch-greedy (Langford and Zhang, 2007) algorithms. However, these latter algorithms have only suboptimal regret bounds.
Another class of approaches based on Bayesian updating is Thompson sampling (Thompson, 1933; Li, 2013), which often enjoys strong theoretical guarantees in expectation over the prior and good empirical performance (Chapelle and Li, 2011). Such algorithms, as well as the closely related upper-confidence bound algorithms (Auer, 2002; Chu et al., 2011), are computationally tractable in cases where the posterior distribution over policies can be efficiently maintained or approximated. In our experiments, we compare to a strong baseline algorithm that uses this approach (Chu et al., 2011).
To circumvent the running time barrier, we restrict attention to algorithms that only access the policy class via the optimization oracle. Specifically, we use a cost-sensitive classification oracle, and a key challenge is to design good supervised learning problems for querying this oracle. The algorithm of Dudík et al. (2011a) uses a similar oracle to construct a distribution over policies that solves a certain convex program. However, the number of oracle calls in their work is prohibitively large, and the statistical analysis is also rather complex.The paper of Dudík et al. (2011a) is colloquially referred to, by its authors, as the “monster paper” (Langford, 2014).
Main contributions.
Preliminaries
In this section, we recall the i.i.d. contextual bandit setting and some basic techniques used in previous works (Auer et al., 2002; Beygelzimer et al., 2011; Dudík et al., 2011a).
Let be a probability distribution over , the joint space of contexts and reward vectors; we assume actions’ rewards from are always in the interval $\mathcal{D}_{X}\mathcal{D}X$.
2 Inverse Propensity Scoring
An unbiased estimate of a policy’s reward may be obtained from a history of interaction records using inverse propensity scoring (; also called inverse probability weighting): the expected reward of policy is estimated as
Let denote a policy that maximizes the expected reward estimate based on inverse propensity scoring with history ( can be arbitrary), and let denote estimated regret relative to . Note that is generally not an unbiased estimate of , because is not always .
3 Optimization Oracle
One natural mode for accessing the set of policies is enumeration, but this is impractical in general. In this work, we instead only access via an optimization oracle which corresponds to a cost-sensitive learner. Following Dudík et al. (2011a), we call this oracle Cost-sensitive learners often need a cost instead of reward, in which case we use ..
4 Projections and Smoothing
In each round, our algorithm chooses an action by randomly drawing a policy from a distribution over , and then picking the action recommended by on the current context . This is equivalent to drawing an action according to . For keeping the variance of reward estimates from in check, it is desirable to prevent the probability of any action from being too small. Thus, as in previous work, we also use a smoothed projection for , . Every action has probability at least under .
Algorithm and Main Results
Our algorithm () is an epoch-based variant of the algorithm of Dudík et al. (2011a) and is given in Algorithm 1. Like , solves an optimization problem (OP) to obtain a distribution over policies to sample from (Step 7), but does so on an epoch schedule, i.e., only on certain pre-specified rounds . The only requirement of the epoch schedule is that the length of epoch is bounded as . For simplicity, we assume for , and .
The crucial step here is solving (OP). Before stating the main result, let us get some intuition about this problem. The first constraint, Eq. (2), requires the average estimated regret of the distribution over policies to be small, since is a rescaled version of the estimated regret of policy . This constraint skews our distribution to put more mass on “good policies” (as judged by our current information), and can be seen as the exploitation component of our algorithm. The second set of constraints, Eq. (3), requires the distribution to place sufficient mass on the actions chosen by each policy , in expectation over contexts. This can be thought of as the exploration constraint, since it requires the distribution to be sufficiently diverse for most contexts. As we will see later, the left hand side of the constraint is a bound on the variance of our reward estimates for policy , and the constraint requires the variance to be controlled at the level of the estimated regret of . That is, we require the reward estimates to be more accurate for good policies than we do for bad ones, allowing for much more adaptive exploration than the uniform exploration of -greedy style algorithms.
This problem is very similar to the one in Dudík et al. (2011a), and our coordinate descent algorithm in Section 3.1 gives a constructive proof that the problem is feasible. As in Dudík et al. (2011a), we have the following regret bound:
Assume the optimization problem (OP) can be solved whenever required in Algorithm 1. With probability at least , the regret of Algorithm 1 () after rounds is
We now present a coordinate descent algorithm to solve (OP). The pseudocode is given in Algorithm 2. Our analysis, as well as the algorithm itself, are based on a potential function which we use to measure progress. The algorithm can be viewed as a form of coordinate descent applied to this same potential function. The main idea of our analysis is to show that this function decreases substantially on every iteration of this algorithm; since the function is nonnegative, this gives an upper bound on the total number of iterations as expressed in the following theorem.
Algorithm 2 (with ) halts in at most iterations, and outputs a solution to (OP).
2 Using an Optimization Oracle
We now show how to implement Algorithm 2 via (c.f. Section 2.3).
Algorithm 2 can be implemented using one call to before the loop is started, and one call for each iteration of the loop thereafter.
At the very beginning, before the loop is started, we compute the best empirical policy so far, , by calling on the sequence of historical contexts and estimated reward vectors; i.e., on , for .
Next, we show that each iteration in the loop of Algorithm 2 can be implemented via one call to . Going over the pseudocode, first note that operations involving in Step 4 can be performed efficiently since has sparse support. Note that the definitions in Step 3 don’t actually need to be computed for all policies , as long as we can identify a policy for which . We can identify such a policy using one call to as follows.
First, note that for any policy , we have
Since is a constant independent of , we have
3 Epoch Schedule
4 Warm Start
We now present a different technique to reduce the number of calls to . This is based on the observation that practically speaking, it seems terribly wasteful, at the start of a new epoch, to throw out the results of all of the preceding computations and to begin yet again from nothing. Instead, intuitively, we expect computations to be more moderate if we begin again where we left off last, i.e., a “warm-start” approach. Here, when Algorithm 2 is called at the end of epoch , we use (the previously computed weights) rather than .
5 Computational Complexity
6 A Lower Bound on the Support Size
An attractive feature of the coordinate descent algorithm, Algorithm 2, is that the number of oracle calls is directly related to the number of policies in the support of . Specifically, for the doubling schedule of Section 3.3, Theorem 3 implies that we never have non-zero weights for more than policies in epoch . Similarly, the total number of oracle calls for the warm-start approach in Section 3.4 bounds the total number of policies which ever have non-zero weight over all rounds. The support size of the distributions in Algorithm 1 is crucial to the computational complexity of sampling an action (Step 4 of Algorithm 1).
In this section, we demonstrate a lower bound showing that it is not possible to construct substantially sparser distributions that also satisfy the low-variance constraint (3) in the optimization problem (OP). To formally define the lower bound, fix an epoch schedule and consider the following set of non-negative vectors over policies:
The proof of the theorem is deferred to Appendix E. In the context of our problem, this lower bound shows that the bounds in Lemma 2 and Lemma 3 are unimprovable, since the number of calls to is at least the size of the support, given our mode of access to .
Regret Analysis
In this section, we outline the regret analysis for our algorithm , with details deferred to Appendix B and Appendix C.
The rest of the analysis, which deviates from that of , compares the expected regret of any policy with the estimated regret using the variance constraints Eq. (3):
This lemma can easily be combined with the constraint Eq. (2) from (OP): since the weights used in any round in epoch satisfy , we obtain a bound on the (conditionally) expected regret in round using the above lemma: with high probability,
Summing these terms up over all rounds and applying martingale concentration gives the final regret bound in Theorem 2.
Analysis of the Optimization Algorithm
In this section, we give a sketch of the analysis of our main optimization algorithm for computing weights on each epoch as in Algorithm 2. As mentioned in Section 3.1, this analysis is based on a potential function.
Since our attention for now is on a single epoch , here and in what follows, when clear from context, we drop from our notation and write simply , , etc. Let be the uniform distribution over the action set . We define the following potential function for use on epoch :
The function in Eq. (6) is defined for all vectors . Also, denotes the unnormalized relative entropy between two nonnegative vectors and over the action space (or any set) :
This number is always nonnegative. Here, denotes the “distribution” (which might not sum to ) over induced by for context as given in Section 2.4. Thus, ignoring constants, this potential function is a combination of two terms: The first measures how far from uniform are the distributions induced by , and the second is an estimate of expected regret under since is proportional to the empirical regret of . Making small thus encourages to choose actions as uniformly as possible while also incurring low regret — exactly the aims of our algorithm. The constants that appear in this definition are for later mathematical convenience.
For further intuition, note that, by straightforward calculus, the partial derivative is roughly proportional to the variance constraint for given in Eq. (3) (up to a slight mismatch of constants). This shows that if this constraint is not satisfied, then is likely to be negative, meaning that can be decreased by increasing . Thus, the weight vector that minimizes satisfies the variance constraint for every policy . It turns out that this minimizing also satisfies the low regret constraint in Eq. (2), and also must sum to at most ; in other words, it provides a complete solution to our optimization problem. Algorithm 2 does not fully minimize , but it is based roughly on coordinate descent. This is because in each iteration one of the weights (coordinate directions) is increased. This weight is one whose corresponding partial derivative is large and negative.
To analyze the algorithm, we first argue that it is correct in the sense of satisfying the required constraints, provided that it halts.
If Algorithm 2 halts and outputs a weight vector , then the constraints Eq. (3) and Eq. (2) must hold, and furthermore the sum of the weights is at most .
The proof is rather straightforward: Following Step 4, Eq. (2) must hold, and also the weights must sum to . And if the algorithm halts, then for all , which is equivalent to Eq. (3).
What remains is the more challenging task of bounding the number of iterations until the algorithm does halt. We do this by showing that significant progress is made in reducing on every iteration. To begin, we show that scaling as in Step 4 cannot cause to increase.
Let be a weight vector such that , and let be as in Eq. (4). Then .
We consider as a function of , and argue that its derivative (with respect to ) at the value of given in the lemma statement is always nonnegative. Therefore, by convexity, it is nondecreasing for all values exceeding . Since , this proves the lemma. ∎
Next, we show that substantial progress will be made in reducing each time that Step 8 is executed.
Let denote a set of weights and suppose, for some policy , that . Let be a new set of weights which is an exact copy of except that where . Then
Proof sketch.
We first compute exactly the change in potential for general . Next, we apply a second-order Taylor approximation, which is maximized by the used in the algorithm. The Taylor approximation, for this , yields a lower bound which can be further simplified using the fact that always, and our assumption that . This gives the bound stated in the lemma. ∎
So Step 4 does not cause to increase, and Step 8 causes to decrease by at least the amount given in Lemma 7. This immediately implies Theorem 3: for , the initial potential is bounded by , and it is never negative, so the number of times Step 8 is executed is bounded by as required.
1 Epoching and Warm Start
We now turn to warm-start approach of Section 3.4, where in each epoch we initialize the coordinate descent algorithm with , i.e. the weights computed in the previous epoch . To analyze this, we bound how much the potential changes from at the end of epoch to at the very start of epoch . This, combined with our earlier results regarding how quickly Algorithm 2 drives down the potential, we are able to get an overall bound on the total number of updates across rounds.
Let be the largest integer for which . With probability at least , for all , the total epoch-to-epoch increase in potential is
where is the largest integer for which .
The potential function, as written in Eq. (6), naturally breaks into two pieces whose epoch-to-epoch changes can be bounded separately. Changes affecting the relative entropy term on the left can be bounded, regardless of , by taking advantage of the manner in which these distributions are smoothed. For the other term on the right, it turns out that these epoch-to-epoch changes are related to statistical quantities which can be bounded with high probability. Specifically, the total change in this term is related first to how the estimated reward of the empirically best policy compares to the expected reward of the optimal policy; and second, to how the reward received by our algorithm compares to that of the optimal reward. From our regret analysis, we are able to show that both of these quantities will be small with high probability. ∎
Experimental Evaluation
A natural solution is to use an online oracle that is stateful and accepts examples one by one. An online cost-sensitive classification (CSC) oracle takes as input a weighted example and returns a predicted class (corresponding to one of actions in our setting). Since the oracle is stateful, it remembers and uses examples from all previous calls in answering questions, thereby reducing the complexity of each oracle invocation to as in supervised learning. Using several such oracles, we can efficiently track a distribution over good policies and sample from it. We detail this approach (which we call Online Cover) in the full version of the paper. The algorithm maintains a uniform distribution over a fixed number of policies where is a parameter of the algorithm. Upon receiving a fresh example, it updates all policies with the suitable CSC examples (Eq. (5)). The specific CSC oracle we use is a reduction to squared-loss regression (Algorithms 4 and 5 of Beygelzimer and Langford (2009)) which is amenable to online updates. Our implementation is included in Vowpal Wabbit.http://hunch.net/~vw. The implementation is in the file cbify.cc and is enabled using --cover.
Due to lack of public datasets for contextual bandit problems, we use a simple supervised-to-contextual-bandit transformation (Dudík et al., 2011b) on the CCAT document classification problem in RCV1 (Lewis et al., 2004). This dataset has examples and TF-IDF features. We treated the class labels as actions, and one minus 0/1-loss as the reward. Our evaluation criteria is progressive validation (Blum et al., 1999) on 0/1 loss. We compare several baseline algorithms to Online Cover; all algorithms take advantage of linear representations which are known to work well on this dataset. For each algorithm, we report the result for the best parameter settings (shown in Table 1).
-greedy (Sutton and Barto, 1998) explores randomly with probability and otherwise exploits.
Explore-first is a variant that begins with uniform exploration, then switches to an exploit-only phase.
A less common but powerful baseline is based on bagging: multiple predictors (policies) are trained with examples sampled with replacement. Given a context, these predictors yield a distribution over actions from which we can sample.
LinUCB (Auer, 2002; Chu et al., 2011) has been quite effective in past evaluations (Li et al., 2010; Chapelle and Li, 2011). It is impractical to run “as is” due to high-dimensional matrix inversions, so we report results for this algorithm after reducing to dimensions via random projections. Still, the algorithm required hoursThe linear algebra routines are based on Intel MKL package.. An alternative is to use diagonal approximation to the covariance, which runs substantially faster (1 hour), but gives a worse error of 0.137.
Finally, our algorithm achieves the best loss of . Somewhat surprisingly, the minimum occurs for us with a cover set of size 1—apparently for this problem the small decaying amount of uniform random sampling imposed is adequate exploration. Prediction performance is similar with a larger cover set.
All baselines except for LinUCB are implemented as a simple modification of Vowpal Wabbit. All reported results use default parameters where not otherwise specified. The contextual bandit learning algorithms all use a doubly robust reward estimator instead of the importance weighted estimators used in our analysis Dudík et al. (2011b).
Because RCV1 is actually a fully supervised dataset, we can apply a fully supervised online multiclass algorithm to solve it. We use a simple one-against-all implementation to reduce this to binary classification, yielding an error rate of which is competitive with the best previously reported results. This is effectively a lower bound on the loss we can hope to achieve with algorithms using only partial information. Our algorithm is less than 2.3 times slower and nearly achieves the bound. Hence on this dataset, very little further algorithmic improvement is possible.
Conclusions
In this paper we have presented the first practical algorithm to our knowledge that attains the statistically optimal regret guarantee and is computationally efficient in the setting of general policy classes. A remarkable feature of the algorithm is that the total number of oracle calls over all rounds is sublinear—a remarkable improvement over previous works in this setting. We believe that the online variant of the approach which we implemented in our experiments has the right practical flavor for a scalable solution to the contextual bandit problem. In future work, it would be interesting to directly analyze the Online Cover algorithm.
We thank Dean Foster and Matus Telgarsky for helpful discussions. Part of this work was completed while DH and RES were visiting Microsoft Research.
References
Appendix A Omitted Algorithm Details
Algorithm 3 and Algorithm 4 give the details of the inverse propensity scoring transformation and the action sampling procedure .
Appendix B Deviation Inequalities
The following form of Freedman’s inequality for martingales is from Beygelzimer et al. (2011).
B.2 Variance Bounds
Fix the epoch schedule .
Define the following for any probability distribution over , , and :
The proof of the following lemma is essentially the same as that of Theorem 6 from Dudík et al. (2011a).
Using the probabilistic method (for more details, we refer the reader to the proof of Theorem 6 from Dudík et al. (2011a)), it can be shown that for any probability distribution over , any , any , and any , there exists an -point distribution over such that
where .
Combining the displayed inequalities (using ) and rearranging gives
If and , then and , and hence
B.3 Reward Estimates
are the non-negative weights computed at the end of epoch ;
is the probability distribution over obtained from and the policy with the highest reward estimate through epoch ;
is the probability distribution used to choose .
where . Round is in epoch , so
Appendix C Regret Analysis
Throughout this section, we fix the allowed probability of failure provided as input to the algorithm, as well as the epoch schedule .
Recall that we assume ; thus .
C.2 Deviation Control and Optimization Constraints
Let be the event in which the following statements hold:
Recall that (as defined in (OP), assuming ). Define and (needed for the next Lemma 12). With these settings, the proof of Lemma 13 will require that , and hence ; this is true with our setting of since .
C.3 Proof of Theorem 2
We now give the proof of Theorem 2, following the outline in Section 4.
The following lemma shows that if is large—specifically, much larger than —then the estimated regret of was large in some previous round.
The probability distribution satisfies the inequalities
Above, the first inequality follows because the value of decreases as the value of increases, as it does when going from to ; the second inequality is the constraint Eq. (16) satisfied by . Combining the displayed inequalities from above proves the claim. ∎
Assume event holds. Let . For all epochs , all rounds in epoch , and all policies ,
The proof is by induction on . As the base case, consider and in epoch . By definition of , for all , so for all by Lemma 12. By Eq. (14), which holds in event , for all ,
where we use the fact that for . This implies
by the triangle inequality and optimality of and . Since and , it follows that .
For the inductive step, fix some epoch . We assume as the inductive hypothesis that for all epochs , all rounds in epoch , and all ,
for all rounds in epoch and all . So fix such a round and policy ; by Eq. (14) (which holds in event ),
Above, the first inequality follows from the optimality of . By Lemma 12, there exist epochs such that
Suppose , so : in this case, the inductive hypothesis implies
where the second inequality uses the fact that . Therefore,
Now suppose , so : as above, the inductive hypothesis implies
since . Therefore,
Combining Eq. (18), Eq. (19), and Eq. (20), and rearranging gives
Since , it follows that by definition of . Moreover, since , Applying these inequalities to the above display, and simplifying, yields Eq. (17) because and .
for all . Again, fix an arbitrary , and by Eq. (14),
where the first inequality follows from the optimality of . By Lemma 12, there exists an epoch such
Suppose , so : in this case the inductive hypothesis and Eq. (17) imply
(the last equality follows because ). Thus
Combining Eq. (22), Eq. (23), and Eq. (19) gives
Again, applying the inequalities and to the above display, and simplifying, yields Eq. (21) because and . This completes the inductive step, and thus proves the overall claim. ∎
The next lemma shows that the “low estimated regret guarantee” of (optimization constraint Eq. (15)) also implies a “low regret guarantee”, via the comparison of to from Lemma 13.
The first step follows from Lemma 13, as all rounds in an epoch satisfy ; the second step follows from the fact that is a probability distribution, that for some , and that ; and the last step follows from the constraint Eq. (15) satisfied by . ∎
Finally, we straightforwardly translate the “low regret guarantee” from Lemma 14 to a bound on the cumulative regret of the algorithm. This involves summing the bound in Lemma 14 over all rounds (Lemma 15 and Lemma 16) and applying a martingale concentration argument (Lemma 17).
We break the sum over rounds into the epochs, and bound the sum within each epoch:
Above, the first step uses the fact that and . The second step uses the definition of . The third step simplifies the sum over and uses the bound . The remaining steps use an integral bound which is then directly evaluated (recalling that ). ∎
Under the epoch schedule condition , we have whenever ; also, whenever . The conclusion follows by applying Lemma 15. ∎
where and is defined in Lemma 13.
with probability at least . By Lemma 10, Lemma 11, and a union bound, the event holds with probability at least . Hence, by another union bound, with probability at least , event holds and the regret of the algorithm is bounded by
The double summation above is bounded by Lemma 14 and Lemma 16:
By the definition of , . Since by assumption, it follows that . ∎
Theorem 2 follows from Lemma 17 and the fact that whenever .
There is one last result implied by Lemma 12 and Lemma 13 that is used elsewhere.
Assume event holds, and is such that . Then
Let achieve the in the definition of . If , then , and
for . Above, the second inequality follows by Lemma 13. If , then the same bound also holds. Using this bound, we obtain from Eq. (14),
where the last inequality follows from Lemma 13. The claim follows because and . ∎
Appendix D Details of Optimization Analysis
Following the execution of Step 4, we must have
This is because, if the condition in Step 7 does not hold, then Eq. (24) is already true. Otherwise, is replaced by , and for this set of weights, Eq. (24) in fact holds with equality. Note that, since all quantities are nonnegative, Eq. (24) immediately implies both Eq. (2), and that .
Furthermore, at the point where the algorithm halts at Step 10, it must be that for all policies , . However, unraveling definitions, we can see that this is exactly equivalent to Eq. (3). ∎
D.2 Proof of Lemma 6
To see the inequality in Eq. (26), let us fix and define . Then by Eq. (4). Further, the expression inside the expectation in Eq. (26) is equal to
Eq. (27) uses Jensen’s inequality, combined with the fact that the function is concave (as a function of ). Eq. (28) uses the fact that the function is nondecreasing (in ), and that the ’s sum to at most .
Thus, plugging Eq. (26) into Eq. (25) yields
by our definition of . Since is convex, this means that is nondecreasing for all values exceeding . In particular, since , this gives
D.3 Proof of Lemma 7
We first compute the change in potential for general . Note that if , and otherwise
Thus, most of the terms defining are left unchanged by the update. In particular, by a direct calculation:
Eq. (D.3) uses the bound which holds for (by Taylor’s theorem). Eq. (31) holds by our choice of , which was chosen to maximize Eq. (30). By assumption, , which implies . Further, since always, we have
Plugging into Eq. (31) completes the lemma. ∎
D.4 Proof of Lemma 8
We break the potential of Eq. (6) into pieces and bound the total change in each separately. Specifically, by straightforward algebra, we can write
We assume throughout that as will always be the case for the vectors produced by Algorithm 2. For such a vector ,
since is nondecreasing. This means we can essentially disregard the change in this term.
Also, note that does not depend on . Therefore, for this term, we get a telescoping sum:
since , and where , used in the definition of , is defined in Eq. (12).
Note that since and . Thus,
Eq. (32) uses , and also
using . A sum over the two terms appearing in Eq. (32) can now be bounded separately. Starting with the one on the left, since and , we have
For the second term in Eq. (32), using for , and definition of , we have
by Lemma 15. Combining Eqs. (32), (33) and (34) gives the statement of the lemma. ∎
Finally, we come to , which, by definition of , can be rewritten as
where and is the same as appears in optimization problem (OP). Note that, conveniently,
where is the cumulative empirical importance-weighted reward through round :
We separately bound the two parenthesized expressions in Eq. (35) when summed over all epochs. Beginning with the first one, we have
But by Lemma 18 (and under the same assumptions),
where is the constant appearing in Lemma 18.
For the second parenthesized expression of Eq. (35), let us define random variables
Note that is nonnegative, and if , then
The expectation that appears here can be computed to be
by Lemma 14 (under the same assumptions, and using the same constants). Thus, with high probability,
Combining the above bound with our earlier inequality Eq. (36), and applying the union bound, we find that with probability at least , for all (and corresponding ),
Combining the bounds on the separate pieces, we get the bound stated in the lemma.
D.5 Proof of Lemma 3
Appendix E Proof of Theorem 4
Recall the earlier definition of the low-variance distribution set
Below, we use a policy class where every policy has no regret (), in which case Lemma 13 implies
(to make into a probability distribution , the leftover mass can be put on any policy, say, already in the support of ). That is, with high probability, for every relevant epoch , every satisfies Eq. (37) for all .
Next, we construct an instance with the property that these inequalities cannot be satisfied by a very sparse . An instance is drawn uniformly at random from different contexts denoted as (where we set, with foresight, ). The reward structure in the problem will be extremely simple, with action always obtaining a reward of 1, while all the other actions obtain a reward of 0, independent of the context. The distribution will be uniform over the contexts (with these deterministic rewards). Our policy set will consist of separate policies, indexed by and . Policy has the property that
In words, policy takes action on context , and action on all other contexts. Given the uniform distribution over contexts and our reward structure, each policy obtains an identical reward
In particular, each policy has a zero expected regret as required.
Finally, observe that on context , is the unique policy taking action . Hence we have that and . Now, let us consider the constraint Eq. (37) for the policy . The left-hand side of this constraint can be simplified as
If the distribution does not put any support on the policy , then , and thus
(since ). Such a distribution violates Eq. (37), which means that every must have . Since this is true for each policy , we see that every has
Appendix F Online Cover algorithm
This section describes the pseudocode of the precise algorithm use in our experiments (Algorithm 5). The minimum exploration probability was set as for our evaluation.
Two additional details are important in Step 9:
We pass a cost vector rather than a reward vector to the oracle since we have a loss minimization rather than a reward maximization oracle.
We actually used a doubly robust estimate Dudík et al. (2011b) with a linear reward function that was trained in an online fashion.