Reinforcement and Imitation Learning via Interactive No-Regret Learning

Stephane Ross, J. Andrew Bagnell

Introduction

Imitation learning has become increasingly important in fields– notably robotics and game AI– where it is easier for an expert to demonstrate a behavior than to translate that behavior to code. Perhaps surprisingly, it has also become central in developing predictors for complex output spaces, e.g. sets and lists , parse trees , image parsing and natural language understanding. In these domains, a policy is trained to imitate an oracle on ground-truthed data. Iterative training procedures (e.g. DAgger, SEARN, SMILe) that interleave policy execution and learning have demonstrated impressive practical performance and strong theoretical guarantees that were not possible with batch supervised learning. Most of these approaches to imitation learning, however, neither require nor benefit from information about the cost of actions; rather they leverage only information provided about “correct” actions by the demonstrator.

While iterative training corrects the compounding of error effect one sees in control and decision making applications, it does not address all issues that arise. Consider, for instance, a problem of learning to drive near the edge of a cliff: methods like DAgger consider all errors from agreeing with the expert driver equally. If driving immediately off the cliff makes the expert easy to imitate– because the expert simply chooses the go straight from then on– these approaches may learn that very poor policy. More generally, a method that only reasons about agreement with a demonstrator instead of the long term costs of various errors may poorly trade-off inevitable mistakes. Even a crude estimate of the cost-to-go (e.g. it’s very expensive to drive off the cliff)– may improve a learned policy’s performance at the user’s intended task.

SEARN, by contrast, does reason about cost-to-go, but uses rollouts from the current policy which can be impractical for imitation learning. SEARN additionally requires the use of stochastic policies.

We present a simple, general approach we term AggreVaTe (Aggregate Values to Imitate) that leverages cost-to-go information in addition to correct demonstration, and establish that previous methods can be understood as special cases of a more general no-regret strategy. The approach provides much stronger guarantees than existing methods by providing a statistical regret rather then statistical error reduction.

This general strategy of leveraging cost-sensitive no-regret learners can be extended to Approximate Policy Iteration (API) variants for reinforcement learning. We show that any no-regret learning algorithm can be used to develop stable API algorithms with guarantees as strong as any available in the literature. We denote the resulting algorithm NRPI. The results provide theoretical support to the commonly observed success of online policy iteration despite a paucity of formal results: such online algorithms often enjoy no-regret guarantees or share similar stability properties. Our approach suggests a broad new family of algorithms and provides a unifying view of existing techniques for both imitation and reinforcement learning.

Imitation Learning with Cost-To-Go

We consider in this work finite horizonAll our results can be easily extended to the infinite discounted horizon setting. control problems in the form of a Markov Decision Process with states ss and actions aa. We assume the existence of a cost-function C(s,a)C(s,a), bounded between and 11, that we are attempting to optimize over a horizon of TT decisions. We denote a class of policies Π\Pi mapping states More generally features of the state (and potentially time)– our derivations do not require full observability and hence carry over to featurized state of POMDPs. to actions.

2 Algorithm: AggreVaTe

We describe here a simple extension of the DAgger technique of that learns to choose actions to minimize the cost-to-go of the expert rather than the zero-one classification loss of mimicking its actions. In simplest form, on the first iteration AggreVaTe collects data by simply observing the expert perform the task, and in each trajectory, at a uniformly random time tt, explores an action aa in state ss, and observes the cost-to-go QQ of the expert after performing this action. (See Algorithm 1 below.) This cost-to-go may be estimated by rollout, or provided by the expert.

Each of these steps generates a cost-weighted training example (s,t,a,Q)(s,t,a,Q) and AggreVaTe trains a policy π^2\hat{\pi}_{2} to minimize the expected cost-to-go on this dataset. At each following iteration nn, AggreVaTe collects data through interaction with the learner as follows: for each trajectory, begin by using the current learner’s policy π^n\hat{\pi}_{n} to perform the task, interrupt at a uniformly random time tt, explore an action aa in the current state ss, after which control is provided back to the expert to continue up to time-horizon TT. This results in new examples of the cost-to-go of the expert (s,t,a,Q)(s,t,a,Q), under the distribution of states visited by the current policy π^n\hat{\pi}_{n}. This new data is aggregated with all previous data to train the next policy π^n+1\hat{\pi}_{n+1}; more generally, this data can be used by a no-regret online learner to update the policy and obtain π^n+1\hat{\pi}_{n+1}. This is iterated for some number of iterations NN and the best policy found is returned. We optionally allow the algorithm to continue executing the expert’s actions with small probability βn\beta_{n}, instead of always executing π^n\hat{\pi}_{n}, up to the random time tt where an action is explored and control is shifted to the expert. The general AggreVaTe is detailed in Algorithm 1.

