Efficient Optimal Learning for Contextual Bandits

Miroslav Dudik, Daniel Hsu, Satyen Kale, Nikos Karampatziakis, John Langford, Lev Reyzin, Tong Zhang

INTRODUCTION

The contextual bandit setting consists of the following loop repeated indefinitely:

The world presents context information as features xx.

The learning algorithm chooses an action aa from KK possible actions.

The world presents a reward rr for the action.

The key difference between the contextual bandit setting and standard supervised learning is that only the reward of the chosen action is revealed. For example, after always choosing the same action several times in a row, the feedback given provides almost no basis to prefer the chosen action over another action. In essence, the contextual bandit setting captures the difficulty of exploration while avoiding the difficulty of credit assignment as in more general reinforcement learning settings.

The contextual bandit setting is a half-way point between standard supervised learning and full-scale reinforcement learning where it appears possible to construct algorithms with convergence rate guarantees similar to supervised learning. Many natural settings satisfy this half-way point, motivating the investigation of contextual bandit learning. For example, the problem of choosing interesting news articles or ads for users by internet companies can be naturally modeled as a contextual bandit setting. In the medical domain where discrete treatments are tested before approval, the process of deciding which patients are eligible for a treatment takes contexts into account. More generally, we can imagine that in a future with personalized medicine, new treatments are essentially equivalent to new actions in a contextual bandit setting.

In the i.i.d. setting, the world draws a pair (x,r⃗)(x,\vec{r}) consisting of a context and a reward vector from some unknown distribution DD, revealing xx in Step 1, but only the reward r(a)r(a) of the chosen action aa in Step 3. Given a set of policies Π={π:X→A}\Pi=\{\pi:X\rightarrow A\}, the goal is to create an algorithm for Step 2 which competes with the set of policies. We measure our success by comparing the algorithm’s cumulative reward to the expected cumulative reward of the best policy in the set. The difference of the two is called regret.

All existing algorithms for this setting either achieve a suboptimal regret (Langford and Zhang, 2007) or require computation linear in the number of policies (Auer et al., 2002b; Beygelzimer et al., 2011). In unstructured policy spaces, this computational complexity is the best one can hope for. On the other hand, in the case where the rewards of all actions are revealed, the problem is equivalent to cost-sensitive classification, and we know of algorithms to efficiently search the space of policies (classification rules) such as cost-sensitive logistic regression and support vector machines. In these cases, the space of classification rules is exponential in the number of features, but these problems can be efficiently solved using convex optimization.

All previous regret-optimal approaches are measure based—they work by updating a measure over policies, an operation which is linear in the number of policies. In contrast, regret guarantees scale only logarithmically in the number of policies. If not for the computational bottleneck, these regret guarantees imply that we could dramatically increase performance in contextual bandit settings using more expressive policies. We overcome the computational bottleneck using an algorithm which works by creating cost-sensitive classification instances and calling an oracle to choose optimal policies. Actions are chosen based on the policies returned by the oracle rather than according to a measure over all policies. This is reminiscent of AdaBoost (Freund and Schapire, 1997), which creates weighted binary classification instances and calls a “weak learner” oracle to obtain classification rules. These classification rules are then combined into a final classifier with boosted accuracy. Similarly as AdaBoost converts a weak learner into a strong learner, our approach converts a cost-sensitive classification learner into an algorithm that solves the contextual bandit problem.

In a more difficult version of contextual bandits, an adversary chooses (x,r⃗)(x,\vec{r}) given knowledge of the learning algorithm (but not any random numbers). All known regret-optimal solutions in the adversarial setting are variants of the EXP4 algorithm (Auer et al., 2002b). EXP4 achieves the same regret rate as our algorithm: O(KTln⁡N)O\left(\sqrt{KT\ln N}\right), where TT is the number of time steps, KK is the number of actions available in each time step, and NN is the number of policies.

Why not use EXP4 in the i.i.d. setting? For example, it is known that the algorithm can be modified to succeed with high probability (Beygelzimer et al., 2011), and also for VC classes when the adversary is constrained to i.i.d. sampling. There are two central benefits that we hope to realize by directly assuming i.i.d. contexts and reward vectors.

Computational Tractability. Even when the reward vector is fully known, adversarial regrets scale as O(ln⁡N)O\left(\sqrt{\ln N}\right) while computation scales as O(N)O(N) in general. One attempt to get around this is the follow-the-perturbed-leader algorithm (Kalai and Vempala, 2005) which provides a computationally tractable solution in certain special-case structures. This algorithm has no mechanism for efficient application to arbitrary policy spaces, even given an efficient cost-sensitive classification oracle. An efficient cost-sensitive classification oracle has been shown effective in transductive settings (Kakade and Kalai, 2005). Aside from the drawback of requiring a transductive setting, the regret achieved there is substantially worse than for EXP4.

Improved Rates. When the world is not completely adversarial, it is possible to achieve substantially lower regrets than are possible with algorithms optimized for the adversarial setting. For example, in supervised learning, it is possible to obtain regrets scaling as O(log⁡(T))O(\log(T)) with a problem dependent constant (Bartlett et al., 2007). When the feedback is delayed by τ\tau rounds, lower bounds imply that the regret in the adversarial setting increases by a multiplicative τ\sqrt{\tau} while in the i.i.d. setting, it is possible to achieve an additive regret of τ\tau (Langford et al., 2009).

In a direct i.i.d. setting, the previous-best approach using a cost-sensitive classification oracle was given by ϵ\epsilon-greedy and epoch greedy algorithms (Langford and Zhang, 2007) which have a regret scaling as O(T2/3)O(T^{2/3}) in the worst case.

There have also been many special-case analyses. For example, theory of context-free setting is well understood (Lai and Robbins, 1985; Auer et al., 2002a; Even-Dar et al., 2006). Similarly, good algorithms exist when rewards are linear functions of features (Auer, 2002) or actions lie in a continuous space with the reward function sampled according to a Gaussian process (Srinivas et al., 2010).

2 WHAT WE PROVE

In Section 3 we state the PolicyElimination algorithm, and prove the following regret bound for it.

For all distributions DD over (x,r⃗)(x,\vec{r}) with KK actions, for all sets of NN policies Π\Pi, with probability at least 1−δ1-\delta, the regret of PolicyElimination (Algorithm 1) over TT rounds is at most

This result can be extended to deal with VC classes, as well as other special cases. It forms the simplest method we have of exhibiting the new analysis.

The new key element of this algorithm is identification of a distribution over actions which simultaneously achieves small expected regret and allows estimating value of every policy with small variance. The existence of such a distribution is shown nonconstructively by a minimax argument.

PolicyElimination is computationally intractable and also requires exact knowledge of the context distribution (but not the reward distribution!). We show how to address these issues in Section 4 using an algorithm we call RandomizedUCB. Namely, we prove the following theorem.

For all distributions DD over (x,r⃗)(x,\vec{r}) with KK actions, for all sets of NN policies Π\Pi, with probability at least 1−δ1-\delta, the regret of RandomizedUCB (Algorithm 2) over TT rounds is at most

RandomizedUCB’s analysis is substantially more complex, with a key subroutine being an application of the ellipsoid algorithm with a cost-sensitive classification oracle (described in Section 5). RandomizedUCB does not assume knowledge of the context distribution, and instead works with the history of contexts it has observed. Modifying the proof for this empirical distribution requires a covering argument over the distributions over policies which uses the probabilistic method. The net result is an algorithm with a similar top-level analysis as PolicyElimination, but with the running time only poly-logarithmic in the number of policies given a cost-sensitive classification oracle.

Apart from a tractable algorithm, our analysis can be used to derive tighter regrets than would be possible in adversarial setting. For example, in Section 6, we consider a common setting where reward feedback is delayed by τ\tau rounds. A straightforward modification of PolicyElimination yields a regret with an additive term proportional to τ\tau compared with the delay-free setting. Namely, we prove the following.