Observing the expert’s cost-to-go indicates how much cost we might expect to incur in the future if we take an action now and then can behave as well (or nearly so) as the expert henceforth. Under the assumption that the expert is a good policy, and that the policy class Π\Pi contains similarly good policies, this provides a rough estimate of what good policies in Π\Pi will be able to achieve at future steps. By minimizing this cost-to-go at each step, we will choose policies that lead to situations where incurring low future cost-to-go is possible. For instance, we will be able to observe that if some actions put the expert in situations where falling off a cliff or crash is inevitable then these actions must be avoided at all costs in favor of those where the expert is still able to recover.

In AggreVaTe the problem of choosing the sequence of policies π^1,π^2,…,π^N\hat{\pi}_{1},\hat{\pi}_{2},\dots,\hat{\pi}_{N} over iterations is viewed as an online cost-sensitive classification problem. Our analysis below demonstrates that any no-regret algorithm on such problems can be used to update the sequence of policies and provide strong guarantees. To achieve this, when the policy class Π\Pi is finite, randomized online learning algorithms like weighted majority may be used. When dealing with infinite policy classes (e.g. all linear classifiers), no-regret online cost-sensitive classification is not always computationally tractable. Instead, typically reductions of cost-sensitive classification to regression or ranking problems as well as convex upper bounds on the classification loss lead to efficient no-regret online learning algorithms (e.g. gradient descent). The algorithm description suggests as the “default” learning strategy a (Regularized)-Follow-The-Leader online learner: it attempts to learn a good classifier for all previous data. This strategy for certain loss function (notably strongly convex surrogates to the cost-sensitive classification loss) and any sufficiently stable batch learner ensures the no-regret property. It also highlights why the approach is likely to be particularly stable across rounds of interaction.

3 Training the Policy to Minimize Cost-to-Go

In standard “full-information” cost-sensitive classification, a cost vector is provided for each data-point in the training data that indicates the cost of predicting each class or label for this input. In our setting, that implies for each sampled state we recieve a cost-to-go estimate/rollout for all actions. Training the policy at each iteration then simply corresponds to solving a cost-sensitive classification problem. That is, if we collect a dataset of mm samples, {(si,ti,Q^i)}i=1m\{(s_{i},t_{i},\hat{Q}_{i})\}_{i=1}^{m}, where Q^i\hat{Q}_{i} is a cost vector of cost-to-go estimates for each action in state sis_{i} at time tit_{i}, then we solve the cost-sensitive classification problem: arg min⁡π∈Π∑i=1mQ^i(π(si,ti))\operatorname*{arg\,min}_{\pi\in\Pi}\sum_{i=1}^{m}\hat{Q}_{i}(\pi(s_{i},t_{i})). Reductions of cost-sensitive classification to convex optimization problems can be used like weighted multi-class Support Vector Machines or ranking, to obtain problems that can be optimized efficiently while still guaranteeing good performance at this cost-sensitive classification task.

For instance, a simple approach is to transform this into an argmax regression problem: i.e., πn(s,t)=arg min⁡a∈AQn(s,t,a)\pi_{n}(s,t)=\operatorname*{arg\,min}_{a\in A}Q_{n}(s,t,a), for QnQ_{n} the learned regressor at iteration nn that minimizes the squared loss at predicting the cost-to-go estimates: Qn=arg min⁡Q∈Q∑(si,ti,ai,Q^i)∈D(Q(si,ti,ai)−Q^i)2Q_{n}=\operatorname*{arg\,min}_{Q\in\mathcal{Q}}\sum_{(s_{i},t_{i},a_{i},\hat{Q}_{i})\in D}(Q(s_{i},t_{i},a_{i})-\hat{Q}_{i})^{2}, where DD is the dataset of all collected cost-to-go estimates so far, and Q\mathcal{Q} the class of regressors considered (e.g. linear regressors). This approach also naturally handles the more common situation in imitation learning where we only have partial information for a particular action chosen at a state. Alternate approaches include importance weighting techniques to transform the problem into a standard cost-sensitive classification problem and other online learning approaches meant to handle “bandit” feedback.