For all distributions DD over (x,r⃗)(x,\vec{r}) with KK actions, for all sets of NN policies Π\Pi, and all delay intervals τ\tau, with probability at least 1−δ1-\delta, the regret of DelayedPE (Algorithm 3) is at most

We start next with precise settings and definitions.

SETTING AND DEFINITIONS

Let AA be the set of KK actions, let XX be the domain of contexts xx, and let DD be an arbitrary joint distribution on (x,r⃗)(x,\vec{r}). We denote the marginal distribution of DD over XX by DXD_{X}.

We denote Π\Pi to be a finite set of policies {π:X→A}\{\pi:X\rightarrow A\}, where each policy π\pi, given a context xtx_{t} in round tt, chooses the action π(xt)\pi(x_{t}). The cardinality of Π\Pi is denoted by NN. Let r⃗t∈K\vec{r}_{t}\in^{K} be the vector of rewards, where rt(a)r_{t}(a) is the reward of action aa on round tt.

In the i.i.d. setting, on each round t=1…Tt=1\ldots T, the world chooses (xt,r⃗t)(x_{t},\vec{r}_{t}) i.i.d. according to DD and reveals xtx_{t} to the learner. The learner, having access to Π\Pi, chooses action at∈{1,…,K}a_{t}\in\{1,\ldots,K\}. Then the world reveals reward rt(at)r_{t}(a_{t}) (which we call rtr_{t} for short) to the learner, and the interaction proceeds to the next round.

We consider two modes of accessing the set of policies Π\Pi. The first option is through the enumeration of all policies. This is impractical in general, but suffices for the illustrative purpose of our first algorithm. The second option is an oracle access, through an argmax oracle, corresponding to a cost-sensitive learner:

The reason why the above can be viewed as a cost-sensitive classification oracle is that vectors of rewards r⃗t′\vec{r}_{t^{\prime}} can be interpreted as negative costs and hence the policy returned by AMO\mathcal{AMO} is the optimal cost-sensitive classifier on the given data.

2 EXPECTED AND EMPIRICAL REWARDS

Let the expected instantaneous reward of a policy π∈Π\pi\in\Pi be denoted by

The best policy πmax⁡∈Π\pi_{\max}\in\Pi is that which maximizes ηD(π)\eta_{D}(\pi). More formally,

We define hth_{t} to be the history at time tt that the learner has seen. Specifically

where pt′p_{t^{\prime}} is the probability of the algorithm choosing action at′a_{t^{\prime}} at time t′t^{\prime}. Note that at′a_{t^{\prime}} and pt′p_{t^{\prime}} are produced by the learner while xt′,rt′x_{t^{\prime}},r_{t^{\prime}} are produced by nature. We write x∼hx\sim h to denote choosing xx uniformly at random from the xx’s in history hh.

Using the history of past actions and probabilities with which they were taken, we can form an unbiased estimate of the policy value for any π∈Π\pi\in\Pi:

3 REGRET

The goal of this work is to obtain a learner that has small regret relative to the expected performance of πmax⁡\pi_{\max} over TT rounds, which is

We say that the regret of the learner over TT rounds is bounded by ϵ\epsilon with probability at least 1−δ1-\delta, if

where the probability is taken with respect to the random pairs (xt,r⃗t)∼D(x_{t},\vec{r}_{t})\sim D for t=1…Tt=1\dotsc T, as well as any internal randomness used by the learner.

We can also define notions of regret and empirical regret for policies π\pi. For all π∈Π\pi\in\Pi, let

Our algorithms work by choosing distributions over policies, which in turn then induce distributions over actions. For any distribution PP over policies Π\Pi, let WP(x,a)W_{P}(x,a) denote the induced conditional distribution over actions aa given the context xx:

In general, we shall use WW, W′W^{\prime} and ZZ as conditional probability distributions over the actions AA given contexts XX, i.e., W:X×A→W:X\times A\to such that W(x,⋅)W(x,\cdot) is a probability distribution over AA (and similarly for W′W^{\prime} and ZZ). We shall think of W′W^{\prime} as a smoothed version of WW with a minimum action probability of μ\mu (to be defined by the algorithm), such that

Conditional distributions such as WW (and W′W^{\prime}, ZZ, etc.) correspond to randomized policies. We define notions true and empirical value and regret for them as follows:

POLICY ELIMINATION

The basic ideas behind our approach are demonstrated in our first algorithm: PolicyElimination (Algorithm 1).

The key step is Step 1, which finds a distribution over policies which induces low variance in the estimate of the value of all policies. Below we use minimax theorem to show that such a distribution always exists. How to find this distribution is not specified here, but in Section 5 we develop a method based on the ellipsoid algorithm. Step 2 then projects this distribution onto a distribution over actions and applies smoothing. Finally, Step 5 eliminates the policies that have been determined to be suboptimal (with high probability).

We analyze PolicyElimination in several steps. First, we prove the existence of PtP_{t} in Step 1, provided that Πt−1\Pi_{t-1} is non-empty. We recast the feasibility problem in Step 1 as a game between two players: Prover, who is trying to produce PtP_{t}, and Falsifier, who is trying to find π\pi violating the constraints. We give more power to Falsifier and allow him to choose a distribution over π\pi (i.e., a randomized policy) which would violate the constraints.

Let C\mathcal{C} be a compact and convex set of randomized policies. Let μ∈(0,1/K]\mu\in(0,1/K] and for any W∈CW\in\mathcal{C}, W′(x,a)≐(1−Kμ)W(x,a)+μW^{\prime}(x,a)\doteq(1-K\mu)W(x,a)+\mu. Then for all distributions DD,

everywhere defined: Since W′(x,a)≥μW^{\prime}(x,a)\geq\mu, we obtain that 1/W′(x,a)∈[0,1/μ]1/W^{\prime}(x,a)\in[0,1/\mu], hence the expectations are defined for all WW and ZZ.

linear in ZZ: Linearity follows from rewriting f(W,Z)f(W,Z) as

convex in WW: Note that 1/W′(x,a)1/W^{\prime}(x,a) is convex in W(x,a)W(x,a) by convexity of 1/(c1w+c2)1/(c_{1}w+c_{2}) in w≥0w\geq 0, for c1≥0c_{1}\geq 0, c2>0c_{2}>0. Convexity of f(W,Z)f(W,Z) in WW then follows by taking expectations over xx and aa.

Hence, by Theorem 14 (in Appendix B), min and max can be reversed without affecting the value:

The right-hand side can be further upper-bounded by max⁡Z∈Cf(Z,Z)\max_{Z\in\mathcal{C}}f(Z,Z), which is upper-bounded by

The set of distributions satisfying constraints of Step 1 is non-empty.

Given the existence of PtP_{t}, we will see below that the constraints in Step 1 ensure low variance of the policy value estimator ηt(π)\eta_{t}(\pi) for all π∈Πt−1\pi\in\Pi_{t-1}. The small variance is used to ensure accuracy of policy elimination in Step 5 as quantified in the following lemma:

With probability at least 1−δ1-\delta, for all tt:

πmax⁡∈Πt\pi_{\max}\in\Pi_{t} (i.e., Πt\Pi_{t} is non-empty)

ηD(πmax⁡)−ηD(π)≤4bt\eta_{D}(\pi_{\max})-\eta_{D}(\pi)\leq 4b_{t} for all π∈Πt\pi\in\Pi_{t}

We will show that for any policy π∈Πt−1\pi\in\Pi_{t-1}, the probability that ηt(π)\eta_{t}(\pi) deviates from ηD(π)\eta_{D}(\pi) by more that btb_{t} is at most 2δt2\delta_{t}. Taking the union bound over all policies and all time steps we find that with probability at least 1−δ1-\delta,

for all tt and all π∈Πt−1\pi\in\Pi_{t-1}. Then:

By the triangle inequality, in each time step, ηt(π)≤ηt(πmax⁡)+2bt\eta_{t}(\pi)\leq\eta_{t}(\pi_{\max})+2b_{t} for all π∈Πt−1\pi\in\Pi_{t-1}, yielding the first part of the lemma.

Also by the triangle inequality, if ηD(π)<ηD(πmax⁡)−4bt\eta_{D}(\pi)<\eta_{D}(\pi_{\max})-4b_{t} for π∈Πt−1\pi\in\Pi_{t-1}, then ηt(π)<ηt(πmax⁡)−2bt\eta_{t}(\pi)<\eta_{t}(\pi_{\max})-2b_{t}. Hence the policy π\pi is eliminated in Step 5, yielding the second part of the lemma.

It remains to show Eq. (3.1). We fix the policy π∈Π\pi\in\Pi and time tt, and show that the deviation bound is violated with probability at most 2δt2\delta_{t}. Our argument rests on Freedman’s inequality (see Theorem 13 in Appendix A). Let

Since rt∈r_{t}\in and Wt′(at)≥μtW^{\prime}_{t}(a_{t})\geq\mu_{t}, we have the bound

where Eq. (3.2) follows by boundedness of rtr_{t} and Eq. (3.3) follows from the constraints in Step 1. Hence,

Since (ln⁡t)/t(\ln t)/t is decreasing for t≥3t\geq 3, we obtain that μt\mu_{t} is non-increasing (by separately analyzing t=1t=1, t=2t=2, t≥3t\geq 3). Let t0t_{0} be the first tt such that μt<1/2K\mu_{t}<1/2K. Note that bt≥4Kμtb_{t}\geq 4K\mu_{t}, so for t<t0t<t_{0}, we have bt≥2b_{t}\geq 2 and Πt=Π\Pi_{t}=\Pi. Hence, the deviation bound holds for t<t0t<t_{0}.

Let t≥t0t\geq t_{0}. For t′≤tt^{\prime}\leq t, by the monotonicity of μt\mu_{t}

Hence, the assumptions of Theorem 13 are satisfied, and

The union bound over π\pi and tt yields Eq. (3.1). ∎

This immediately implies that the cumulative regret is bounded by

For all distributions DD over (x,r⃗)(x,\vec{r}) with KK actions, for all sets of NN policies Π\Pi, with probability at least 1−δ1-\delta, the regret of PolicyElimination (Algorithm 1) over TT rounds is at most

THE RANDOMIZED UCB ALGORITHM

PolicyElimination is the simplest exhibition of the minimax argument, but it has some drawbacks:

The algorithm keeps explicit track of the space of good policies (like a version space), which is difficult to implement efficiently in general.

If the optimal policy is mistakenly eliminated by chance, the algorithm can never recover.

The algorithm requires perfect knowledge of the distribution DXD_{X} over contexts.

These difficulties are addressed by RandomizedUCB (or RUCB for short), an algorithm which we present and analyze in this section. Our approach is reminiscent of the UCB algorithm (Auer et al., 2002a), developed for context-free setting, which keeps an upper-confidence bound on the expected reward for each action. However, instead of choosing the highest upper confidence bound, we randomize over choices according to the value of their empirical performance. The algorithm has the following properties:

The optimization step required by the algorithm always considers the full set of policies (i.e., explicit tracking of the set of good policies is avoided), and thus it can be efficiently implemented using an argmax oracle. We discuss this further in Section 5.

Suboptimal policies are implicitly used with decreasing frequency by using a non-uniform variance constraint that depends on a policy’s estimated regret. A consequence of this is a bound on the value of the optimization, stated in Lemma 7 below.

Instead of DXD_{X}, the algorithm uses the history of previously seen contexts. The effect of this approximation is quantified in Theorem 6 below.

The regret of RandomizedUCB is the following:

For all distributions DD over (x,r⃗)(x,\vec{r}) with KK actions, for all sets of NN policies Π\Pi, with probability at least 1−δ1-\delta, the regret of RandomizedUCB (Algorithm 2) over TT rounds is at most

The proof is given in Appendix D.4. Here, we present an overview of the analysis.

A key technical prerequisite for the regret analysis is the accuracy of the empirical variance estimates. For a distribution PP over policies Π\Pi and a particular policy π∈Π\pi\in\Pi, define

The first quantity VP,π,tV_{P,\pi,t} is (a bound on) the variance incurred by an importance-weighted estimate of reward in round tt using the action distribution induced by PP, and the second quantity V^P,π,t\widehat{V}_{P,\pi,t} is an empirical estimate of VP,π,tV_{P,\pi,t} using the finite sample {x1,…,xt−1}⊆X\{x_{1},\dotsc,x_{t-1}\}\subseteq X drawn from DXD_{X}. We show that for all distributions PP and all π∈Π\pi\in\Pi, V^P,π,t\widehat{V}_{P,\pi,t} is close to VP,π,tV_{P,\pi,t} with high probability.

For any ϵ∈(0,1)\epsilon\in(0,1), with probability at least 1−δ1-\delta,

for all distributions PP over Π\Pi, all π∈Π\pi\in\Pi, and all t≥16Klog⁡(8KN/δ)t\geq 16K\log(8KN/\delta).

2 REGRET ANALYSIS

Central to the analysis is the following lemma that bounds the value of the optimization in each round. It is a direct corollary of Lemma 24 in Appendix D.4.

If OPT⁡t\operatorname{OPT}_{t} is the value of the optimization problem (4.1) in round tt, then

This lemma implies that the algorithm is always able to select a distribution over the policies that focuses mostly on the policies with low estimated regret. Moreover, the variance constraints ensure that good policies never appear too bad, and that only bad policies are allowed to incur high variance in their reward estimates. Hence, minimizing the objective in (4.1) is an effective surrogate for minimizing regret.

The bulk of the analysis consists of analyzing the variance of the importance-weighted reward estimates ηt(π)\eta_{t}(\pi), and showing how they relate to their actual expected rewards ηD(π)\eta_{D}(\pi). The details are deferred to Appendix D.

USING AN ARGMAX ORACLE

In this section, we show how to solve the optimization problem (4.1) using the argmax oracle (AMO\mathcal{AMO}) for our set of policies. Namely, we describe an algorithm running in polynomial time independentOr rather dependent only on log⁡N\log N, the representation size of a policy. of the number of policies, which makes queries to AMO\mathcal{AMO} to compute a distribution over policies suitable for the optimization step of Algorithm 2.

This algorithm relies on the ellipsoid method. The ellipsoid method is a general technique for solving convex programs equipped with a separation oracle. A separation oracle is defined as follows:

We now write a convex program whose solution is the required distribution, and show how to solve it using the ellipsoid method by giving a separation oracle for its feasible set using AMO\mathcal{AMO}.

We claim that this program is equivalent to the RUCB optimization problem (4.1), up to finding an explicit distribution over policies which corresponds to the optimal solution. This can be seen as follows. Since we require W∈CW\in\mathcal{C}, it can be interpreted as being equal to WPW_{P} for some distribution over policies PP. The constraints (5.3) are equivalent to (4.1) by substitution Z=WQZ=W_{Q}.

The above convex program can be solved by performing a binary search over ss and testing feasibility of the constraints. For a fixed value of ss, the feasibility problem defined by (5.1)–(5.3) is denoted by A\mathcal{A}.

We now give a sketch of how we construct a separation oracle for the feasible region of A\mathcal{A}. The details of the algorithm are a bit complicated due to the fact that we need to ensure that the feasible region, when non-empty, has a non-negligible volume (recall the requirements of Lemma 8). This necessitates having a small error in satisfying the constraints of the program. We leave the details to Appendix E. Modulo these details, the construction of the separation oracle essentially implies that we can solve A\mathcal{A}.

Before giving the construction of the separation oracle, we first show that AMO\mathcal{AMO} allows us to do linear optimization over C\mathcal{C} efficiently:

The sequence for AMO\mathcal{AMO} consists of xt′∈Xt−1x_{t^{\prime}}\in\mathcal{X}_{t-1} and r⃗t′(a)=w(xt′,a)\vec{r}_{t^{\prime}}(a)=w(x_{t^{\prime}},a). The lemma now follows since w⋅π=∑x∈Xt−1w(x,π(x))w\cdot\pi=\sum_{x\in\mathcal{X}_{t-1}}w(x,\pi(x)). ∎

We need another simple technical lemma which explains how to get a separating hyperplane for violations of convex constraints:

Let g(x)=f(y)+∇f(y)⋅(x−y)g(x)=f(y)+\nabla f(y)\cdot(x-y). By the convexity of ff, we have f(x)≥g(x)f(x)\geq g(x) for all xx. Thus, for any x∈Kx\in K, we have g(x)≤f(x)≤0g(x)\leq f(x)\leq 0. Since g(y)=f(y)>0g(y)=f(y)>0, we conclude that g(x)=0g(x)=0 separates yy from KK. ∎

Now given a candidate point WW, a separation oracle can be constructed as follows. We check whether WW satisfies the constraints of A\mathcal{A}. If any constraint is violated, then we find a hyperplane separating WW from all points satisfying the constraint.

First, for constraint (5.1), note that ηt−1(W)\eta_{t-1}(W) is linear in WW, and so we can compute max⁡πηt−1(π)\max_{\pi}\eta_{t-1}(\pi) via AMO\mathcal{AMO} as in Lemma 9. We can then compute ηt−1(W)\eta_{t-1}(W) and check if the constraint is satisfied. If not, then the constraint, being linear, automatically yields a separating hyperplane.

Next, we consider constraint (5.2). To check if W∈CW\in\mathcal{C}, we use the perceptron algorithm. We shift the origin to WW, and run the perceptron algorithm with all points π∈Π\pi\in\Pi being positive examples. The perceptron algorithm aims to find a hyperplane putting all policies π∈Π\pi\in\Pi on one side. In each iteration of the perceptron algorithm, we have a candidate hyperplane (specified by its normal vector), and then if there is a policy π\pi that is on the wrong side of the hyperplane, we can find it by running a linear optimization over C\mathcal{C} in the negative normal vector direction as in Lemma 9.

If W∉CW\notin\mathcal{C}, then in a bounded number of iterations (depending on the distance of WW from C\mathcal{C}, and the maximum magnitude ∥π∥2\|\pi\|_{2}) we obtain a separating hyperplane. In passing we also note that if W∈CW\in\mathcal{C}, the same technique allows us to explicitly compute an approximate convex combination of policies in Π\Pi that yields WW. This is done by running the perceptron algorithm as before and stopping after the bound on the number of iterations has been reached. Then we collect all the policies we have found in the run of the perceptron algorithm, and we are guaranteed that WW is close in distance to their convex hull. We can then find the closest point in the convex hull of these policies by solving a simple quadratic program.

Define f(Z)=max⁡{4K,βt(w⋅Z−v)2}−u⋅Zf(Z)=\max\{4K,\beta_{t}(w\cdot Z-v)^{2}\}-u\cdot Z. Note that ff is a convex function of ZZ. Finding a point ZZ that violates the above constraint is equivalent to solving the following (convex) program:

To do this, we again apply the ellipsoid method. For this, we need a separation oracle for the program. A separation oracle for the constraints (5.5) can be constructed as in Step 2 above. For the constraints (5.4), if the candidate solution ZZ has f(Z)>0f(Z)>0, then we can construct a separating hyperplane as in Lemma 10.

Suppose that after solving the program, we get a point Z∈CZ\in\mathcal{C} such that f(Z)≤0f(Z)\leq 0, i.e. WW violates the constraint (5.3) for ZZ. Then since constraint (5.3) is convex in WW, we can construct a separating hyperplane as in Lemma 10. This completes the description of the separation oracle.

Working out the details carefully yields the following theorem, proved in Appendix E:

There is an iterative algorithm with O(t5K4log⁡2(tKδ))O(t^{5}K^{4}\log^{2}(\frac{tK}{\delta})) iterations, each involving one call to AMO\mathcal{AMO} and O(t2K2)O(t^{2}K^{2}) processing time, that either declares correctly that A\mathcal{A} is infeasible or outputs a distribution PP over policies in Π\Pi such that WPW_{P} satisfies

where ϵ=8δμt2\epsilon=\frac{8\delta}{\mu_{t}^{2}} and γ=δμt\gamma=\frac{\delta}{\mu_{t}}.

DELAYED FEEDBACK

In a delayed feedback setting, we observe rewards with a τ\tau step delay according to:

The learning algorithm chooses an action at∈{1,...,K}a_{t}\in\{1,...,K\}.

The world presents a reward rt−τr_{t-\tau} for the action at−τa_{t-\tau} given the features xt−τx_{t-\tau}.

We deal with delay by suitably modifying Algorithm 1 to incorporate the delay τ\tau, giving Algorithm 3.

Now we can prove the following theorem, which shows the delay has an additive effect on regret.

For all distributions DD over (x,r⃗)(x,\vec{r}) with KK actions, for all sets of NN policies Π\Pi, and all delay intervals τ\tau, with probability at least 1−δ1-\delta, the regret of DelayedPE (Algorithm 3) is at most

Essentially as Theorem 4. The variance bound is unchanged because it depends only on the context distribution. Thus, it suffices to replace ∑t−1T1t\sum_{t-1}^{T}\frac{1}{\sqrt{t}} with τ+∑t=τ+1T+τ1t−τ=τ+∑t=1T1t\tau+\sum_{t=\tau+1}^{T+\tau}\frac{1}{\sqrt{t-\tau}}=\tau+\sum_{t=1}^{T}\frac{1}{\sqrt{t}} in Eq. (3.4). ∎

We thank Alina Beygelzimer, who helped in several formative discussions.

References

References

Appendix A Concentration Inequality

Appendix B Minimax Theorem

The following is a continuous version of Sion’s Minimax Theorem (Sion, 1958, Theorem 3.4).

Appendix C Empirical Variance Bounds

In this section we prove Theorem 6. We first show uniform convergence for a certain class of policy distributions (Lemma 15), and argue that each distribution PP is close to some distribution P~\widetilde{P} from this class, in the sense that VP,π,tV_{P,\pi,t} is close to VP~,π,tV_{\widetilde{P},\pi,t} and V^P,π,t\widehat{V}_{P,\pi,t} is close to V^P~,π,t\widehat{V}_{\widetilde{P},\pi,t} (Lemma 16). Together, they imply the main uniform convergence result in Theorem 6.

For each positive integer mm, let Sparse[m]\mathsf{Sparse}[m] be the set of distributions P~\widetilde{P} over Π\Pi that can be written as

(i.e., the average of mm delta functions) for some π1,…,πm∈Π\pi_{1},\dotsc,\pi_{m}\in\Pi. In our analysis, we approximate an arbitrary distribution PP over Π\Pi by a distribution P~∈Sparse[m]\widetilde{P}\in\mathsf{Sparse}[m] chosen randomly by independently drawing π1,…,πm∼P\pi_{1},\dotsc,\pi_{m}\sim P; we denote this process by P~∼Pm\widetilde{P}\sim P^{m}.

Fix positive integers (m1,m2,… )(m_{1},m_{2},\dotsc). With probability at least 1−δ1-\delta over the random samples (x1,x2,… )(x_{1},x_{2},\dotsc) from DXD_{X},

for all λ>0\lambda>0, all t≥1t\geq 1, all π∈Π\pi\in\Pi, and all distributions P~∈Sparse[mt]\widetilde{P}\in\mathsf{Sparse}[m_{t}].

We apply Bernstein’s inequality and union bounds over P~∈Sparse[mt]\widetilde{P}\in\mathsf{Sparse}[m_{t}], π∈Π\pi\in\Pi, and t≥1t\geq 1 so that with probability at least 1−δ1-\delta,

all t≥1t\geq 1, all π∈Π\pi\in\Pi, and all distributions P∈Sparse[mt]P\in\mathsf{Sparse}[m_{t}]. The conclusion follows by solving the quadratic inequality for VP~,π,tV_{\widetilde{P},\pi,t} to get

and then applying the AM/GM inequality. ∎

Fix any γ∈\gamma\in, and any x∈Xx\in X. For any distribution PP over Π\Pi and any π∈Π\pi\in\Pi, if

This implies that for all distributions PP over Π\Pi and any π∈Π\pi\in\Pi, there exists P~∈Sparse[m]\widetilde{P}\in\mathsf{Sparse}[m] such that for any λ>0\lambda>0,

where the third inequality follows from Jensen’s inequality, and the fourth inequality uses the AM/GM inequality in the denominator of the first term and the previous observations in the numerators. The final expression simplifies to the first desired displayed inequality by observing that mzexp⁡(−mz/8)≤3mz\exp(-mz/8)\leq 3 for all mz≥0mz\geq 0 (the maximum is achieved at mz=8mz=8). The second displayed inequality follows from the following facts:

Both inequalities follow from the first displayed bound of the lemma, by taking expectation with respect to the true (and empirical) distributions over xx. The desired bound follows by adding the above two inequalities, which implies that the bound holds in expectation, and hence the existence of P~\widetilde{P} for which the bound holds. ∎

(for some λ∈(0,1/5)\lambda\in(0,1/5) to be determined) and condition on the ≥1−δ\geq 1-\delta probability event from Lemma 15 that

for all t≥2t\geq 2, all P~∈Sparse[mt]\widetilde{P}\in\mathsf{Sparse}[m_{t}], and all π∈Π\pi\in\Pi. Using the definitions of mtm_{t} and μt\mu_{t}, the second term is at most (40/λ2)⋅(1+1/λ)⋅K(40/\lambda^{2})\cdot(1+1/\lambda)\cdot K for all t≥16Klog⁡(8KN/δ)t\geq 16K\log(8KN/\delta): the key here is that for t≥16Klog⁡(8KN/δ)t\geq 16K\log(8KN/\delta), we have μt=log⁡(Nt/δ)/(Kt)≤1/(2K)\mu_{t}=\sqrt{\log(Nt/\delta)/(Kt)}\leq 1/(2K) and therefore

Now fix t≥16Klog⁡(8KN/δ)t\geq 16K\log(8KN/\delta), π∈Π\pi\in\Pi, and a distribution PP over Π\Pi. Let P~∈Sparse[mt]\widetilde{P}\in\mathsf{Sparse}[m_{t}] be the distribution guaranteed by Lemma 16 with γ=λ\gamma=\lambda satisfying

Substituting the previous bound for VP~,π,t−(1+λ)V^P~,π,tV_{\widetilde{P},\pi,t}-(1+\lambda)\widehat{V}_{\widetilde{P},\pi,t} gives

This can be bounded as (1+ϵ)⋅V^P,π,t+(7500/ϵ3)⋅K(1+\epsilon)\cdot\widehat{V}_{P,\pi,t}+(7500/\epsilon^{3})\cdot K by setting λ=ϵ/5\lambda=\epsilon/5. ∎

Appendix D Analysis of RandomizedUCB

First, we define the following constants.

ϵ∈(0,1)\epsilon\in(0,1) is a fixed constant, and

ρ≐7500ϵ3\rho\doteq\frac{7500}{\epsilon^{3}} is the factor that appears in the bound from Theorem 6.

θ≐(ρ+1)/(1−(1+ϵ)/2)=21−ϵ(1+7500ϵ3)≥5\theta\doteq(\rho+1)/(1-(1+\epsilon)/2)=\frac{2}{1-\epsilon}\left(1+\frac{7500}{\epsilon^{3}}\right)\geq 5 is a constant central to Lemma 21, which bounds the variance of the optimal policy’s estimated rewards.

It can be checked that μt\mu_{t} is non-increasing. We define the following time indices:

t0t_{0} is the first round tt in which μt=Ct/(2Kt)\mu_{t}=\sqrt{C_{t}/(2Kt)}. Note that 8K≤t0≤8Klog⁡(NK/δ)8K\leq t_{0}\leq 8K\log(NK/\delta).

t1:=⌈16Klog⁡(8KN/δ)⌉t_{1}:=\lceil 16K\log(8KN/\delta)\rceil is the round given by Theorem 6 such that, with probability at least 1−δ1-\delta,

for all π∈Π\pi\in\Pi and all t≥t1t\geq t_{1}, where WP,μ(x,⋅)W_{P,\mu}(x,\cdot) is the distribution over AA given by

The following lemma shows the effect of allowing slack in the optimization constraints.

If PP satisfies the constraints of the optimization problem (4.1) with slack KK for each distribution QQ over Π\Pi, i.e.,

Let b≐max⁡{4K,(t−1)Δt−1(π)2180Ct−1}b\doteq\max\left\{4K,\frac{(t-1)\Delta_{t-1}(\pi)^{2}}{180C_{t-1}}\right\}. Note that b4≥K\frac{b}{4}\geq K. Hence b+K≤5b4b+K\leq\frac{5b}{4} which gives the stated bound. ∎

Note that the allowance of slack KK is somewhat arbitrary; any O(K)O(K) slack is tolerable provided that other constants are adjusted appropriately.

For any policy π∈Π\pi\in\Pi, define, for 1≤t≤t01\leq t\leq t_{0},

The Vˉt(π)\bar{V}_{t}(\pi) bounds the variances of the terms in ηt(π)\eta_{t}(\pi).

Assume the bound in (D.1) holds for all π∈Π\pi\in\Pi and t≥t1t\geq t_{1}. For all π∈Π\pi\in\Pi:

For the first claim, note that if t<t0t<t_{0}, then Vˉt(π)=K\bar{V}_{t}(\pi)=K, and if t0≤t<t1t_{0}\leq t<t_{1}, then

so Wt′(a)≥μt≥1/(4K)W_{t}^{\prime}(a)\geq\mu_{t}\geq 1/(4K).

For the second claim, pick any t>t1t>t_{1}, and note that by definition of t1t_{1}, for any π∈Π\pi\in\Pi we have

The stated bound on Vˉt(π)\bar{V}_{t}(\pi) now follows from its definition. ∎

The following lemma gives a deviation bound for ηt(π)\eta_{t}(\pi) in terms of these quantities.

Pick any δ∈(0,1)\delta\in(0,1). With probability at least 1−δ1-\delta, for all pairs π,π′∈Π\pi,\pi^{\prime}\in\Pi and t≥t0t\geq t_{0}, we have

Fix any t≥t0t\geq t_{0} and π,π′∈Π\pi,\pi^{\prime}\in\Pi. Let δt:=exp⁡(−Ct)\delta_{t}:=\exp(-C_{t}). Pick any τ≤t\tau\leq t. Let

so ηt(π)=t−1∑τ=1tZτ(π)\eta_{t}(\pi)=t^{-1}\sum_{\tau=1}^{t}Z_{\tau}(\pi). It is easy to see that

Now, note that since t≥t0t\geq t_{0}, μt=Ct2Kt\mu_{t}=\sqrt{\frac{C_{t}}{2Kt}}, so that t=Ct2Kμt2t=\frac{C_{t}}{2K\mu_{t}^{2}}. Further, both Vˉmax⁡,t(π)\bar{V}_{\max,t}(\pi) and Vˉmax⁡,t(π′)\bar{V}_{\max,t}(\pi^{\prime}) are at least KK. Using these bounds we get

for all τ≤t\tau\leq t, since the μτ\mu_{\tau}’s are non-increasing. Therefore, by Freedman’s inequality (Theorem 13), we have

The conclusion follows by taking a union bound over t0<t≤Tt_{0}<t\leq T and all pairs π,π′∈Π\pi,\pi^{\prime}\in\Pi. ∎

D.3 Variance Analysis