In the partial information setting we must also select which action to explore for an estimate of cost-to-go. The uniform strategy is simple and effective but inefficient. The problem may be cast as a contextual bandit problem where features of the current state define the context of exploration. These algorithms, by choosing more carefully than at random, may be significantly more sample efficient. In our setting, in contrast with traditional bandit settings, we care only about the final learned policy and not the cost of explored actions along the way. Recent work may be more appropriate for improving performance in this case. Many contextual bandit algorithms require a finite set of policies Π\Pi or full realizability , and this is an open and very active area of research that could have many applications here.

4 Analysis

We analyze AggreVaTe, showing that the no-regret property of online learning procedures can be leveraged in this interactive learning procedure to obtain strong performance guarantees. Our analysis seeks to answer the following question: how well does the learned policy perform if we can repeatedly identify good policies that incur cost-sensitive classification loss competitive with the expert demonstrator on the aggregate dataset we collect during training?

We provide guarantees for the “uniform mixture” policy π‾\overline{\pi}, that at the beginning of any trajectory samples a policy π\pi uniformly randomly among the policies {π^i}i=1N\{\hat{\pi}_{i}\}_{i=1}^{N} and executes this policy π\pi for the entire trajectory. This immediately implies good performance for the best policy π^\hat{\pi} in the sequence π^1:N\hat{\pi}_{1:N}, i.e. J(π^)=min⁡i∈1:NJ(π^i)≤J(π‾)J(\hat{\pi})=\min_{i\in 1:N}J(\hat{\pi}_{i})\leq J(\overline{\pi}), and the last policy π^N\hat{\pi}_{N} when the distribution of visited states converges over the iterations of learning.

Assume the cost-to-go of the expert Q∗Q^{*} is non-negative and bounded by Qmax⁡∗Q^{*}_{\max}, and βi≤(1−α)i−1\beta_{i}\leq(1-\alpha)^{i-1} for all ii for some constant α\alpha The default parameter-free version of AggreVaTe corresponds to α=1\alpha=1, using 00=10^{0}=1.. Then the following holds in the infinite sample case (i.e. if at each iteration of AggreVaTe we collected an arbitrarily large amount of data by running the current policy):

Thus if a no-regret online algorithm is used to pick the sequence of policies π^1:N\hat{\pi}_{1:N}, then as the number of iterations N→∞N\rightarrow\infty:

The proof of this result is presented in the Appendix. This theorem indicates that after sufficient iterations, AggreVaTe will find policies that perform the task nearly as well as the demonstrator if there are policies in Π\Pi that have small cost-sensitive classification regret on the aggregate dataset (i.e. policies with cost-sensitive classification loss not much larger than that of the bayes-optimal one on this dataset). Note that non-interactive supervised learning methods are unable to achieve a similar bound which degrades only linearly with TT and the cost-sensitive classification regret. .

The analysis above abstracts away the issue of action exploration and learning from finite data. These issues come into play in a sample complexity analysis. Such analyses depend on many factors such as the particular reduction and exploration method. When reductions of cost-sensitive classification to simpler regression/ranking/classification problems are used, our results can directly relate the task performance of the learned policy to the performance on the simpler problem. To illustrate how such results may be derived, we provide a result for the special case where actions are explored uniformly at random and the reduction of cost-sensitive classification to regression is used.

In particular, if ϵ^regret\hat{\epsilon}_{\textrm{regret}} denotes the empirical average online learning regret on the training regression examples collected over the iterations, and ϵ^class\hat{\epsilon}_{\textrm{class}} denotes the empirical regression regret of the best regressor in the class on the aggregate dataset of regression examples when compared to the bayes-optimal regressor, we have that:

NN iterations of AggreVaTe, collecting mm regression examples (s,a,t,Q)(s,a,t,Q) per iteration, guarantees that with probability at least 1-δ\delta:

Thus if a no-regret online algorithm is used to pick the sequence of regressors Q^1:N\hat{Q}_{1:N}, then as the number of iterations N→∞N\rightarrow\infty, with probability 11:

The detailed proof is presented in the Appendix. This result demonstrates how the task performance of the learned policies may be related all the way down to the regret on the regression loss at predicting the observed cost-to-go during training. In particular, it relates task performance to the square root of the online learning regret, on this regression loss, and the regression regret of the best regressor in the class to the bayes-optimal regressor on this training data. The appearance of the square root is particular to the use of this reduction to squared-loss regression and implies relative slow convergence to good performance. Other cost-sensitive classification reductions and regression losses (e.g. ) do not introduce this square root and still allow efficient learning.

5 Discussion

AggreVaTe can be interpreted as a regret reduction of imitation learning to no-regret online learning. Unfortunately regret here has two different meanings common in the literature: the first is in the statistical sense of doing nearly as well as the Bayes-optimal predictor. The second use is in the online, adversarial, no-regret sense of competing against any hypothesis on a particular sequence without statistical assumptions. We present a statistical regret reduction, as here, performance is related directly to the online, cost-sensitive classification regret on the aggregate dataset. By minimizing cost-to-go, we obtain regret reduction, rather than a weaker error reduction as in when simply minimizing immediate classification loss.

Limitations:

As just mentioned, in cases where the expert is much better than any policy in Π\Pi, the expert’s cost-to-go may be a very optimistic estimate of the true future cost after taking a certain action. The approach may fail to learn policies that perform well, even if policies that can perform the task (albeit not as well as the expert) exist in the policy class. Consider again the driving scenario, where one may choose one of two roads to reach a goal: a shorter route that involves driving on a very narrow road next to cliffs on either side, and a longer route which is safer and risks no cliff. If in this example, the expert takes the short route faster and no policy in the class Π\Pi can drive without falling on the narrow road, but there exists policies that can take the longer road and safely reach the goal, this algorithm would fail to find these policies. The reason for this is that, as we minimize cost-to-go of the expert, we would always favor policies that heads toward the shorter narrow road. But once we are on that road, inevitably at some point we will encounter a scenario where no policies in the class can predict the same low cost-to-go actions as the expert (i.e. making ϵ\epsilon large in the previous guarantee). The end result is that we may learn a policy that takes the short narrow road and eventually falls off the cliff, in these pathological scenarios.

Comparison to SEARN:

AggreVaTe shares deep commonalities with SEARN but by providing a reduction to online learning allows much more general schemes to update the policy at each iteration that may be more convenient or efficient rather than the particular stochastic mixing update of SEARN. These include deterministic ones that provide upper convex bounds on performance. In fact, SEARN may be thought as a particular case of AggreVaTe, where the policy class is the set of distributions over policies, and the online coordinate descent algorithm (Frank-Wolfe) of is used to update the distribution over policies at each iteration. Both collect data in a similar fashion at each iteration by executing the current policy up to a random time and then collecting cost-to-go estimates for explored actions in the current state. A distinction is that SEARN collects cost-to-go of the current policy after execution of the random action, instead of the cost-to-go of the expert. Interestingly, SEARN is usually used in practice with the approximation of collecting cost-to-go of the expert , rather than the current policy. Our approach can be seen as providing a theoretical justification for what was previously a heuristic.

Reinforcement Learning via No-Regret Policy Iteration

A relatively simple modification of the above approach enables us to develop a family of sample-based approximate policy iteration algorithms. Conceptually, we make a swap: from executing the current policy and then switching to the expert to observe a cost-to-go; to, executing the expert policy while collecting cost-to-go of the learner’s current policy. We denote this family of algorithms No-Regret Policy Iteration NRPI and detail and analyze it below.

This alternate has similar guarantees to the previous version, but may be preferred when no policy in the class is as good as the expert or when only a distribution of “important states” is available. In addition it can be seen to address a general model-free reinforcement learning setting where we simply have a state exploration distribution we can sample from and from which we collect examples of the current policy’s cost-to-go. This is similar in spirit to how Policy Search by Dynamic Programming (PSDP) proceeds, and in some sense, the algorithm we present here provides a generalization of PSDP. However, by learning a stationary policy instead of a non-stationary policy, NRPI can generalize across time-steps and potentially lead to more efficient learning and practical implementation in problems where TT is large or infinite.