We define the following condition, which will be assumed by most of the subsequent lemmas in this section.

The deviation bound (D.1) holds for all π∈Π\pi\in\Pi and t≥t1t\geq t_{1}, and the deviation bound (D.2) holds for all pairs π,π′∈Π\pi,\pi^{\prime}\in\Pi and t≥t0t\geq t_{0}.

The next two lemmas relate the Vˉt(π)\bar{V}_{t}(\pi) to the Δt(π)\Delta_{t}(\pi).

Assume Condition 1. For any t≥t1t\geq t_{1} and π∈Π\pi\in\Pi, if Vˉt(π)>θK\bar{V}_{t}(\pi)>\theta K, then

By Lemma 18, the fact Vˉt(π)>θK\bar{V}_{t}(\pi)>\theta K implies that

Since Vˉt(π)>θK≥5K\bar{V}_{t}(\pi)>\theta K\geq 5K, Lemma 17 implies that in order for PtP_{t} to satisfy the optimization constraint in (4.1) corresponding to π\pi (with slack ≤K\leq K), it must be the case that

Assume Condition 1. For all t≥1t\geq 1, Vˉmax⁡,t(πmax⁡)≤θK\bar{V}_{\max,t}(\pi_{\max})\leq\theta K and Vˉmax⁡,t(πt)≤θK\bar{V}_{\max,t}(\pi_{t})\leq\theta K.

By induction on tt. The claim for all t≤t1t\leq t_{1} follows from Lemma 18. So take t>t1t>t_{1}, and assume as the (strong) inductive hypothesis that Vˉmax⁡,τ(πmax⁡)≤θK\bar{V}_{\max,\tau}(\pi_{\max})\leq\theta K and Vˉmax⁡,τ(πτ)≤θK\bar{V}_{\max,\tau}(\pi_{\tau})\leq\theta K for τ∈{1,…,t−1}\tau\in\{1,\dotsc,t-1\}. Suppose for sake of contradiction that Vˉt(πmax⁡)>θK\bar{V}_{t}(\pi_{\max})>\theta K. By Lemma 20,

However, by the deviation bounds, we have

The second inequality follows from our assumption and the induction hypothesis:

Since ΔD(πt−1)≥0\Delta_{D}(\pi_{t-1})\geq 0, we have a contradiction, so it must be that Vˉt(πmax⁡)≤θK\bar{V}_{t}(\pi_{\max})\leq\theta K. This proves that Vˉmax⁡,t(πmax⁡)≤θK\bar{V}_{\max,t}(\pi_{\max})\leq\theta K.

It remains to show that Vˉmax⁡,t(πt)≤θK\bar{V}_{\max,t}(\pi_{t})\leq\theta K. So suppose for sake of contradiction that the inequality fails, and let t1<τ≤tt_{1}<\tau\leq t be any round for which Vˉτ(πt)=Vˉmax⁡,t(πt)>θK\bar{V}_{\tau}(\pi_{t})=\bar{V}_{\max,t}(\pi_{t})>\theta K. By Lemma 20,

The parenthesized terms can be bounded using the deviation bounds, so we have

where the second inequality follows from the following facts: {enumerate*}

By induction hypothesis, we have Vˉmax⁡,τ−1(πτ−1),Vˉmax⁡,τ−1(πmax⁡),Vˉmax⁡,t(πmax⁡)≤θK\bar{V}_{\max,\tau-1}(\pi_{\tau-1}),\bar{V}_{\max,\tau-1}(\pi_{\max}),\bar{V}_{\max,t}(\pi_{\max})\leq\theta K, and Vˉτ(πt)>θK\bar{V}_{\tau}(\pi_{t})>\theta K,

Vˉτ(πt)≥Vˉmax⁡,t(πt)\bar{V}_{\tau}(\pi_{t})\geq\bar{V}_{\max,t}(\pi_{t}), and

since τ\tau is a round that achieves Vˉmax⁡,t(πt)\bar{V}_{\max,t}(\pi_{t}), we have Vˉτ(πt)≥Vˉτ−1(πt)\bar{V}_{\tau}(\pi_{t})\geq\bar{V}_{\tau-1}(\pi_{t}). This contradicts the inequality in (D.3), so it must be that Vˉmax⁡,t(πt)≤θK\bar{V}_{\max,t}(\pi_{t})\leq\theta K. ∎

Immediate from Lemma 21 and the deviation bounds from (D.2). ∎

The following lemma shows that if a policy π\pi has large Δτ(π)\Delta_{\tau}(\pi) in some round τ\tau, then Δt(π)\Delta_{t}(\pi) remains large in later rounds t>τt>\tau.

Assume Condition 1. Pick any π∈Π\pi\in\Pi and t≥t1t\geq t_{1}. If Vˉmax⁡,t(π)>θK\bar{V}_{\max,t}(\pi)>\theta K, then

Let τ≤t\tau\leq t be any round in which Vˉτ(π)=Vˉmax⁡,t(π)>θK\bar{V}_{\tau}(\pi)=\bar{V}_{\max,t}(\pi)>\theta K. We have

where the second inequality follows from Lemma 20 and the deviation bounds, and the third inequality follows from Lemma 21 and the facts that Vˉτ(π)=Vˉmax⁡,t(π)>θK≥Vˉmax⁡,t(πmax⁡),Vˉmax⁡,τ−1(πτ−1)\bar{V}_{\tau}(\pi)=\bar{V}_{\max,t}(\pi)>\theta K\geq\bar{V}_{\max,t}(\pi_{\max}),\bar{V}_{\max,\tau-1}(\pi_{\tau-1}), and Vˉmax⁡,t(π)≥Vˉmax⁡,τ−1(π)\bar{V}_{\max,t}(\pi)\geq\bar{V}_{\max,\tau-1}(\pi). ∎

D.4 Regret Analysis

We now bound the value of the optimization problem (4.1), which then leads to our regret bound. The next lemma shows the existence of a feasible solution with a certain structure based on the non-uniform constraints. Recall from Section 5, that solving the optimization problem A\mathcal{A}, i.e. constraints (5.1, 5.2, 5.3), for the smallest feasible value of ss is equivalent to solving the RUCB optimization problem (4.1). Recall that βt=t−1180Ct−1\beta_{t}=\frac{t-1}{180C_{t-1}}.

In particular, the value of the optimization problem (4.1), OPT⁡t\operatorname{OPT}_{t}, is bounded by 8Kβt≤110KCt−1t−18\sqrt{\frac{K}{\beta_{t}}}\leq 110\sqrt{\frac{KC_{t-1}}{t-1}}.

Define the sets {Ci: i=1,2,…}\{\mathcal{C}_{i}:\ i=1,2,\ldots\} such that

where κ=Kβt\kappa=\sqrt{\frac{K}{\beta_{t}}}. Note that since Δt−1(Z)\Delta_{t-1}(Z) is a linear function of ZZ, each Ci\mathcal{C}_{i} is a closed, convex, compact set. Also, define C0={Z∈C: Δt−1(Z)≤4κ}\mathcal{C}_{0}=\{Z\in\mathcal{C}:\ \Delta_{t-1}(Z)\leq 4\kappa\}. This is also a closed, convex, compact set. Note that C=⋃i=0∞Ci\mathcal{C}=\bigcup_{i=0}^{\infty}\mathcal{C}_{i}.

Let I={i: Ci≠∅}I=\{i:\ \mathcal{C}_{i}\neq\emptyset\}.For i∈I∖{0}i\in I\setminus\{0\}, define wi=4−iw_{i}=4^{-i}, and let w0=1−∑i∈I∖{0}wiw_{0}=1-\sum_{i\in I\setminus\{0\}}w_{i}. Note that w0≥2/3w_{0}\geq 2/3.

By Lemma 1, for each i∈Ii\in I, there is a point Wi∈CiW_{i}\in\mathcal{C}_{i} such that for all Z∈CiZ\in\mathcal{C}_{i}, we have

Here we use the fact that Kμt≤1/2K\mu_{t}\leq 1/2 to upper bound K1−Kμt\frac{K}{1-K\mu_{t}} by 2K2K. Now consider the point W=∑i∈IwiWiW=\sum_{i\in I}w_{i}W_{i}. Since C\mathcal{C} is convex, W∈CW\in\mathcal{C}.

Now fix any i∈Ii\in I. For any (x,a)(x,a), we have W′(x,a)≥wiWi′(x,a)W^{\prime}(x,a)\geq w_{i}W^{\prime}_{i}(x,a), so that for all Z∈CiZ\in\mathcal{C}_{i}, we have

Finally, since for all i∈Ii\in I, we have wi≤4−iw_{i}\leq 4^{-i} and Δt−1(Wi)≤2i+2κ\Delta_{t-1}(W_{i})\leq 2^{i+2}\kappa, we get

The value of the optimization problem (4.1) can be related to the expected instantaneous regret of policy drawn randomly from the distribution PtP_{t}.

Fix any π∈Π\pi\in\Pi and t>t1t>t_{1}. By the deviation bounds, we have

If Vˉmax⁡,t−1(π)≤θK\bar{V}_{\max,t-1}(\pi)\leq\theta K, then we have

where OPT⁡t\operatorname{OPT}_{t} is the value of the optimization problem (4.1). The conclusion follows from Lemma 24. ∎

We can now finally prove the main regret bound for RUCB.

The regret through the first t1t_{1} rounds is trivially bounded by t1t_{1}. In the event that Condition 1 holds, we have for all t≥t1t\geq t_{1},

where the last inequality follows from Lemma 25. Summing the bound from t=t1+1,…,Tt=t_{1}+1,\dotsc,T gives

By Azuma’s inequality, the probability that ∑t=1Trt(at)\sum_{t=1}^{T}r_{t}(a_{t}) deviates from its mean by more than O(Tlog⁡(1/δ))O(\sqrt{T\log(1/\delta)}) is at most δ\delta. Finally, the probability that Condition 1 does not hold is at most 2δ2\delta by Lemma 19, Theorem 6, and a union bound. The conclusion follows by a final union bound. ∎

Appendix E Details of Oracle-based Algorithm

In order to use the ellipsoid algorithm, we need to relax the program a little bit in order to ensure that the feasible region has a non-negligible volume. To do this, we need to obtain some perturbation bounds for the constraints of A\mathcal{A}. The following lemma gives such bounds. For any δ>0\delta>0, we define Cδ\mathcal{C}_{\delta} to be the set of all points within a distance of δ\delta from C\mathcal{C}.

Let δ≤b/4\delta\leq b/4 be a parameter. Let U,W∈C2δU,W\in\mathcal{C}_{2\delta} be points such that ∥U−W∥≤δ\|U-W\|\leq\delta. Then we have

where ϵ=8δμt2\epsilon=\frac{8\delta}{\mu_{t}^{2}} and γ=δμt\gamma=\frac{\delta}{\mu_{t}}.

Next, for any Z∈C1Z\in\mathcal{C}_{1}, we have

In the last inequality, we use the Cauchy-Schwarz inequality, and use the following facts (here, Z(x,⋅)Z(x,\cdot) denotes the vector ⟨Z(x,a)⟩a\langle Z(x,a)\rangle_{a}, etc.): {enumerate*}

∥Z(x,⋅)∥≤2\|Z(x,\cdot)\|\leq 2 since Z∈C1Z\in\mathcal{C}_{1},

∥U′(x,⋅)−W′(x,⋅)∥≤∥U(x,⋅)−W(x,⋅)∥≤δ\|U^{\prime}(x,\cdot)-W^{\prime}(x,\cdot)\|\leq\|U(x,\cdot)-W(x,\cdot)\|\leq\delta, and

U′(x,a)≥(1−bK)⋅(−2δ)+b≥b/2U^{\prime}(x,a)\geq(1-bK)\cdot(-2\delta)+b\geq b/2, for δ≤b/4\delta\leq b/4, and similarly W′(x,a)≥b/2W^{\prime}(x,a)\geq b/2. This implies (E.2). ∎

where ϵ\epsilon and γ\gamma are as defined in Lemma 26. Call this relaxed program A′\mathcal{A}^{\prime}.

We apply the ellipsoid method to A′\mathcal{A}^{\prime} rather than A\mathcal{A}. Recall the requirements of Lemma 8: we need an enclosing ball of bounded radius for the feasible region, and the radius of an enclosed ball in the feasible region. The following lemma gives this.

The feasible region for A′\mathcal{A}^{\prime} is contained in B(0,t+δ)B(0,\sqrt{t}+\delta), and if A\mathcal{A} is feasible, then it contains a ball of radius δ\delta.

Note that for any W∈CδW\in\mathcal{C}_{\delta}, we have ∥W∥≤t+δ\|W\|\leq\sqrt{t}+\delta, so the feasible region lies in B(0,t+δ)B(0,\sqrt{t}+\delta).

Next, if A\mathcal{A} is feasible, let W⋆∈CW^{\star}\in\mathcal{C} be any feasible solution to A\mathcal{A}. Consider the ball B(W⋆,δ)B(W^{\star},\delta). Let UU be any point in B(W⋆,δ)B(W^{\star},\delta). Clearly U∈CδU\in\mathcal{C}_{\delta}. By Lemma 26, assuming δ≤1/2\delta\leq 1/2, we have for all Z∈C2δZ\in\mathcal{C}_{2\delta},

Thus, UU is feasible for A′\mathcal{A}^{\prime}, and hence the entire ball B(W⋆,δ)B(W^{\star},\delta) is feasible for A′\mathcal{A}^{\prime}. ∎

We now give the construction of a separation oracle for the feasible region of A′\mathcal{A}^{\prime} by checking for violations of the constraints. In the following, we use the word “iteration” to indicate one step of either the ellipsoid algorithm or the perceptron algorithm. Each such iteration involves one call to AMO\mathcal{AMO}, and additional O(t2K2)O(t^{2}K^{2}) processing time.

The harder constraints are (E.4) and (E.5). Recall that Lemma 9 shows that that AMO\mathcal{AMO} allows us to do linear optimization over C\mathcal{C} efficiently. This immediately gives us the following useful corollary:

This follows directly from the following fact:

Now we show how to use AMO\mathcal{AMO} to check for constraint (E.4):

Suppose we are given a point WW. Then in O(tδ2)O(\frac{t}{\delta^{2}}) iterations, if W∉C2δW\notin\mathcal{C}_{2\delta}, we can construct a hyperplane separating WW from Cδ\mathcal{C}_{\delta}. Otherwise, we declare correctly that W∈C2δW\in\mathcal{C}_{2\delta}. In the latter case, we can find an explicit distribution PP over policies in Π\Pi such that WPW_{P} satisfies ∥WP−W∥≤2δ\|W_{P}-W\|\leq 2\delta.

We run the perceptron algorithm with the origin at WW and all points in Cδ\mathcal{C}_{\delta} being positive examples. The goal of the perceptron algorithm then is to find a hyperplane going through WW that puts all of Cδ\mathcal{C}_{\delta} (strictly) on one side. In each iteration of the perceptron algorithm, we have a weight vector ww that is the normal to a candidate hyperplane, and we need to find a point Z∈CδZ\in\mathcal{C}_{\delta} such that w⋅(Z−W)≤0w\cdot(Z-W)\leq 0 (note that we have shifted the origin to WW). To do this, we use AMO\mathcal{AMO} as in Lemma 9 to find Z⋆=arg⁡max⁡Z∈Cδ−w⋅ZZ^{\star}=\arg\max_{Z\in\mathcal{C}_{\delta}}-w\cdot Z. If w⋅(Z⋆−W)≤0w\cdot(Z^{\star}-W)\leq 0, we use Z⋆Z^{\star} to update ww using the perceptron update rule, w←w+(Z⋆−W)w\leftarrow w+(Z^{\star}-W). Otherwise, we have w⋅(Z−W)>0w\cdot(Z-W)>0 for all W∈CδW\in\mathcal{C}_{\delta}, and hence we have found our separating hyperplane.