Following we assume access to a state exploration distribution νt\nu_{t} for all times tt in 1,2,…,T1,2,\dots,T. As will be justified by our theoretical analysis, these state exploration distributions should ideally be (close to) that of a (near-)optimal policy in the class Π\Pi. In the context where an expert is present, then this may simply be the distribution of states induced by the expert policy, i.e. νt=dπ∗t\nu_{t}=d^{t}_{\pi^{*}}. In general, this may be the state distributions induced by some base policy we want to improve upon, or be determined from prior knowledge of the task.

Given the exploration distributions ν1:T\nu_{1:T}, NRPI proceeds as follows. At each iteration nn, it collects cost-to-go examples by sampling uniformly a time t∈{1,2,…,T}t\in\{1,2,\dots,T\}, sampling a state sts_{t} from νt\nu_{t}, and then executes an exploration action aa in sts_{t} followed by execution of the current learner’s policy πn\pi_{n} for time t+1t+1 to TT, to obtain a cost-to-go estimate (s,a,t,Q)(s,a,t,Q) of executing aa followed by πn\pi_{n} in state ss at time tt. In the particular case where νt=dπt\nu_{t}=d^{t}_{\pi} of an exploration policy π\pi, then to sample sts_{t}, we would simply execute π\pi from time 11 to t−1t-1, starting from the initial state distribution. Multiple cost-to-go estimates are collected this way and added in dataset DnD_{n}. After enough data has been collected, we update the learner’s policy, to obtain πn+1\pi_{n+1}, using any no-regret online learning procedure, on the loss defined by the cost-sensitive classification examples in the new data DnD_{n}. This is iterated for a large number of iterations NN. Initially, we may start with π1\pi_{1} to be any guess of a good policy from the class Π\Pi, or use the expert’s cost-to-go at the first iteration, to avoid having to specify an initial policy. This algorithm is detailed in Algorithm 2.

Consider the loss function LnL_{n} given to the online learning algorithm within NRPI at iteration nn. Assuming infinite data, it assigns the following loss to each policy π∈Π\pi\in\Pi:

This loss represents the expected cost-to-go of executing π\pi immediately for one step followed by current policy π^n\hat{\pi}_{n}, under the exploration distributions ν1:T\nu_{1:T}.

This sequence of losses over the iterations of training corresponds to an online cost-sensitive classification problem, as in the previous AggreVaTe algorithm. Let ϵregret\epsilon_{\textrm{regret}} be the average regret of the online learner on this online cost-sensitive classification problem after NN iterations of NRPI:

For any policy π∈Π\pi\in\Pi, denote the average L1L_{1} or variational distance between νt\nu_{t} and dπtd^{t}_{\pi} over time steps tt as D(ν,π)=1T∑t=1T∣∣νt−dπt∣∣1.D(\nu,\pi)=\frac{1}{T}\sum_{t=1}^{T}||\nu_{t}-d^{t}_{\pi}||_{1}. Note that if νt=dπt\nu_{t}=d^{t}_{\pi} for all tt, then D(ν,π)=0D(\nu,\pi)=0.

Denote by Qmax⁡Q_{\max} a bound on cost-to-go (which is always ≤TCmax⁡\leq TC_{\max}). Denote π^\hat{\pi} the best policy found by NRPI over iterations, and π‾\overline{\pi} the uniform mixture policy over π1:N\pi_{1:N} defined as before. Then NRPI achieves the following guarantee:

If a no-regret online cost-sensitive classification algorithm is used: lim⁡N→∞J(π‾)≤J(π′)+TQmax⁡D(ν,π′)\lim_{N\rightarrow\infty}J(\overline{\pi})\leq J(\pi^{\prime})+TQ_{\max}D(\nu,\pi^{\prime})

NRPI thus finds policies that are as good as any other policy π′∈Π\pi^{\prime}\in\Pi whose state distribution dπ′td^{t}_{\pi^{\prime}} is close to νt\nu_{t} on average over time tt. Importantly, if ν1:T\nu_{1:T} corresponds to the state distribution of an optimal policy in class Π\Pi, then this theorem guarantees that NRPI will find an optimal policy (within the class Π\Pi) in the limit.

This theorem provides a similar performance guarantee to the results for PSDP presented in . NRPI has the advantage of learning a single policy for test execution instead one at each time allowing for improved generalization and more efficient learning. NRPI imposes stronger requirements: it uses a no-regret online cost-sensitive classification procedure instead of simply a cost-sensitive supervised learner. For finite policy classes Π\Pi, or using reductions of cost-sensitive classification as mentioned previously, we may still obtain convex online learning problems for which efficient no-regret strategies exist or use the simple aggregation of data-sets with any sufficiently stable batch learner.