Now suppose that W∉C2δW\notin\mathcal{C}_{2\delta}, i.e. the distance of WW from Cδ\mathcal{C}_{\delta} is more than δ\delta. Since ∥Z−W∥≤2t+3δ=O(t)\|Z-W\|\leq 2\sqrt{t}+3\delta=O(\sqrt{t}) for all W∈CδW\in\mathcal{C}_{\delta} (assuming δ=O(t)\delta=O(\sqrt{t})), the perceptron convergence guarantee implies that in O(tδ2)O(\frac{t}{\delta^{2}}) iterations we find a separating hyperplane.

If in k=O(tδ2)k=O(\frac{t}{\delta^{2}}) iterations we haven’t found a separating hyperplane, then W∈C2δW\in\mathcal{C}_{2\delta}. In fact the perceptron algorithm gives a stronger guarantee: if the kk policies found in the run of the perceptron algorithm are π1,π2,…,πk∈Π\pi_{1},\pi_{2},\ldots,\pi_{k}\in\Pi, then WW is within a distance of 2δ2\delta from their convex hull, C′=conv(π1,π2,…,πk)\mathcal{C}^{\prime}=\text{conv}(\pi_{1},\pi_{2},\ldots,\pi_{k}). This is because a run of the perceptron algorithm on C2δ′\mathcal{C}^{\prime}_{2\delta} would be identical to that on C2δ\mathcal{C}_{2\delta} for kk steps. We can then compute the explicit distribution over policies PP by computing the Euclidean projection of WW on C′\mathcal{C}^{\prime} in poly(k)\text{poly}(k) time using a convex quadratic program:

Solving this quadratic program, we get a distribution PP over the policies {π1,π2,…,πk}\{\pi_{1},\pi_{2},\ldots,\pi_{k}\} such that ∥WP−W∥≤2δ\|W_{P}-W\|\leq 2\delta. ∎

Finally, we show how to check constraint (E.5):

Suppose we are given a point WW. In O(t3K2δ2⋅log⁡(tδ))O(\frac{t^{3}K^{2}}{\delta^{2}}\cdot\log(\frac{t}{\delta})) iterations, we can either find a point Z∈C2δZ\in\mathcal{C}_{2\delta} such that

or else we conclude correctly that for all Z∈CZ\in\mathcal{C}, we have

We first rewrite η(W)\eta(W) as η(W)=w⋅π\eta(W)=w\cdot\pi, where ww is a vector defined as

Thus, Δ(Z)=v−w⋅Z\Delta(Z)=v-w\cdot Z, where v=max⁡π′η(π′)=max⁡π′w⋅π′v=\max_{\pi^{\prime}}\eta(\pi^{\prime})=\max_{\pi^{\prime}}w\cdot\pi^{\prime} which can be computed by using AMO\mathcal{AMO} once.

Note that ff is convex function of ZZ. Checking for violation of the above constraint is equivalent to solving the following (convex) program:

To do this, we again apply the ellipsoid method, but on the relaxed program

To run the ellipsoid algorithm, we need a separation oracle for the program. Given a candidate solution ZZ, we run the algorithm of Lemma 29, and if Z∉C2δZ\notin\mathcal{C}_{2\delta}, we construct a hyperplane separating ZZ from Cδ\mathcal{C}_{\delta}.

Now suppose we conclude that Z∈C2δZ\in\mathcal{C}_{2\delta}. Then we construct a separation oracle for (E.6) as follows. If f(Z)>ϵf(Z)>\epsilon, then since ff is a convex function of ZZ, we can construct a separating hyperplane as in Lemma 10.

Now we can run the ellipsoid algorithm with the starting ellipsoid being B(0,t)B(0,\sqrt{t}). If there is a point Z⋆∈CZ^{\star}\in\mathcal{C} such that f(Z⋆)≤0f(Z^{\star})\leq 0, then consider the ball B(Z⋆,4δ5tKβt)B(Z^{\star},\frac{4\delta}{5\sqrt{tK}\beta_{t}}). For any Y∈B(Z⋆,4δ5tKβt)Y\in B(Z^{\star},\frac{4\delta}{5\sqrt{tK}\beta_{t}}), we have

since ∥u∥≤Kμt\|u\|\leq\frac{\sqrt{K}}{\mu_{t}}. Also,

since ∥w∥≤1μt\|w\|\leq\frac{1}{\mu_{t}}, ∥Z⋆∥≤t\|Z^{\star}\|\leq\sqrt{t}, ∥Y∥≤t+δ≤2t\|Y\|\leq\sqrt{t}+\delta\leq 2\sqrt{t}, and ∣v∣≤∥w∥⋅t≤tμt|v|\leq\|w\|\cdot\sqrt{t}\leq\frac{\sqrt{t}}{\mu_{t}}.

Thus, f(Y)≤f(Z⋆)+ϵ≤ϵf(Y)\leq f(Z^{\star})+\epsilon\leq\epsilon, so the entire ball B(Z⋆,4δ5tKβt)B(Z^{\star},\frac{4\delta}{5\sqrt{tK}\beta_{t}}) is feasible for the relaxed program.

By Lemma 8, in O(t2K2⋅log⁡(tKδ))O(t^{2}K^{2}\cdot\log(\frac{tK}{\delta})) iterations of the ellipsoid algorithm, we obtain one of the following: {enumerate*}

we either find a point Z∈C2δZ\in\mathcal{C}_{2\delta} such that f(Z)≤ϵf(Z)\leq\epsilon, i.e.

or else we conclude that the original convex program (E.6,E.7) is infeasible, i.e. for all Z∈CZ\in\mathcal{C}, we have

The total number of invocations of iterations is bounded by O(t2K2⋅log⁡(tKδ))⋅O(tδ2)=O(t3K2δ2⋅log⁡(tKδ))O(t^{2}K^{2}\cdot\log(\frac{tK}{\delta}))\cdot O(\frac{t}{\delta^{2}})=O(\frac{t^{3}K^{2}}{\delta^{2}}\cdot\log(\frac{tK}{\delta})). ∎

Suppose we are given a point Z∈C2δZ\in\mathcal{C}_{2\delta} such that

Then we can construct a hyperplane separating WW from all feasible points for A′\mathcal{A}^{\prime}.

For notational convenience, define the function

Note that it is a convex function of WW. Note that for any point UU that is feasible for A′\mathcal{A}^{\prime}, we have fZ(U)≤−ϵf_{Z}(U)\leq-\epsilon, whereas fZ(W)≥0f_{Z}(W)\geq 0. Thus, by Lemma 10, we can construct the desired separating hyperplane. ∎

We can then use the perceptron-based algorithm of Lemma 29 to “round” WW to an explicit distribution PP over policies in Π\Pi such that WPW_{P} satisfies ∥WP−W∥≤2δ\|W_{P}-W\|\leq 2\delta. Then Lemma 26 implies the stated bounds for WPW_{P}.

By Lemma 8, in O(t2K2log⁡(tδ))O(t^{2}K^{2}\log(\frac{t}{\delta})) iterations of the ellipsoid algorithm, we find the point WW satisfying the constraints given above, or declare correctly that A\mathcal{A} is infeasible. In the worst case, we might have to run the algorithm of Lemma 30 in every iteration, leading to an upper bound of O(t2K2log⁡(tδ))×O(t3K2δ2⋅log⁡(tKδ))=O(t5K4log⁡2(tKδ))O(t^{2}K^{2}\log(\frac{t}{\delta}))\times O(\frac{t^{3}K^{2}}{\delta^{2}}\cdot\log(\frac{tK}{\delta}))=O(t^{5}K^{4}\log^{2}(\frac{tK}{\delta})) on the number of iterations. ∎