The result presented here can be interpreted as a reduction of model-free reinforcement learning to no-regret online learning. It is a regret reduction, as performance is related directly to the online regret at the cost-sensitive classification task. However performance is strongly limited by the quality of the exploration distribution. One would naturally consider adapting the exploration distributions ν1:T\nu_{1:T} over the iterations of training. It can be shown that if ν1:Ti\nu^{i}_{1:T} are the exploration distributions at iteration ii, and we have a mechanism for making ν1:Ti\nu^{i}_{1:T} converge to the state distributions of an optimal policy in Π\Pi as i→∞i\rightarrow\infty, then we would always be guaranteed to find an optimal policy in Π\Pi. Unfortunately, no known method can guarantee this.

Discussion and Future Work

The work here provides theoretical support for two seemingly unrelated empirical observations. First, and perhaps most crucially, much anecdotal evidence suggests that approximate policy iteration– and especially online variants – is more effective and stable than theory and counter-examples to convergence might suggest. This cries out for some explanation; we contend that it can be understood as such online algorithms often enjoy no-regret guarantees or share similar stability properties than can ensure relative performance guarantees.

Similarly, practical implementation of imitation learning-for-structured-prediction methods like SEARN rely on what was previously considered a heuristic of using the expert demonstrator as an estimate of the future cost-to-go. The resulting good performance can be understood as a consequence of this heuristic being a special case of AggreVaTe where the online Frank-Wolfe algorithm is used to choose policies. Moreover, stochastic mixing is but one of several approaches to achieving good online performance and deterministic variants have proven more effective in practice.

The resulting algorithms make suggestions for batch approaches as well: they suggest, for instance, that approximate policy iteration procedures (as well as imitation learning ones) are likely to be more stable and effective if they train not only on the cost-to-go of the most recent policy but also on previous policies. At first this may seem counter-intuitive, however, it prevents the oscillations and divergences that at times plague batch approximate dynamic programming algorithms by ensuring that each learned policy is good across many states.

From a broad point of view, this work forms a piece of a growing picture that online algorithms and no-regret analyses– in contrast with the traditional i.i.d. or batch analysis– are important for understanding learning with application to control and decision making . At first glance, online learning seems concerned with a very different adversarial setting. By understanding these methods as attempting to ensure both good performance and robust, stable learning across iterations , they become a natural tool for understanding the dynamics of interleaving learning and execution when our primary concern is generalization performance.

Limitations.

It is important to note that any method relying on cost-to-go estimates can be impractical as collecting each estimate for a single state-action pair may involve executing an entire trajectory. In many settings, minimizing imitation loss with DAgger , is more practical as we can observe the action chosen by the expert in every visited state along a trajectory and thus collect TT data points per trajectory instead of single one. This is less crucial in structured prediction settings where the cost-to-go of the expert may often be quickly computed which has lead to the success of the heuristic analyzed here. A potential combination of the two approaches, where first simple imitation loss minimization provides a reasonable policy, and then this is refined using AggreVaTe (e.g. through additional gradient descent steps) thus using fewer (expensive) iterations.

In the reinforcement learning setting, the bound provided is as strong as that provided by for an arbitrary policy class. However, as TQmax⁡TQ_{\max} is generally O(T2)O(T^{2}), this only provides meaningful guarantees when dπ′td^{t}_{\pi^{\prime}} is very close to νt\nu_{t} (on average over time tt). Previous methods like provide a much stronger, multiplicative error guarrantee when we consider competing against the bayes optimal policy in a fully observed MDP. It is not obvious how the current algorithm and analysis can extend to that variant of the bound.

Future Work.

Much work remains to be done: there are a wide variety of no-regret learners and their practical trade-offs are almost completely open. Future work must explore this set to identify which methods are most effective in practice.

References

Appendix: Proofs and Detailed Bounds

In this appendix, we provide the proofs and detailed analysis of the algorithms for imitation learning and reinforcement learning provided in the main document.

Lemmas

We begin with a classical and useful general lemma that is needed for bounding the expected loss under different distributions. This will be used several times throughout. Here this will be useful for bounding the expected loss under the state distribution of π^\hat{\pi} (which optional queries the expert a fraction of the time during it’s execution) in terms of the expected loss under the state distribution of πi\pi_{i}:

We provide the proof for X\mathcal{X} discrete, a similar argument can be carried for X\mathcal{X} continuous, using integrals instead of sums.

The L1L_{1} distance between the distribution of states encountered by π^i\hat{\pi}_{i}, the policy chosen by the online learner, and πi\pi_{i}, the policy used to collect data that continues to execute the expert’s actions with probability βi\beta_{i} is bounded as follows:

∣∣dπi−dπ^i∣∣1≤2min⁡(1,Tβi)||d_{\pi_{i}}-d_{\hat{\pi}_{i}}||_{1}\leq 2\min(1,T\beta_{i}).

Let dd the distribution of states over TT steps conditioned on πi\pi_{i} picking the expert π∗\pi^{*} at least once over TT steps. Since πi\pi_{i} always executes π^i\hat{\pi}_{i} (never executes the expert action) over TT steps with probability (1−βi)T(1-\beta_{i})^{T} we have dπi=(1−βi)Tdπ^i+(1−(1−βi)T)dd_{\pi_{i}}=(1-\beta_{i})^{T}d_{\hat{\pi}_{i}}+(1-(1-\beta_{i})^{T})d. Thus

The last inequality follows from the fact that (1−β)T≥1−βT(1-\beta)^{T}\geq 1-\beta T for any β∈\beta\in. Finally, since for any 2 distributions pp, qq, we always have ∣∣p−q∣∣1≤2||p-q||_{1}\leq 2, then ∣∣dπi−dπ^i∣∣1≤2min⁡(1,Tβi)||d_{\pi_{i}}-d_{\hat{\pi}_{i}}||_{1}\leq 2\min(1,T\beta_{i}). ∎

Below we use the performance difference lemma that is useful to bound the change in total cost-to-go. This general result bounds the difference in performance of any two policies. We present this results and its proof here for completeness.

Let π\pi and π′\pi^{\prime} be any two policy and denote Vt′V^{\prime}_{t} and Qt′Q^{\prime}_{t} the tt-step value function and QQ-value function of policy π′\pi^{\prime} respectively, then:

for U(1:T)U(1:T) the uniform distribution on the set {1,2,…,T}\{1,2,\dots,T\}.

Let πt\pi_{t} denote the non-stationary policy that executes π\pi in the first tt time steps, and then switches to execute π′\pi^{\prime} at time t+1t+1 to TT. Then we have J(π)=J(πT)J(\pi)=J(\pi_{T}) and J(π′)=J(π0)J(\pi^{\prime})=J(\pi_{0}). Thus:

AggreVaTe Reduction Analysis

Thus if a no-regret online algorithm is used to pick the sequence of policies π^1:N\hat{\pi}_{1:N}, then as the number of iterations N→∞N\rightarrow\infty:

For every policy π^i\hat{\pi}_{i}, we have:

where we use lemma 4.3 in the first equality, lemma 4.1 in the first inequality, and a similar argument to lemma 4.2 for the second inequality.

Since βi\beta_{i} are non-increasing, define nβn_{\beta} the largest n≤Nn\leq N such that βn>1/T\beta_{n}>1/T. Then:

Again, J(π^)≤J(π‾)J(\hat{\pi})\leq J(\overline{\pi}) since the minimum is always better than the average, i.e. min⁡iJ(π^i)≤1N∑i=1NJ(π^i)\min_{i}J(\hat{\pi}_{i})\leq\frac{1}{N}\sum_{i=1}^{N}J(\hat{\pi}_{i}). Finally, we have that when βi=(1−α)i−1\beta_{i}=(1-\alpha)^{i-1}, [nβ+T∑i=nβ+1Nβi]≤log⁡(T)+2α[n_{\beta}+T\sum_{i=n_{\beta}+1}^{N}\beta_{i}]\leq\frac{\log(T)+2}{\alpha}. This proves the first part of the theorem.

The second part follows immediately from the fact that ϵregret→0\epsilon_{\textrm{regret}}\rightarrow 0 as N→∞N\rightarrow\infty, and similarly for the extra term O(Qmax⁡∗Tlog⁡TαN)O\left(\frac{Q^{*}_{\max}T\log T}{\alpha N}\right). ∎

Finite Sample AggreVaTe with Q-function approximation

We here consider the finite sample case where actions are explored uniformly randomly and the reduction of cost-sensitive classification to squared loss regression is used. We consider learning an estimate Q-value function Q^\hat{Q} of the expert’s cost-to-go, and we consider a general case where the cost-to-go predictions may depend on features f(s,a,t)f(s,a,t) of the state ss, action aa and time tt, e.g. Q^\hat{Q} could be a linear regressor s.t. Q^T−t+1(s,a)=w⊤f(s,a,t)\hat{Q}_{T-t+1}(s,a)=w^{\top}f(s,a,t) is the estimate of the cost-to-go QT−t+1∗(s,a)Q^{*}_{T-t+1}(s,a), and ww are the parameters of the linear regressor we learn. Given such estimates Q^\hat{Q}, we consider executing the policy π^\hat{\pi}, such that in state ss at time tt, π^(s,t)=min⁡a∈AQ^T−t+1(s,a)\hat{\pi}(s,t)=\min_{a\in A}\hat{Q}_{T-t+1}(s,a).

After NN iterations of AggreVaTe, collecting mm regression examples (s,a,t,Q)(s,a,t,Q) per iteration, guarantees that with probability at least 1-δ\delta:

Thus if a no-regret online algorithm is used to pick the sequence of regressors Q^1:N\hat{Q}_{1:N}, then as the number of iterations N→∞N\rightarrow\infty, with probability 1:

Consider any state ss and time tt. Let a^i=π^i(s,t)\hat{a}_{i}=\hat{\pi}_{i}(s,t) and consider the action a′a^{\prime} of any other policy. We have that:

Additionally, for any joint distribution DD over (s,t)(s,t), and U(A)U(A) the uniform distribution over actions, we have that:

Thus we obtain that for every π^i\hat{\pi}_{i}:

Then we obtain that with probability at least 1−δ1-\delta:

Combining with the above, we obtain that with probability at least 1−δ1-\delta:

NRPI Reduction Analysis

We here provide the proof of the result for NRPI, sampled from state exploration distributions ν1:T\nu_{1:T}.

To analyze this version, we begin with an alternate version of the performance difference lemma (lemma 4.3) presented before:

Let π\pi and π′\pi^{\prime} be any two policy and denote VtV_{t} and QtQ_{t} the tt-step value function and QQ-value function of policy π\pi respectively, then:

for U(1:T)U(1:T) the uniform distribution on the set {1,2,…,T}\{1,2,\dots,T\}.

By applying lemma 4.3 to J(π′)−J(π)J(\pi^{\prime})-J(\pi), we obtain:

Now denote the loss LnL_{n} used by the online learner at iteration nn, s.t.:

and ϵregret\epsilon_{\textrm{regret}} the average regret after the NN iterations of NRPI:

For any policy π∈Π\pi\in\Pi, denote the average L1L_{1} distance between νt\nu_{t} and dπtd^{t}_{\pi} over time steps tt as:

Assume the cost-to-go of the learned policies π1,π2,…,πN\pi_{1},\pi_{2},\dots,\pi_{N} are non-negative and bounded by Qmax⁡Q_{\max}, for any state ss, action aa and time tt (in the worst case this is TCmax⁡TC_{\max}). Denote π^\hat{\pi} the best policy found by NRPI over the iterations, and π‾\overline{\pi} the uniform mixture policy over π1:N\pi_{1:N} defined as before. Then we have to following guarantee with this version of NRPI with learner’s cost-to-go:

Thus, if a no-regret online cost-sensitive classification algorithm is used, then:

Let QtiQ^{i}_{t} denote the tt-step QQ-value function of policy π^i\hat{\pi}_{i}. Then for every π^i\hat{\pi}_{i} we have:

where we use lemma 4.6 in the first equality, and lemma 4.1 in the first inequality.

Again, J(π^)≤J(π‾)J(\hat{\pi})\leq J(\overline{\pi}) since the minimum is always better than the average, i.e. min⁡iJ(π^i)≤1N∑i=1NJ(π^i)\min_{i}J(\hat{\pi}_{i})\leq\frac{1}{N}\sum_{i=1}^{N}J(\hat{\pi}_{i}). This proves the first part of the theorem.

The second part follows immediately from the fact that ϵregret→0\epsilon_{\textrm{regret}}\rightarrow 0 as N→∞N\rightarrow\infty. ∎