Instance-Dependent Complexity of Contextual Bandits and Reinforcement Learning: A Disagreement-Based Perspective
Dylan J. Foster, Alexander Rakhlin, David Simchi-Levi, Yunzong Xu
Introduction
How can we adaptively allocate measurements to exploit problem structure in the presence of rich, high-dimensional, and potentially stateful contextual information? In this paper, we investigate this question in the contextual bandit problem and its stateful relative, the problem of reinforcement learning with rich observations.
The contextual bandit is a fundamental problem in sequential decision making. At each round, the learner receives a context, selects an action, and receives a reward; their goal is to select actions so as to maximize the total long-term reward. This model has been successfully deployed in news article recommendation (Li et al., 2010; Agarwal et al., 2016), where actions represent articles to display and rewards represent clicks, and healthcare (Tewari and Murphy, 2017; Bastani and Bayati, 2020), where actions represent treatments to prescribe and rewards represent the patient’s response. Reinforcement learning with rich observations (Krishnamurthy et al., 2016; Jiang et al., 2017) is a substantially more challenging generalization in which the learner’s actions influence the evolution of the contexts, and serves as a stylized model for reinforcement learning with function approximation.
For both settings, our aim is to develop instance-dependent algorithms that adapt to gaps between actions in the underlying reward function to obtain improved regret. In the classical (non-contextual) multi-armed bandit problem, this issue has enjoyed extensive investigation beginning with the work of Lai and Robbins (1985). Here, it is well-understood that when the mean reward function admits a constant gap between the best and second-best action, well-designed algorithms can obtain logarithmic (in , the number of rounds) regret, which offers significant improvement over the worst-case minimax rate of . Subsequent work has developed a sharp understanding of optimal instance-dependent regret, both asymptotically and with finite samples (Burnetas and Katehakis, 1996; Garivier et al., 2016; Kaufmann et al., 2016; Lattimore, 2018; Garivier et al., 2019). Beyond the obvious appeal of lower regret, instance-dependent algorithms are particularly compelling for applications such as clinical trials—where excessive randomization may be undesirable or unethical—because they identify and eliminate suboptimal actions more quickly than algorithms that only aim for worst-case optimality.
We take the first step towards developing a similar theory for contextual bandits and reinforcement learning with general function approximation. We focus on the “realizable” or “well-specified” setting in which the learner has access to a class of regression functions that is flexible enough to capture the true reward function or value function. Our aim is to develop learning-theoretic guarantees for rich, potentially nonparametric function classes that 1) scale only with the statistical capacity of the class, and 2) are efficient in terms of basic computational primitives for the class.
For contextual bandits, instance-dependent regret bounds are not well-understood. Positive results are known for simple classes of functions such as linear classes (Dani et al., 2008; Abbasi-Yadkori et al., 2011; Hao et al., 2019) or nonparametric Lipschitz/Hölder classes (Rigollet and Zeevi, 2010; Perchet and Rigollet, 2013; Hu et al., 2020). On the other hand, for arbitrary finite function classes, it is known that gap-dependent regret bounds are not possible in general (Foster and Rakhlin, 2020). One line of work develops algorithms which attain instance-dependent bounds for general classes under additional structural assumptions or distributional assumptions (Russo and Van Roy, 2013; Bietti et al., 2018; Foster et al., 2018), but it is not clear whether these assumptions are fundamental (in particular, they are not required to obtain minimax rates). For reinforcement learning, the situation is more dire: while instance-dependent rates have been explored in the finite state/action setting (Burnetas and Katehakis, 1996; Tewari and Bartlett, 2008; Ok et al., 2018; Simchowitz and Jamieson, 2019), very little is known for the general setting with high dimensional states and function approximation.
Beyond the basic issue of what instance-dependent rates can be achieved for general function classes, an important question is whether they can be achieved efficiently, using practical algorithms. A recent line of work (Foster et al., 2018; Foster and Rakhlin, 2020; Simchi-Levi and Xu, 2020; Xu and Zeevi, 2020) develops algorithms that are efficient in terms calls to an oracle for (offline/online) supervised regression. A secondary goal in this work is to develop practical instance-dependent algorithms based on this primitive.
For contextual bandits and reinforcement learning with rich observations, what properties of the function class enable us to adapt to the gap, and what are the fundamental limits?
More ambitiously, can we get the best of both worlds: Adapt to the gap and obtain the minimax rate simultaneously?
For contextual bandits, we address each of these issues. We introduce a family of new complexity measures which are both necessary (in a certain sense) and sufficient to obtain fast gap-dependent regret bounds. We introduce new oracle-efficient algorithms which adapt to the gap and to these complexity measures whenever possible, while also obtaining the minimax rate. We prove new structural results which—in conjunction with our lower bounds—tie together a number of complexity measures previously proposed in contextual bandits, reinforcement learning, and active learning and provide new insight into their role in determining the optimal instance-dependent regret. We then extend these complexity measures to reinforcement learning with function approximation and give new oracle-efficient algorithms that adapt to them. Overall, our results for RL are somewhat less complete, but we believe they suggest a number of exciting new directions for future research.
We assume that the learner has access to a class of value functions (e.g., regression trees or neural networks) that is flexible enough to model the true reward distribution. In particular, we make the following standard realizability assumption (Chu et al., 2011; Agarwal et al., 2012; Foster et al., 2018).
For each regression function , let denote the induced policy (with ties broken arbitrarily, but consistently), and let be the induced policy class. The goal of the learner is to ensure low regret to the optimal policy:
where . For simplicity, we assume that is unique for all , but our results extend when this is not the case.
Consider the simple case where is finite. For general finite classes under 1, the minimax rate for contextual bandits is (Agarwal et al., 2012). The main question we investigate is to what extent this rate can be improved when the instance has a uniform gapThis is sometimes referred to as the Massart noise condition, which has been widely studied in statistical learning theory in the context of obtaining faster rates for classification. in the sense that for all ,
This is impossible in a fairly strong sense: Foster and Rakhlin (2020) show that exist function classes for which any algorithm must haveFoster and Rakhlin (2020) prove this lower bound for adversarial contexts. Our Theorem 2.2 implies an analogous lower bound for stochastic contexts.
Since is exponentially large for most models, polynomial dependence on is unacceptable. The natural question then, and the one we address, is what structural properties of allow for bounds of the form Eq. 3 that scale only logarithmically with the size of the value function class. We primarily present results on finite classes for simplicity, but our lower bounds and structural results concern infinite classes, and our algorithms make no assumption on the structure.
We show that variants of the disagreement coefficient, a key parameter in empirical process theory and active learning (Alexander, 1987; Hanneke and Yang, 2015), play a fundamental role in determining the optimal gap-dependent regret bounds for contextual bandits with rich function classes.
Our most basic results concern a parameter we call the policy disagreement coefficient,In fact, for binary actions the policy disagreement coefficient is the same as the usual disagreement coefficient from active learning (Hanneke and Yang, 2015); we adopt the name policy disagreement coefficient only to distinguish from other parameters we introduce. defined as
Informally, the policy disagreement coefficient measures how likely we are to encounter a context on which some near-optimal policy disagrees with . Low disagreement coefficient means that all the near-optimal policies deviate from only in a small, shared region of the context space, while large disagreement coefficient means that the points on which disagreement occurs are more prevalent throughout the context space (w.r.t ), so that many samples are required to rule out all of these policies.
We introduce a new contextual bandit algorithm, AdaCB, which adapts to the gap whenever the policy disagreement coefficient is bounded. In particular, we show the following.
with no prior knowledge of or .
so that AdaCB enjoys logarithmic regret. We emphasize that while Theorem 2.1 concerns finite classes, this is only a stylistic choice: AdaCB places no assumption on the structure of , and the analysis trivially generalizes by replacing with standard learning-theoretic complexity measures such as the pseudodimension.
While this is certainly encouraging, it is not immediately clear whether the rate in Eq. 5 is fundamental. To this end, we prove that dependence on the disagreement coefficient is qualitatively necessary.
Theorem 2.2 shows that the regret bound Eq. 5 attained by AdaCB cannot be improved without further assumptions on . However, it leaves the possibility of more refined complexity measures that are tighter than for most instances, yet coincide on the construction that realizes the lower bound in Theorem 2.2. To this end, we introduce a second complexity measure, the value function disagreement coefficient, which can exploit the scale-sensitive nature of the value function class to provide tighter bounds. The value function disagreement coefficient is defined as
We show that AdaCB, with a slightly different parameter configuration, can adapt to value function disagreement coefficient in a best-of-both-worlds fashion.
where .
We show (Theorem 2.4) that this dependence on is qualitatively necessary, meaning that AdaCB is adapts near-optimally without additional assumptions.
Beyond contextual bandits, our scale-sensitive generalization of the disagreement coefficient is new to both empirical process theory and active learning to our knowledge, and may be of independent interest.
While the distribution-dependent nature of our disagreement-based upper bounds can lead to tight guarantees for benign distributions, it is natural to ask: For what classes (resp. ) can we ensure the policy (resp. value) disagreement coefficient is bounded for any distribution ? Hanneke and Yang (2015) show that the policy disagreement coefficient is always bounded by a combinatorial parameter for called the (policy) star number.In fact, the star number exactly coincides with the worst-case value of the disagreement coefficient over all possible distributions and scale parameters. An immediate consequence (via Theorem 2.1) is that AdaCB enjoys logarithmic regret even in the distribution-free setting for classes with bounded policy star number. More interestingly, we show (Theorem 2.6) that for any class , bounded policy star number is necessary to obtain logarithmic regret in the worst-case (with respect to both and the class realizing ). Thus, we have the following characterization.
For any policy class , bounded policy star number is necessary and sufficient to obtain logarithmic regret.
Compared to our disagreement-based lower bounds, which rely on specially designed function classes, this lower bound holds for any policy class.
This characterization motivates us to define a scale-sensitive analogue of the star number called the value function star number. The value function star number is a new combinatorial parameter even within the broader literature on active learning and empirical process theory, and we show (Theorem 2.7) that it bounds the value function disagreement coefficient for all choices of the context distribution and scale parameter . We then show (Theorem 2.8) that a weak version of the value function disagreement coefficient is necessary to obtain logarithmic regret for worst-case context distributions, leading to the following characterization.
For any value function class , bounded value function star number is (weakly) necessary and sufficient to obtain logarithmic regret.
The value function star number is closely related to—and in particular always upper bounded by—the (value function) eluder dimension of Russo and Van Roy (2013). The eluder dimension was introduced to prove regret bounds for the generalized UCB algorithm and Thompson sampling for contextual bandits with adversarial contexts, and more recently has been used to analyze algorithms for reinforcement learning with function approximation (Osband and Van Roy, 2014; Wen and Van Roy, 2017; Ayoub et al., 2020; Wang et al., 2020). An immediate consequence of the (disagreement coefficient)(star number)(eluder dimension) connection is that boundedness of the eluder dimension suffices to obtain logarithmic regret with AdaCB. Unlike the star number though, bounded eluder dimension is not required for the stochastic setting we consider. However, building on our previous lower bounds, we show (Theorem 2.9) that a weak version of the eluder dimension is necessary to obtain logarithmic regret under adversarial contexts, and give a tighter analysis of the generalized UCB algorithm to show that it attains this rate (this is not a best-of-both-worlds guarantee). This result places the eluder dimension on more solid footing and shows that while it is not required for minimax rates, it plays a fundamental role for instance-dependent rates.
The relationship between all of our complexity measures, old and new, is summarized in Fig. 1. Beyond expanding the scope of settings for which logarithmic regret is achievable, we hope our structural results and lower bounds provide a new lens through which to understand existing algorithms and instance-dependent rates, and provide new clarity.
As a disclaimer, we mention that the primary goal of this work is to understand how contextual information shapes the optimal instance-dependent rates for contextual bandits. We believe that this question is challenging and interesting even in the finite-action regime (in fact, even when !) and as such, we do not focus on obtaining optimal dependence on in our upper or lower bounds, nor do we handle infinite actions. Fully understanding the interplay between contexts and actions is a fascinating open problem, and we hope to see this addressed in future work.
Our main algorithm, AdaCB, is oracle-efficient. That is, it accesses the value function class only through a weighted least squares regression oracle capable of solving problems of the form
We replicated the large-scale empirical contextual bandit evaluation setup of Bietti et al. (2018), which compares a number of state-of-the art general-purpose contextual bandit algorithms across more than 500 datasets. We found that our new algorithm, AdaCB, typically gives comparable or superior results to existing baselines, particularly on challenging datasets with many actions.
2 Overview of Results: Reinforcement Learning
Building on our contextual bandit results, we provide disagreement-based guarantees for episodic reinforcement learning with function approximation in a model called the block MDP (Krishnamurthy et al., 2016; Du et al., 2019a), which is an important type of contextual decision process (Jiang et al., 2017).
The block MDP may be thought of as a generalization of the contextual bandit problem. Each round of interaction is replaced by an episode of length . While the initial context (now referred to as a state) in each episode is drawn i.i.d. as in the contextual bandit, the evolution of the subsequent states is influenced by the learner’s actions. Now, without further assumptions, this is simply a general MDP, and function approximation provides no benefits in the worst-case. To allow for sample-efficient learning guarantees, the block MDP model assumes there is an unobserved latent MDP with states, and that each observed state is drawn from an emission distribution for the current latent state . When and , this recovers the contextual bandit, and in general the goal is to use an appropriate value function class to attain sample complexity guarantees that are polynomial in , but not (which, as in the contextual bandit, is typically infinite and high-dimensional).
More formally, the block MDP setup we consider is a layered episodic Markov decision process with horizon , state space (with ), and action space with . We proceed in episodes. Within each episode we observe rewards and observations through the following protocol, beginning with .
Observe reward and next state .
As mentioned above, the state space is potentially rich and high-dimensional, and dependence on is unacceptable. Hence, to enable sample-efficient reinforcement learning guarantees with function approximation, the block MDP model assumes the existence of a latent state space , and assumes that each state can be uniquely attributed to a latent state . More precisely, we assume that for each , factorizes, so that we can view as generated by the process , , where is an (unknown) emission distribution, and is the latent state for layer . We make the following standard decodability assumption (Krishnamurthy et al., 2016; Jiang et al., 2017; Du et al., 2019a).
This assumption implies that the optimal policy depends only on the current context . We write the optimal -function for layer as and let be the optimal value function.
As in the contextual bandit setting, take as a given class of functions that attempts to model the optimal value function. We let be the value function class for layer (with ), and we make the following optimistic completeness assumption (Jin et al., 2020; Wang et al., 2019, 2020).
For all and all functions , we have that
3 implies that , generalizing the realizability assumption (1) but it is significantly stronger, as it requires that the function class contains Bellman backups for arbitrary functions.
We develop a new instance-dependent algorithm that adapts to the gap in the optimal value function to attain improved sample complexity. Define , and define the worst-case gap as
Our main result is an oracle-efficient algorithm, RegRL, which attains a tight gap-dependent PAC-RL guarantee whenever an appropriate generalization of the value function disagreement coefficient is bounded.
This theorem has two key features. First, when , the scaling of and in the term is optimal even for in the special case of contextual bandits, and improves over the minimax rate, which scales as . Second, and perhaps more importantly, RegRL is computationally efficient, and only requires a regression oracle for the value function class. Previous works require stronger oracles and typically do not attain optimal dependence on , but are not fully comparable in terms of statistical assumptions (Krishnamurthy et al., 2016; Jiang et al., 2017; Dann et al., 2018; Du et al., 2019b, a; Misra et al., 2019; Feng et al., 2020; Agarwal et al., 2020); see Section 3 for a detailed comparison. At a conceptual level, the design and analysis of RegRL use several new techniques that leverage our disagreement-based perspective, and we hope that they will find broader use.
3 Additional Notation
4 Organization
Section 2 contains our main contextual bandit results. Sections 2.1, 2.2 and 2.3 contain our main algorithm, AdaCB, and disagreement-based best-of-both-worlds guarantees and lower bounds. Section 2.4 and Section 2.5 contain structural results and guarantees for worst-case distributions and adversarial contexts. Section 3 contains disagreement-based guarantees for reinforcement learning with function approximation. In Section 4 we show in detail how to implement all of our algorithms for contextual bandits and reinforcement learning using regression oracles for the value function class. Section 5 contains experiments with AdaCB, and we conclude in Section 6 with discussion and open problems. Proofs are deferred to the appendix.
Contextual Bandits
We now introduce our contextual bandit algorithm, AdaCB, and give regret bounds based on the policy and value function disagreement coefficients, as well as matching lower bounds. We then show how to relate these quantities to other structural parameters for the distribution-free and adversarial settings, and instantiate our bounds for concrete settings of interest.
Our main algorithm, AdaCB, is presented in Algorithm 1. Exploration in AdaCB is based on a probability selection strategy introduced by Abe and Long (1999) (see also Abe et al. (2003)) and extended to contextual bandits with general function classes by Foster and Rakhlin (2020) and Simchi-Levi and Xu (2020) for online and offline regression oracles, respectively. We utilize a general version of the Abe-Long strategy which we refer to by the more descriptive name “inverse gap weighting” (IGW). The strategy is parameterized by a learning rate and a subset of actions. Given a context and reward predictor , we define a probability distribution by
where . Both Foster and Rakhlin (2020) and Simchi-Levi and Xu (2020) apply this strategy with , and with the learning rate selected either constant or following a fixed non-adaptive schedule. Building on this approach, AdaCB follows the same general template as the FALCON algorithm of Simchi-Levi and Xu (2020), but with two key differences. First, rather than applying the IGW scheme to all actions, we restrict only to actions which are “plausible” in the sense that they are induced by a version space maintained (implicitly) by the algorithm. Second, we choose the learning rate in a data-driven fashion.
In more detail, we operate in a doubling epoch schedule. Letting with , each epoch consists of rounds , and there are epochs in total. At the beginning of each epoch , we compute an estimator for the Bayes regression function by performing least-squares regression on data collected so far (2). We also maintain a version space , which is the set of all plausible predictors that cannot yet be eliminated based on square loss confidence bounds (3). Based on , we select the learning rate for the current epoch adaptively by estimating a parameter called the instance-dependent scale factor () which is closely related to the policy disagreement coefficient (Option I) and the value function disagreement coefficient (Option II). Then, when a context in epoch arrives, AdaCB first computes the candidate action set (9), which is the set of actions that are optimal for some predictor , and thus could plausibly be equal to . The algorithm then sets (10), samples , and proceeds to the next round.
The adaptive learning rate balances the algorithm’s efforts between exploration and exploitation: a larger learning rate leads to more aggressive exploitation (following the least-squares predictor ), while a smaller learning rate leads to more conservative exploration over the candidate action set. AdaCB’s learning rate (6) has two components: the instance-dependent scale factor , which is adaptively determined by the collected data; and a non-adaptive component propositional to , where is the length of the epoch . While the non-adaptive component is the same as the learning rate in FALCON and is sufficient if one only aims to achieve the minimax regret, the adaptive factor , combined with the action elimination procedure above, is essential for AdaCB to achieve near-optimal instance-dependent regret. We offer two different schemes to select : The first adapts to the policy disagreement coefficient, while the second adapts to the value function disagreement coefficient.
Option I (policy-based exploration). This option selects as a sample-based approximation to the quantity
Option II (value-based exploration). While the disagreement probability used in Option I is a useful quantity that provides information on the hardness of the problem instance, it does not fully utilize the value function structure. In particular, it is only sensitive to the occurrence of disagreement on each context, but is not sensitive to the scale of disagreement (i.e., how much it would cost if we chose a disagreeing action) on each context. This motivates Option II, which is based on a refined confidence width that accounts for both the occurrence and the scale of disagreement. Specifically, measures the worst-case cost of exploring a sub-optimal action in the candidate action set for , and Option II selects as a sample-based approximation to the quantity
We make a few additional remarks. First, the learning rate and confidence width parameters in Algorithm 1 (and consequently our main theorems) consider a general finite class . This is only a stylistic choice: AdaCB works as-is for general function classes, with the dependence on in these parameters replaced by standard learning-theoretic complexity measures such as the pseudodimension; see Section 2.7. Second, Algorithm 1 takes as input. One can straightforwardly extend Algorithm 1 to work with unknown using the standard doubling trick. Finally, we emphasize that Option I and Option II are designed based on different techniques and lead to different instance-dependent guarantees. Designing a single option that simultaneously achieving the goals of Option I and Option II is an interesting future direction.
AdaCB can be implemented efficiently with a weighted least squares regression oracle Oracle (see Eq. RO) as follows.
At each epoch , call Oracle to compute the square loss empirical risk minimizer .
For any given context , the candidate action set can be computed using either oracle calls when is convex or oracle calls for general (in particular, finite) classes.
For Option II, the function can be computed in a similar fashion to using or oracle calls in the convex and general case, respectively.
Altogether, since and are computed for different contexts per round amortized, the algorithm requires calls to Oracle overall when is convex. The reduction is described in full in Section 4.
2 Disagreement-Based Guarantees
We are now ready to state our first main regret guarantee for AdaCB, which is based on the policy disagreement coefficient Eq. 4. The theorem also includes a more general result in terms of an intermediate quantity we call the cost-sensitive policy disagreement coefficient, which we define by
For any instance with uniform gap , Algorithm 1 with Option I ensures that
More generally, Algorithm 1 with Option I ensures that for every instance, without any gap assumption,
Let us describe some key features of Theorem 2.1.
For example, for the classical multi-armed bandit setup where is a singleton, we have , recovering the usual instance-dependent rate (up to logarithmic factors). We give some more examples where logarithmic regret can be attained in a moment.
More generally, since the function is increasing in and is decreasing, the best choice for the bound Eq. 9 (up to constant factors) is the critical radius that satisfies the balance
For example, if for some , then choosing , leads to
The critical radius also plays an important role in the proof of Theorem 2.1.
With no assumption on the gap or , we may always take , so that Eq. 10 implies the minimax rate .
We now show that the regret bound attained by AdaCB in Theorem 2.1 is near-optimal, in the sense that it cannot be improved beyond log factors without making additional assumptions on the class or the contextual bandit instance.
Formally, we model a contextual bandit algorithm A as a sequence of mappings , so that
is the algorithm’s action distribution after observing context at round .
For a given function class , we define
Our main lower bound shows that there exists a function class for which the constrained minimax complexity matches the upper bound Eq. 9.
All have uniform gap .
The constrained minimax complexity is lower bounded by
where hides factors logarithmic in and .
This lower bound has a simple interpretation: The term is the regret incurred if we commit to playing a particular policy for any “simple” instance in which the gap is no larger than for all actions, while the term is the cost of exploration to find such a policy.
The first implication of this lower bound is that without an assumption such as the disagreement coefficient, logarithmic regret is impossible even when the gap is constant; this alone is not surprising since Foster and Rakhlin (2020) already showed a similar impossibility for non-stochastic contexts, but Theorem 2.2 strengthens this result since it holds for stochastic contexts. More importantly, the lower bound shows that the tradeoff in Theorem 2.1 is tight as a function of , and , so additional assumptions are required to attain stronger instance-dependent regret bounds for specific classes. We explore such assumptions in the sequel.
We mention one important caveat: Compared to instance-dependent lower bounds for multi-armed bandits (e.g., Garivier et al. (2019)), the quantification for Theorem 2.2 is slightly weaker. Rather than lower bounding the regret for any particular instance (assuming uniformly good performance in a neighborhood), we only show existence of a particular realizable instance with gap for which the regret lower bound holds. We suspect that strengthening the lower bound in this regard will be difficult unless one is willing to sacrifice dependence on .
The (policy) disagreement coefficient has been studied extensively in active learning, and many bounds are known for different function classes and distributions of interest. We refer to Hanneke (2014) for a comprehensive survey and summarize some notable examples here (restricting to the binary/two-action case, which has been the main focus of active learning literature).
When is a -dimensional linear function class, whenever is isotropic log-concave (Balcan and Long, 2013). More generally, as long as admits a density (Hanneke, 2014).
3 Scale-Sensitive Guarantees
We now give instance-dependent regret guarantees based on the value function disagreement coefficient, which is defined via
Compared to the policy disagreement coefficient, the value function disagreement coefficient is somewhat easier to bound directly when the value function class has simple structure. For example, when is linear, we can bound in terms of the dimension for any distribution with a simple linear algebraic calculation.
More generally—as we show in the next section—the value function disagreement coefficient is always bounded by the so-called eluder dimension for , allowing us to leverage existing results for this parameter (Russo and Van Roy, 2013). However, the value function disagreement coefficient can be significantly tighter because—among other reasons—it can leverage benign distributional structure.
We now show that AdaCB can simultaneously attain the minimax regret bound and adapt to the value function disagreement coefficient.
For any instance, Algorithm 1 with Option II ensures that
where .
As with our policy disagreement-based result, we complement Theorem 2.3 with a lower bound. To state the result, we define
which is the value-based analogue of the constrained minimax complexity Eq. 13. Our main lower bound is as follows.
All have uniform gap .
The constrained minimax complexity is lower bounded by
where hides factors logarithmic in and .
As with Theorem 2.2, the lower bound Eq. 17 has a simple interpretation: The term is an upper bound on the regret of any policy for which the predictor is within -radius of (under gap ), and the term is the exploration cost to find such a predictor.
This implies that the instance-dependent term in Eq. 15 is nearly optimal in this regime, in that the parameter used by the algorithm can at most be increased by a sub-polynomial factor. In general, however, Eq. 15 does not exactly match the tradeoff in Eq. 17, but we suspect that AdaCB can be improved to close the gap.With a-priori knowledge of , this is fairly straightforward.
4 Distribution-Free Guarantees
The disagreement coefficients introduced in the previous section depend strongly on the context distribution . On one hand, this is a desirable feature, since it means we may pay very little to adapt to the gap for benign distributions. On the other hand, in practical applications, we may not have prior knowledge of how favorable is, or whether we should expect to do any better than the minimax rate. A natural question then is for what function classes we can guarantee logarithmic regret for any distribution . An important result of Hanneke and Yang (2015) shows that in the binary setting, the policy disagreement coefficient is always bounded by a combinatorial parameter called the (policy) star number. We give distribution-free results based on two multiclass generalizations of this parameter
For any policy and policy class , let the weak policy star number denote the largest number such that there exist contexts and policies such that for all ,
For any policy and policy class , let the strong policy star number denote the largest number such that there exist context-action pairs and policies such that for all ,
These definitions are closely related: It is simple to see that
This result immediately implies that AdaCB enjoys logarithmic regret for any function class with bounded policy star number.
For any function class , AdaCB with Option I has
One slightly unsatisfying feature of our lower bounds based on the disagreement coefficient (Theorem 2.2/Theorem 2.4) is that they are worst-case in nature, and rely on an adversarially constructed policy class. Our next theorem shows that Eq. 20 is near-optimal for any policy class (albeit, in the worst case over all value function classes inducing ). This means that if we take the policy class as a given rather than the value function class , bounded policy star number is both necessary and sufficient for logarithmic regret.
Let a policy class , , and gap be given. Then there exists a value function class such that
, and in particular some has .
Each has uniform gap .
This bound scales with the strong variant of the policy disagreement coefficient rather than the (smaller) weak variant, but does not directly scale with the number of actions. Hence, the dependence matches the upper bound of AdaCB in Eq. 20 whenever the second inequality in Eq. 18 saturates (since can itself scale with the number of actions). We suspect that the lower bound is tight and that the upper bound can be improved to scale with , with no explicit dependence on the number of actions.
Unlike the upper bound Eq. 20, the lower bound Eq. 21 does not scale with . This does not appear to be possible to resolve without additional assumptions, as there are classes for which Eq. 21 is tight (consider independent multi-armed bandit problems), as well as classes for which Eq. 20 is tight (cf. Theorem 2.2). Similar issues arise in lower bounds for active learning (Hanneke and Yang, 2015). However in the full version of Theorem 2.6 (Section D.3), we are able to strengthen the lower bound to roughly \Omega\Big{(}\frac{\mathfrak{s}^{\mathsf{pol}}_{\pi^{\star}}(\Pi)+\log\left\lvert\mathcal{F}\right\rvert}{\Delta}\Big{)} for Natarajan classes.
We now extend our development based on the star number to give distribution-free upper bounds on the value function disagreement coefficient. Compared to the policy-based setting, where we were able to simply appeal to upper bounds from Hanneke and Yang (2015), scale-sensitive analogues of the star number have not been studied in the literature to our knowledge. This leads us to introduce the following definition.
Let be the length of the longest sequence of context-action pairs such that for all , there exists such that
The value function star number is defined as .
When the function class is -valued, the value function star number coincides with the policy star number, i.e. . In general though, for a given class , the policy star number for the induced class can be arbitrarily large compared to the value function star number.Interestingly, this construction also shows that in general, the value function star number for can be arbitrarily small compared to the fat-shattering dimension. This is somewhat counterintuitive because the star number for a policy class always upper bounds its VC dimension.
Generalizing the result of Hanneke and Yang (2015), we show that the value function star number bounds the value function disagreement coefficient for all distributions and all scale levels.
For any uniform Glivenko-Cantelli class and ,
Compared to the bound for the policy star number (Theorem 2.5), Theorem 2.7 is worse by a quadratic factor when specialized to discrete function classes. Improving Eq. 22 to be linear in the star number is an interesting technical question. The assumption that is uniform Glivenko-Cantelli is quite weak and arises for technical reasons: compared to the policy star number, which always bounds the VC/Natarajan dimension, boundedness of the value function star number is not sufficient to ensure that enjoys uniform convergence.
The main takeaway from Theorem 2.7 is that AdaCB with Option II guarantees
for any distribution. Following our development for the policy star number, we now turn our attention to establishing the necessity of the value function star number for gap-dependent regret bounds. Our lower bound depends on the following “weak” variant of the parameter.
For any and , define be the length of the largest sequence of points such that for all , there exists , such that
and .
.
Relative to the basic value function star number, the key difference above is that we allow a separate scale parameter to control the sum constraint in Item 3 above. This is important to prevent passive information leakage in our lower bound construction, but we suspect this condition can be relaxed to more closely match Definition 2.3. Our main lower bound is as follows.To avoid technical conditions involving the boundary of the interval , we allow for unit Gaussian rewards with means in for this lower bound.
Let a function class and with uniform gap be given. Let be the largest solution to the equationThere is always at least one solution to Eq. 24, since we can take .
As mentioned before, we suspect that the linear scaling in Eq. 25 is correct and that Eq. 23 can be improved to match. The dependence on the additional scale parameter is more subtle, and requires further investigation.
5 Adversarial Contexts and the Eluder Dimension
Let be the length of the longest sequence of context-action pairs such that for all , there exists such that
The value function eluder dimension is defined as .
The only difference between the value function star number and the value function eluder dimension is whether the sum in Eq. 26 takes the form “” or “”; the latter reflects the stronger sequential structure present when contexts are adversarial. It is immediate that
However, the separation between the two parameters can be arbitrarily large in general.
While Eq. 27 shows that boundedness of the eluder dimension is sufficient for AdaCB achieve logarithmic regret for stochastic contexts (via Eq. 23), Proposition 2.3, shows that it may lead to rather pessimistic upper bounds. This is not surprising, since the eluder dimension was designed to accomodate adversarially chosen contexts. The next result, which is a small refinement of the analysis of Russo and Van Roy (2013), shows that bounded eluder dimension indeed suffices to guarantee logarithmic regret for the adversarial setting; we defer a precise description of the algorithm to the proof.
For the adversarial context setting, the general function class UCB algorithm—when configured appropriately—guarantees that
for any instance with uniform gap .
Paralleling our results for the value function star number, we show that boundedness of a weak variant of the value function eluder dimension is required for logarithmic regret with adversarial contexts.
For any and , define be the length of the largest sequence of contexts such that for all , there exists , such that
and .
.
Our main lower bound here shows that—with the same caveats as Theorem 2.8—the scaling in Eq. 28 is near-optimal.As with Theorem 2.8, we allow for unit Gaussian rewards with means in for this lower bound.
Let a function class and with uniform gap be given. Let be the largest solution to the equation
An immediate consequence of Theorem 2.7 and Eq. 27 is that we always have . While this bound scales quadratically, we can show through a more direct argument that the value function disagreement coefficient grows at most linearly with the eluder dimension.
For any uniform Glivenko-Cantelli class and ,
This result strongly suggests that the quadratic dependence on the value function star number in Theorem 2.7 can be improved.
Previous work which uses the eluder dimension to analyze algorithms for contextual bandits and reinforcement learning (Russo and Van Roy, 2013; Osband and Van Roy, 2014; Ayoub et al., 2020; Wang et al., 2020) only works with the value function-based formulation in Definition 2.5. In light of our results for the disagreement coefficient and star number, we propose the following policy-based variant of the eluder dimension.
For any policy and policy class , let the policy eluder dimension denote the largest number such that there exist context-action pairs and policies such that for all ,
We are not yet aware of any upper bounds based on the policy eluder dimension, but we can show that boundedness of this parameter is indeed necessary for logarithmic regret in the adversarial context setting (in a worst-case sense).
Consider the adversarial context setting. Let a policy class , , and gap be given. Then there exists a value function class such that:
, and in particular some has .
Each has uniform gap .
6 Discussion
Our proof of Theorem 2.1 builds on the regret analysis framework established in Simchi-Levi and Xu (2020), which interprets IGW as maintaining a distribution over policies in the universal policy space , and shows that the induced distribution of policies is a solution to an implicit optimization problem which (when configured appropriately) provides a sufficient condition for minimax contextual bandit learning. Following this framework, we also view AdaCB’s sequential IGW procedure as implicitly maintaining a sequence of distributions over policies, but with an additional key property: the support of the implicit distribution over policies is adaptively shrinking. This is enabled by AdaCB’s elimination procedure and is essential to our instance-dependent analysis. We show that the implicit distribution over policies given by AdaCB is a solution to a novel data-driven implicit optimization problem (Lemma C.6), which, when configured appropriately by adaptively selecting the learning rate with Option I, provides a sufficient condition for optimal policy disagreement-based instance-dependent contextual bandit learning. Our proof introduces several new techniques to instance-dependent analysis of contextual bandits, including using disagreement-based indicators and disagreement probability to obtain faster policy convergence rates (Lemmas C.8, C.10 and C.11). We also remark that the selection of the adaptive learning rate is non-trivial, and we derive the schedule Option I by carefully balancing key quantities appearing in our analysis.
Our lower bounds build on the work of Raginsky and Rakhlin (2011), which provides information-theoretic lower bounds for passive and active learning in terms of the disagreement coefficient. As in this work, we rely on a specialized application of the Fano method using the reverse KL-divergence, but with some refinements to make the technique more suited for regret lower bounds. For Theorem 2.2, we also incorporate improvements to the method suggested by Hanneke (2014) to obtain the correct dependence on .
The proof of Theorem 2.7 is somewhat different from the proof of the analogous policy-based result by Hanneke and Yang (2015). The key step toward proving LABEL:{thm:disagreement_to_star} is to prove an empirical analogue of the result that holds whenever is uniform over a finite sequence of examples. This result is given in Lemma E.1, and is motivated by a property of the eluder dimension established in Proposition 3 of Russo and Van Roy (2013), with their “”-based definition changed to our “”-based definition. The proof of Lemma E.1 trickier, however, as our “”-based definition breaks several combinatorial properties utilized in the proof of Russo and Van Roy (2013). We address this challenge by proving a new combinatorial lemma (Lemma E.3), which is fairly general and may be interesting on its own right. Nevertheless, our upper bound is quadratic in rather than linear, and we hope that this dependence can be improved in future work.
Gap-dependent regret bounds for contextual bandits have not been systematically studied at the level of generality we consider here, and we are not aware of any prior lower bounds beyond the linear setting. Most prior work has focused on structured function classes such as linear (Dani et al., 2008; Abbasi-Yadkori et al., 2011; Hao et al., 2019) and nonparametric Lipschitz/Hölder classes (Rigollet and Zeevi, 2010; Perchet and Rigollet, 2013; Hu et al., 2020).
Our work draws inspiration from Krishnamurthy et al. (2017), who defined variants of the disagreement coefficient which depend on scale-sensitive properties of the class in the context of cost-sensitive multiclass active learning. Compared to these results, the key difference is that our value function disagreement coefficient is defined in terms of the ball for the class rather than the excess risk ball for the induced policy class. This change is critical to ensure that the value function disagreement coefficient is bounded by the value function star number, and in particular that it is always bounded for linear classes.
Our work also builds on Foster et al. (2018), who give instance-dependent guarantees for the generalized UCB algorithm and an action elimination variant for general function classes based on the cost-sensitive multiclass disagreement coefficients introduced in Krishnamurthy et al. (2017). We improve upon this result on several fronts: 1) As mentioned above, our notion of value function disagreement coefficient is tighter, and is always bounded by the value function star number and value function eluder dimension 2) we attain optimal dependence on the gap, 3) our algorithms are guaranteed to attain the minimax rate in the worst case, and 4) we complement these results with lower bounds.
Lastly, we mention that while there are no prior lower bounds for contextual bandits based on the eluder dimension, Wen and Van Roy (2017) give an eluder-based lower bound for reinforcement learning with deterministic transitions and known rewards. This result is closer in spirit to our disagreement-based lower bounds (Theorems 2.2 and 2.4), is it applies to a carefully constructed function class rather than holding for all function classes, and mainly serves to demonstrate the worst-case tightness of a particular upper bound.
7 Extensions
We conclude this section by presenting some basic extensions of our contextual bandit results, including extensions of our regret bounds to handle infinite classes and weaker noise conditions.
As we have mentioned, Algorithm 1, Theorem 2.1 and Theorem 2.3 trivially extend to infinite , with the dependence on in the algorithm’s parameters and the regret bounds replaced by standard learning-theoretic complexity measures such as the pseudodimension, (localized) Rademacher complexity, or metric entropy. This is because the analysis of AdaCB (see Appendix C) does not rely on any complexity assumptions for , except for Lemma C.1, which uses a standard uniform martingale concentration bound for the square loss to show that the empirical risk minimizer has low excess risk at each epoch. Therefore, to extend our results to infinite , one only needs to replace Lemma C.1 with an analogous uniform martingale concentration inequality for infinite classes. Such results have already been established in the literature, see, e.g., Krishnamurthy et al. (2017) and Foster et al. (2018).
Beyond uniform gap, AdaCB can also adapt to the Tsybakov noise condition (Mammen and Tsybakov, 1999; Tsybakov, 2004; Audibert et al., 2007; Rigollet and Zeevi, 2010; Hu et al., 2020), as the following proposition shows.
Suppose there exist constants such that
Then Algorithm 1 with Option I ensures that
The supremum over the action distribution in the definition Eq. 14 of the value function disagreement coefficient is more pessimistic than what is actually required to analyze AdaCB. Consider the following action distribution-dependent definition:
The regret bound in Theorem 2.3 can be tightened to depend on , where is a set of action distributions with favorable properties that can lead to tighter bounds. In particular, the proof of Theorem 2.3 implies that for any instance with uniform gap , if for all such that for all , then AdaCB with Option II ensures that
The following result shows that this property leads to dimension-independent bounds for sparse linear function classes.
for all such that for all .
For simplicity, we assume that is unique for all in the main body of the paper. When such assumption does not hold, we keep the original definition of (which makes unique for each ), while defining
We then make the following modifications to our framework. First, we modify the uniform gap condition Eq. 2 to require that for all ,
Second, we modify the definition of policy disagreement coefficient to
Reinforcement Learning
We now give disagreement-based guarantees for reinforcement learning with function approximation in the block MDP setting (cf. Section 1.2.1). Before proceeding, let us introduce some additional notation.
We also define the Bayes reward function as
1 The Algorithm
Our main reinforcement learning algorithm, RegRL, is presented in Algorithm 2. The algorithm follows the optimistic least-squares value iteration framework (Jin et al., 2020; Wang et al., 2019, 2020), with few key changes that allow us to prove guarantees based on a suitable notion of value function disagreement coefficient rather than stronger complexity measures such as the eluder dimension. The most interesting aspect of the algorithm is a feature we call the star hull upper confidence bound: Compared to the classical UCB approach, which computes an optimistic -function by taking largest predicted reward amongst all value function in an ball around an empirical risk minimizer, we add an additional step which first “lightly convexifies” this set. This step is based on techniques from the literature on aggregation in least squares (Audibert, 2008; Liang et al., 2015), and leads to more stable predictions.
In more detail, the algorithm proceeds in iterations.We use the term “iteration” distinctly from the term “episode”, as each iteration consists of multiple episodes. In each iteration , we compute an optimistic Q-function such that
We then take the greedy argmax policy defined by for , and gather trajectories as follows: For each , we roll in to layer with , then choose actions uniformly at random for the rest of the episode. These trajectories are used to refine our value function estimates for subsequent iterations, with the th trajectory used for estimation at layer . Choosing actions uniformly ensures that the data gathered from these trajectories is useful regardless of the action distribution in subsequent iterations.
Let us now elaborate on the upper confidence bound computation. Let iteration and layer be fixed, and suppose we have already computed and . The first step, following the usual optimistic LSVI schema, is to estimate a value function for layer by regressing onto the empirical Bellman backups from the next layer (5):
At this point, the usual optimistic value function for layer (cf. Russo and Van Roy (2013); Foster et al. (2018) for contextual bandits and Jin et al. (2020); Wang et al. (2019, 2020) for RL) is defined as
where is a confidence parameter. As observed in Jin et al. (2020); Wang et al. (2020), however, this UCB function can be unstable, leading to issues with generalization when we use it as a target for least squares at layer . Our approach to address this problem is to expand the supremum above to include the star hull of centered at . Define the star hull of centered at by
We define the star hull upper confidence bound (7) by
RegRL is oracle-efficient, and can be implemented using an offline regression oracle as follows.
At each iteration, the empirical risk minimizer in 5 can be computed with a single oracle call.
For any pair, the star hull UCB function in 7 can be computed by reduction to a regression oracle. In particular, to compute an -approximate UCB:
For convex function classes, calls are required.
For general (in particular, finite) classes, oracle calls are required. The key idea here is that we can reduce ERM over the star hull to ERM over the original class.
2 Main Result
We now state the main guarantee for RegRL. Our guarantee depends on the following “per-state” gap and worst-case gap:
and define .
Our main theorem bounding the error of RegRL is as follows. As with our contextual bandit results, we focus on finite classes for simplicity, but the result trivially extends to general function classes.
and does so using at most trajectories. More generally, the algorithm guarantees that
where .
Let us describe a few key features of this theorem and interpret the result.
In light of the results in Section 2 this implies that one can attain the fast rate whenever the value function star number for is bounded.
We emphasize that while the dependence on all of the parameters in Theorem 3.1 can almost certainly be improved, we hope this result will open the door for further disagreement-based algorithms and analysis techniques in reinforcement learning.
3 Discussion
The proof of Theorem 3.1 has two main components. The first part of the proof shows that with high probability, for all iterations and layers , the set \mathcal{F}_{h}^{{\scriptscriptstyle(k)}}\vcentcolon=\big{\{}f\in\mathcal{F}_{h}\mid{}\|f-\widehat{f}_{h}^{{\scriptscriptstyle(k)}}\|_{\mathcal{Z}_{h}^{{\scriptscriptstyle(k)}}}\leq{}\beta_{h}\big{\}} contains the Bellman backup of the value function from the next layer, which ensures that is optimistic in the sense of Eq. 35 and leads to exploration. Then, in the second part, we prove a regret decomposition which shows that whenever the optimistic property holds, the suboptimality of is controlled by the gap and the value function disagreement coefficient .
The first part of the proof (Appendix G) boils down to showing that the empirical risk minimizer in in Eq. 36 has favorable concentration properties. This is highly non-trivial because the targets in Eq. 36 depend on the entire dataset, which breaks the independence assumptions required to apply standard generalization bounds for least squares. Instead, following Jin et al. (2020); Wang et al. (2020), we opt for a uniform generalization bound which holds uniformly over all possible choices of . To do so, we must show that is approximated by a relatively low complexity function class, which we accomplish as follows. First, we show that—thanks to a certain Lipschitz property granted by the star hull— is well approximated by a function
where , and where
is the latent state norm, which measures the expected squared error conditioned on the sequence of latent states encountered in the trajectories gathered for layer . This approximation argument is rather non-trivial, and involves a recursion across all layers that we manage using the disagreement coefficient. With this taken care of, the next step is to use the block MDP structure to argue that has low complexity. To see this, observe that is completely determined by the center and the latent state sequence above. Since the latent state constraint does not depend on the ordering of the latent states, we can use a counting argument to show that there are at most possible choices for overall. This suffices to prove the desired concentration guarantee.
The second part of the proof (Appendix F) proceeds as follows. Define the Bellman surplus as
which measures the width for our upper confidence bound. We use a “clipped” regret decomposition from Simchowitz and Jamieson (2019) to show that whenever the concentration event from the first part of the proof holds, the suboptimality of is controlled by the confidence widths:
In particular, let denote the number of times the latent state was encountered in the layer trajectories prior to iteration . Our key observation is that bounded disagreement coefficient implies that for each state ,
In other words, the disagreement coefficient controls the rate at which the confidence width shrinks. Moreover, since the width for latent state is proportional to the number of times we have visited the state (even though the algorithm cannot observe this quantity), we can bound the overall suboptimality across all iterations using similar arguments to those employed in the tabular setting (Azar et al., 2017; Simchowitz and Jamieson, 2019).
Our result is closely related to that of Wang et al. (2020), who gave regret bounds for a variant of optimistic LSVI based on the eluder dimension of . Compared to this result, we require the additional block MDP assumption and finite actions, but our bounds scale with the value function disagreement coefficient, which can be arbitrarily small compared to the eluder dimension (Proposition 2.3). On the technical side, their algorithm stabilizes the upper confidence bounds using a sensitivity sampling procedure, whereas we address this issue using the star hull. Ayoub et al. (2020) give similar eluder dimension-based guarantees for a model-based algorithm, though the notion of eluder dimension is somewhat stronger, and it is not clear whether this algorithm can be made oracle-efficient.
Reinforcement learning with function approximation in block MDPs has been the subject of extensive recent investigation (Krishnamurthy et al., 2016; Jiang et al., 2017; Dann et al., 2018; Du et al., 2019b, a; Misra et al., 2019; Feng et al., 2020; Agarwal et al., 2020). In terms of assumptions, we require the rather strong optimistic completeness condition, but do not require any reachability conditions or any clusterability-type assumptions that facilitate the use of unsupervised learning. The main advantages of our results are 1) we require only a basic regression oracle for the value function class, and 2) we attain the optimal fast rate in the presence of the gap and bounded disagreement coefficient.
We should also mention that the gap for has been used in a number of recent results on reinforcement learning with function approximation (Du et al., 2019b, 2020a, 2020b), albeit for a somewhat different purpose. These results use the gap to prove that certain “non-optimistic” algorithms succeed, whereas we use it to beat the minimax rate.
Lastly, we note that the value function disagreement coefficient is similar to the “low variance” parameter used in Du et al. (2019b) to give guarantees for reinforcement learning with linear function approximation, but can be considerably smaller when applied to block MDPs. For example, in the trivial case in which each emission distribution is a singleton, the value function disagreement coefficient is automatically bounded by , while the low variance assumption may not be satisfied unless the latent MDP is near-deterministic.
Implementing the Algorithms with Regression Oracles
In Section 2.1 and Section 3.1, we mentioned that both AdaCB (Algorithm 1) and RegRL (Algorithm 2) can be efficiently implemented with an offline regression oracle. In this section, we provide more details on this implementation, and on the overall computational complexity of our algorithms. Throughout this section, we deal with general (possibly infinite) function classes.
To start with, we introduce the regression oracle that we assume. Let us first consider the contextual bandit setup where is the value function class. Given , we assume a weighted least squares regression oracle, which is an offline optimization oracle capable of solving problems of the form
When one solves the regression problem Eq. RO using gradient-based methods like stochastic gradient descent (SGD), the convergence rate typically depends on the Lipschitz constants of gradients, which further depend on the range of weights and targets. Motivated by this fact, we further define a range parameter which describes the range of weights and targets that our oracle accepts. Formally, for all , we define
Clearly becomes a stronger as increases. While access to is generally a very mild assumption even when is large, in order to achieve better computational efficiency, in this section we will be precise about and aim to invoke with as small as possible.
In the block MDP setup, there are multiple value function classes . For this setting, we assume access to the regression oracle Eq. RO for each of the classes .For notational convenience, in this section, when we use the notation in the block MDP setting, it can stand for any one of , rather than the full function class defined in Section 3. Again, we use to denote our oracle, where denotes that the oracle accepts -valued weights and targets.
We first show how to implement AdaCB with the regression oracle. There are three computational tasks in the algorithm which require us to invoke the oracle.
2 requires computing the empirical risk minimizer .
9 and Option I (4) require computing the candidate action set for any given .
Option II (4) requires computing the confidence width for any given .
The first task is exactly a least squares problem, and we directly solve it using . The second and third tasks are more complicated, and we need to design additional subroutines to reduce them to weighted least squares regression. Lying at the heart of the reductions are two basic computational subroutines: ConfBound and ConfBoundDiff, which we present in Algorithm 3 and Algorithm 4 respectively. Specifically,
ConfBound is designed to efficiently compute the upper confidence bound
for any given context-action pair , based on a sample history and confidence radius . It can be efficiently implemented with given precision , as pointed out in Krishnamurthy et al. (2017) and Foster et al. (2018).
ConfBoundDiff is designed to efficiently compute the action difference lower confidence bound
for any given context and actions , based on a sample history and confidence radius . It can be used to identify whether an action is guaranteed to dominate another action on a context , and can be efficiently implemented with given precision .
Building on ConfBound and ConfBoundDiff, we design a subroutine CandidateSet (see Algorithm 5) that accomplishes the the second task above, i.e., (approximately) computing for any . Then, building further on CandidateSet and ConfBound, we design a subroutine ConfWidth (see Algorithm 6) that accomplishes the third task above, i.e., computing for any . Therefore, by applying ConfBound, ConfBoundDiff, CandidateSet and ConfWidth as subroutines, we can efficiently implement AdaCB using .
We now show how to implement RegRL with the regression oracle. There are two computational tasks in RegRL which require us to invoke the oracle.
5 requires computing the empirical risk minimizer .
7 requires computing the star hull upper confidence bound for any given pair.
The first task is exactly a least squares problem, and we directly solve it using . The second task can be accomplished by the subroutine ConfBound (Algorithm 3), as long as we can solve weighted least squares regression over the star hull of each
Suppose weights in Eq. Star-RO are bounded by and targets are bounded by . Then for any , we can find an -approximate solution to Eq. Star-RO using calls to for Eq. RO.
Therefore, by applying ConfBound with the reduction above as a subroutine, RegRL can be efficiently implemented with .
2 Computational Complexity
Theoretical guarantees for the subroutines ConfBound, ConfBoundDiff, CandidateSet and ConfWidth are deferred to Appendix A. Here we summarize the total computational complexity for our algorithms based on these reductions.
For AdaCB, we set the precision for ConfBound, ConfBoundDiff, CandidateSet and ConfWidth so that the error does not degrade the algorithm’s instance-dependent performance beyond additive constants. In total, when is convex, AdaCB calls for times over rounds, and when is non-convex, AdaCB calls for times over rounds. We remark that the total time spent by AdaCB outside of these regression oracle calls is in each round.
Experiments
To evaluate the empirical performance of AdaCB, we replicated a simplified version of the large-scale contextual bandit evaluation setup of Bietti et al. (2018), which compares a number of contextual bandit algorithms based on either cost-sensitive classification oracles or regression oracles on over 500 multiclass, multi-label, and cost-sensitive classification datasets. We found that AdaCB typically enjoys superior performance, especially on challenging datasets with many actions.
Following Bietti et al. (2018), we use a collection of 516 multiclass classification datasets from the openml.org platform.We omit datasets from the collection used in Bietti et al. (2018), as these are regression datasets that were rounded to integer targets. This brings the count from 525 to 516. This collection includes many standard datasets, including the UCI datasets used in Foster et al. (2018); see Bietti et al. (2018) for details. Beyond this collection, Bietti et al. (2018) also used 5 multilabel datasets and 3 cost-sensitive datasets; we omit these for simplicity.
For each dataset, we simulate bandit feedback by withholding the true label. We work with losses rather than rewards, and provide a loss of if the learner predicts the correct label, and otherwise. We randomly shuffle the examples in each dataset, but use the same fixed shuffle across all algorithms.
All of our baseline algorithms are based on classification or regression oracles. We use their implementations in VW, which incorporate modifications to allow them to run in an online fashion with the oracle above. For the classification-based algorithms, VW uses an additional reduction layer which reduces classification to regression. Following Bietti et al. (2018), we use the following algorithms.
The standard -Greedy exploration strategy (Langford and Zhang, 2008), as well as a purely greedy variant, Greedy.
Bagging, also known as bootstrap Thompson sampling (Agarwal et al., 2014; Eckles and Kaptein, 2014; Osband et al., 2016), which attempts to approximate the Thompson sampling algorithm.
Online Cover, a heuristic version of the ILTCB strategy of Agarwal et al. (2014). ILTCB itself provides an optimal and efficient reduction from stochastic contextual bandits to cost-sensitive classification, and represents the state of the art from that line of research.
RegCB (Russo and Van Roy, 2013; Foster et al., 2018), an approximate version of the general function class UCB algorithm based on regression oracles. This algorithm was found to have the best overall performance in Bietti et al. (2018), though it does not achieve the minimax rate for contextual bandits. We only evaluate the optimistic variant (RegCB-Opt), not the elimination-based variant (RegCB-Elim), as the former typically performs much better.
We refer to Bietti et al. (2018) for more details on the algorithm configurations and hyperparameters.
Beyond these algorithms, we also evaluate against SquareCB (Foster and Rakhlin, 2020), which is the first optimal online regression oracle-based contextual bandit algorithm. SquareCB applies the inverse gap weighting strategy in Eq. 7, but uses all actions rather than adaptively narrowing to a smaller candidate set as in AdaCB. Our implementation applies IGW at each step with a learning rate . We set , where and are hyperparameters.
We implemented a variant of AdaCB in VW, with a few practical simplifications.The precise version of VW used to run the experiments may be found at https://github.com/canondetortugas/vowpal_wabbit/tree/. First, rather than using an offline ERM oracle (as in Eq. RO), we modify the algorithm to work with the online regression oracle provided in VW by following the strategy of Foster and Rakhlin (2020). The protocol for the oracle is as follows: At each round, we provide the context , the oracle provides a predicted reward for each action, then we select an action and update the oracle with . Instead than applying IGW to the empirical risk minimizer as in Algorithm 1, we simply apply it to . This strategy is natural because the protocol above is exactly what is implemented by the base learner in VW, and thus allows us to take advantage of VW’s fast online regression implementation.
For our second simplification, rather than computing using the reductions from Section 4 (which also require an offline oracle), we use a sensitivity-based heuristic that takes advantage of the online oracle. This is described in Section 7.1 of Krishnamurthy et al. (2017), and is also used by the VW implementation of RegCB.
Finally, rather than using a data-dependent learning rate, we set , where and are hyperparameters (the same as for SquareCB). We set the confidence radius as , where is another hyperparameter.
We evaluate the performance of each algorithm on a given dataset using the progressive validation (PV) loss (Blum et al., 1999). For each algorithm above, we choose the best hyperparameter configuration for a given dataset based on the PV loss.
To compare each pair of algorithms on a given dataset, we use the notion of a statistically significant win or loss defined in Bietti et al. (2018), which is based on an approximate Z-test. For each algorithm pair, we count the total number of significant wins / losses, using the best configuration for each dataset.
To evaluate performance on hard exploration problems, we restricted only to datasets with actions. Head-to-head results are displayed in Table 1. For this subset of datasets, we find that AdaCB has the best overall performance, and has a (large) positive win-loss difference against all of the baselines. This suggests that AdaCB may be a promising approach for solving challenging exploration problems.
Head-to-head results across all datasets are displayed in Table 2. We find that for the full collection of datasets, RegCB (Foster et al., 2018) has the best overall performance, with a positive win-loss difference against every algorithm. AdaCB has strong performance overall, but narrowly loses to RegCB and Online Cover, with a positive win-loss difference against all other algorithms. The strong performance of RegCB mirrors the findings of Bietti et al. (2018). They observed that many of the datasets in the OpenML collection are “easy” for exploration in the sense that 1) they have few actions (in fact, around 400 datasets have only 2 actions), and 2) even the simple greedy strategy performs well; RegCB seems to be good at exploiting this. It would be interesting to understand whether we can make AdaCB eliminate actions even more aggressively for the easy problems on which RegCB excels, and whether we can develop theory to support this.
Discussion
We have developed efficient, instance-dependent algorithms for contextual bandits and reinforcement learning with function approximation. We showed that disagreement coefficients and related combinatorial parameters play a fundamental role in determining the optimal instance-dependent rates, and that algorithms that adapt to these parameters can be simple and practically effective. Our results suggest many fruitful directions for future research.
For contextual bandits, there are a number of very interesting and practically relevant questions:
For adversarial contexts, can we develop instance-dependent algorithms that are efficient in terms of online regression oracles, as in Foster and Rakhlin (2020)?
Can we extend our algorithms and complexity measures to optimally handle infinite actions?
Beyond these questions, we hope to see the various gaps between our upper and lower bounds closed.
For reinforcement learning, we are excited to see whether our analysis techniques can be applied more broadly, and to develop more refined lower bounds that better reflect the role of disagreement in determining the difficulty of exploration. On the technical side, there are many possible improvements to Theorem 3.1. For example, is it possible to develop best-of-both-worlds guarantees similar to those attained by AdaCB, or even to efficiently attain the minimax rate in the absence of bounded gap and disagreement coefficient? Can we improve the dependence on , , and so forth to match the optimal rates for the tabular setting?
We thank Alekh Agarwal, Haipeng Luo, Akshay Krishnamurthy, Max Simchowitz, and Yunbei Xu for helpful discussions. We thank Alberto Bietti for help with replicating the setup from Bietti et al. (2018). DF acknowledges the support of NSF Tripods grant #1740751. AR acknowledges the support of ONR awards #N00014-20-1-2336 and #N00014-20-1-2394. DSL and YX acknowledge the support of the MIT-IBM Watson AI Lab.
References
Organization of Appendix
This appendix is organized as follows. Appendix A contains details for the computational results presented in Section 4. Part I contains proofs for our contextual bandit results, and Part II contain proofs for our reinforcement learning results.
Appendix A Computational Guarantees
In what follows, we establish computational guarantees for the subroutines ConfBound, ConfBoundDiff, CandidateSet and ConfWidth.
We first provide guarantees for ConfBound and ConfBoundDiff, in Lemma A.1 and Lemma A.2 respectively. Lemma A.1 is adapted from known results in the literature. The proof of Lemma A.2 can be found in Section A.1.
Consider the AdaCB setting. Let . If the function class is convex and closed under pointwise convergence, then for any , the computation procedures
terminate after calls to , and the returned values satisfy
If the function class is non-convex, then the required number of oracle calls is .
Consider the AdaCB setting. Let . If the function class is convex and closed under pointwise convergence, then for any and , the computation procedure
terminates after calls to , and the returned values satisfy
If the function class is non-convex, then the required number of oracle calls is .
Lemma A.1 and Lemma A.2 show that ConfBound and ConfBoundDiff compute the desired confidence bounds up to a precision of in or iterations. Note that both Lemma A.1 and Lemma A.2 are stated in the AdaCB setting. For the sake of brevity, we omit the guarantee of ConfBound for the RegRL setting here, as it is essentially the same as Lemma A.1, with only notations changing.
We now provide guarantees for ConfBoundDiff and ConfWidth. All the results in this part are stated in the AdaCB setting, as CandidateSet and ConfWidth are only required for AdaCB.
We discuss two cases: when is a product function class, it is possible for CandidateSet to precisely compute ; when is not a product function class, precisely computing becomes difficult, yet it is possible for CandidateSet to precisely determine whether , which is already sufficient for ConfWidth to precisely compute and for AdaCB to achieve all the statistical guarantees stated in Section 2.
When is a product function class, i.e. for some function class , it is possible for AdaCB to maintain each version space as a product function class, which makes it especially simple to compute . To ensure the product structure of , we need to make slight modifications to the definition of in 3 of AdaCB.
If is a product function class, i.e., for some , then at 3 of Algorithm 1, we define , where
It is not difficult to see that the above modifications do not affect AdaCB’s statistical guarantees in Section 2,In order to achieve the same regret bound, we need to adjust the configuration of from to . or ConfBound’s computational guarantee in Lemma A.1. The following lemma demonstrates the value of the product structure of .
If is a product function class, then for any ,
Lemma A.3 implies that if is a product function class (and thus is a product function class under Definition A.1), then both and can be explicitly expressed in terms of the upper and lower confidence bounds and . Since ConfBound enables us to compute and for all with high accuracy (see Lemma A.1), we can precisely compute and by calling and with sufficiently small , which can be efficiently implemented with (as ConfBound can be efficiently implemented with ).
If is not a product function class, then it is impossible to maintain as a product function class. In this case, our implementation of CandidateSet uses both ConfBound and ConfBoundDiff to approximately compute .We use the following observation.
For any , for any , define , and define
If , then,
Parts 1 and 2 of Lemma A.4 imply that, for a general function class , we are able to compute by calling with sufficiently small , which serves as an approximation to the true candidate action set , with the following two properties:
The computed set always contain the true set .
The computed set coincides with the true set when .
Parts 3 and 4 state two consequences of the above properties:
Note that it is sufficient for AdaCB to use (rather than the true candidate action set ) and to obtain the near-optimal instance-dependent regret stated in Theorem 2.1 and Theorem 2.3. In particular, in the proofs of Theorem 2.1 and Theorem 2.3, if we replace by its approximation , then all the arguments hold as long as the following three conditions hold:
with high probability;
when .
The first condition holds because and AdaCB guarantees that with high probability. The second and third conditions are exactly ’s properties. As a result, CandidateSet and ConfWidth work.
A.1 Deferred Proofs
which can be seen as an instance . Letting denote the solution above, we return for the pair that minimizes Eq. 41. Since all the arguments to the square loss in Eq. 41 are bounded by and , it is clear that this leads to an -approximate minimizer.
Therefore, to compute with to an error up to , we only need to compute
with an error up to . This can be efficiently accomplished through a binary search procedure similar to the procedures in Foster et al. (2018) and Krishnamurthy et al. (2017). This procedure requires access to . ∎
Part I Proofs for Contextual Bandit Results
Let be a real-valued sequence of random variables adapted to a filtration . If almost surely, then with probability at least ,
Let be i.i.d. $\mu\sigma^{2}\delta>01-2\delta$,
B.2 Information Theory
For a pair of distributions with densities and , we define
Let and be probability measures over a measurable space . Then for any measurable subset ,
Appendix C Proofs for Upper Bounds
This section is dedicated to the proof of Theorem 2.1 and Theorem 2.3. For a brief overview of the proof ideas, we refer the reader to Section 2.6.1.
For simplicity, in this section, we assume that Algorithm 1 exactly compute and for all and all (rather than approximately, using the oracle machinery of Section 4). While we specify in the pseudocode of Algorithm 1, throughout this section we deal with a general value . Likewise, we analyze a slightly more general version of the update in 6, which sets the learning rate as
to be the sum of conditional expectations of the instantaneous regret.
For all epoch , for all round in epoch , we define the following quantities, all of which are -measurable. First, we define the greedy policy for epoch by
Next, we denote the algorithm’s probability distribution for epoch by
Finally, we define the following disagreement-related quantities:
We define the universal policy space (Simchi-Levi and Xu, 2020) as , and for all we define
For all rounds in epoch , we define the following quantities for all :
Let . Define
With probability at least , it holds that
for all and .
We let denote the high-probability event from Lemma C.1. We have the following consequence.
For all , for all ,
If for all , then for all .
If for all , then .
Part 1 follows from Lemma C.1 and the fact that minimizes the empirical square loss. Parts 2 and 3 are adapted from Lemma 10 of Foster et al. (2018). ∎
For any , if we set for all , then with probability at least , the following event holds:
For , , , so trivially holds.
Fix any . Since are independent of , we have
with probability at least . Note that to apply Lemma B.3, we have used that our sample splitting schedule guarantees that the contexts used to form are independent of . Continuing, we have
where the first inequality follows from Eq. 45, the second inequality follows from , and the third inequality follows from .
By a union bound over , this implies that with probability at least ,
For , , and we likewise do have .
Fix any . Since are independent of , we have
for . Thus given , are i.i.d. $q_{m}\widehat{q}_{m}=\frac{1}{n_{m-1}/2}\sum_{t=t_{m-1}+1}^{\tau_{m-1}}w(x_{t};\mathcal{F}_{m})$, by Lemma B.3, we know that
with probability at least . If , then
where the first inequality follows from Eq. 47 and the second inequality follows from . In this case, . If , then
where the first inequality follows from Eq. 47 and the second inequality follows from . In this case, .
By a union bound over , we know that with probability at least ,
C.2 Analysis in Policy Space
As mentioned in Section 2.6.1, our regret analysis builds on a framework established in Simchi-Levi and Xu (2020), which analyzes contextual bandit algorithms in the universal policy space . In this section, we prove a number of structural properties for the action distribution selected in Algorithm 1 by focusing on a data-dependent subspace of at each epoch (this is closely related to the elimination procedure of our algorithm and is essential to our instance-dependent analysis).
The analysis in this subsection deals with an arbitrary choice for the scale factor schedule rather than the explicit specification in Algorithm 1, and serves as a foundation of the proofs of the main theorems in Section C.3 and Section C.4 (where we instantiate the learning rate using Option I and Option II).
For each epoch and any round in epoch , for any possible realization of , and , we define a (data-dependent) subspace of :
Let be the equivalent policy distribution for , i.e.,
Note that both and are -measurable. We refer to Section 3.2 of Simchi-Levi and Xu (2020) for more detailed intuition for and proof of existence. By Lemma 4 of Simchi-Levi and Xu (2020), we know that for all epoch and all rounds in epoch ,
For all epoch and all rounds in epoch , is a feasible solution to the following Implicit Optimization Problem:
Let and in epoch be fixed. We have
Now, given any context , we have
The result in Eq. 48 follows immediately by taking an expectation over .
For Eq. 49, we first observe that for any policy , given any context ,
We now formulate a more refined disagreement-based version of the implicit optimization problem.
For all epoch , all rounds in epoch , is a feasible solution to the following constraints:
Fix epoch and round . Eq. 50 directly follows from Eq. 48. We now show that Eq. 51 holds. For any , we have
where the first inequality follows from Eq. 49. ∎
Assume that holds and for all . For all epoch , all rounds in epoch , and all policies , we have
Since and , for all , if , then . The result follows immediately from this observation. ∎
Assume that holds and . For all epochs , all rounds in epoch , and all policies , if , then
Fix any epoch , any round in epoch , and any policy . By the definitions of and , we have
For all , we have
where the first inequality follows from , the second inequality follows from Eq. 43, and the third inequality follows from Eq. 52. To proceed, note that we have
where the first inequality follows from Cauchy-Schwarz and the second inequality follows uses convexity of the norm. Now, from the definition of , we have
C.3 Proof of Theorem 2.1
We now prove Theorem 2.1, which concerns AdaCB with Option I, where
for all (for , we have defined ). Note that since for all , we have for all . We consider general values for unless explicitly specified.
Assume that holds and . Then is monotonically non-decreasing in , i.e.,
We have (since ) and
for all . Since , we have
For all , we have
where the first inequality follows from Eq. 44 and the second inequality follows from (since ). ∎
Assume that both and hold, and . Let . For all epochs , all rounds in epoch , and all policies ,
We prove Lemma C.10 via induction on . We first consider the base case where and . In this case, since and , we know that ,
For the inductive step, fix some epoch . Assume that for epoch , all rounds in epoch , and all ,
We first show that for all rounds in epoch and all ,
where (i) is by Lemma C.7, (ii) is by and the optimality of for over , (iii) is by the triangle inequality, (iv) is by Lemma C.8, and (v) is by the AM-GM inequality. By Eq. 51 and ,
Combining the above two inequalities with and Eq. 54, we have
We now show that for all rounds in epoch and all ,
Similar to Section C.3, for any round in epoch we have
Combining Section C.3, Section C.3 and Section C.3, we have
where in the third inequality we use the fact that both and belongs to , as well as Lemma C.2. By Eq. 44, Lemma C.10, Eq. 51, and the fact that round belongs to epoch , we have
Plugging the above two inequalities into Section C.3, we have
This follows from Lemma C.11 and part 3 of Lemma C.2. ∎
At this point, can bound the regret within each epoch using Corollary C.1, which gives a bound in terms of the empirical disagreement probability . To proceed, we relate this quantity to the policy disagreement coefficient.
We observe that for all , since for all , we have
The following lemma uses this result to upper bound regret in terms of the disagreement coefficient.
Set and for all . Assume that both and hold. Then for all , for all ,
where the second inequality invokes the definition of the disagreement coefficient.
On the other hand, suppose . Since (by part 3 of Lemma C.2) and since for all , for all we have
We now solve the recurrence in Lemma C.12 to obtain an absolute upper bound on for each round.
Set and for all . Assume that both and hold. Fix any . For every epoch , if , then
We prove this result by induction. The hypothesis trivially holds for . Now assume that the hypothesis holds for where . If then we are done. If , then by part 3 of Lemma C.2, we have . We consider two cases.
Case 1: . In this case, by Lemma C.12 we have
and by , we have
Case 2: . Since , by the induction assumption we have
and by we know that
where we use that fact that .
Combining Case 1 and Case 2, we have that the hypothesis holds for , concluding the inductive proof. ∎
Assume that both and hold, and . For every epoch ,
where the first inequality follows from Lemma C.10, the second inequality follows from Eq. 50, and the third inequality follows from by Lemma C.3. ∎
Set and for all . Assume that both and hold. Fix any . For every epoch ,
Case 2: . By Part 3 of Lemma C.2 and Lemma C.7, and using that , we have
For any , , by setting and for all , Algorithm 1 with Option I ensures that for every instance,
By Lemma C.1, Lemma C.2 and Lemma C.3, the choice of and ensures that and simultaneously hold with probability at least , and . By Lemma C.15, conditional on the occurrence of and , for any , we have
The -based upper bound in Theorem 2.1 can be directly obtained from Lemma C.16: By taking and , we have
The -based upper bound (under the uniform gap assumption) in Theorem 2.1 is an immediate corollary of the -based upper bound. ∎
C.4 Proof of Theorem 2.3
We now prove that AdaCB with Option II, i.e. with
for all , attains the regret bound in Theorem 2.3.
Assume that holds and for all . Then for all epoch and all rounds in epoch ,
Consider any epoch , any round in epoch . We have
For all such that , since , we have and , thus
For all such that , for all , there exists such that , thus
Hence for all such that ,
Before we derive sharp instance-dependent guarantees for AdaCB with Option II, we first show that Option II will never degrade the algorithm’s worst-case performance, i.e., AdaCB with Option II always guarantees the minimax rate .
For all epoch , all round in epoch , is a feasible solution to:
This is a direct corollary of Lemma C.5. ∎
For any epoch , if , then .
If , then , thus . For any ,
Assume that holds, and for all . Let . For all epochs such that ,
The proof is based on slight modifications of Lemma 7, Lemma 8 and Lemma 9 of Simchi-Levi and Xu (2020), which (essentially) proves the same result based on the following two conditions
For any epoch , .
While our Corollary C.2 is weaker than their first condition (specifically, Eq. 64 holds for while Eq. 65 requires ), their proof still works under our condition, as we have assumed that for all . While our Lemma C.18 is weaker than their second condition, this difference does not affect Lemma C.19, as Lemma C.19 only considers epochs such that . As a result, Lemma C.19 is indeed implied by their result. ∎
For any , , by setting for all , Algorithm 1 with Option II ensures that for every instance,
By Lemma C.1 and Lemma C.4, and simultaneously hold with probability at least . In the rest of the proof, we assume that both and hold. By Lemma C.2, the specification of in Algorithm 1 ensures that for .
Consider any epoch , any round in epoch . When , by Lemma C.17,
When , we have , and thus by Eq. 46,
which implies . By Lemma C.19, we have
We now show that whenever the uniform gap condition
holds, AdaCB with Option II enjoys the -type instance-dependent rate in Theorem 2.3.
Assume holds and that . For all , for all choices for , it holds that
Consider any epoch . Define . We first observe that for all such that , there exists such that and
where the last inequality utilizes .
Therefore, whenever . We then have
where the last inequality utilizes .
Let be fixed. For all , the definition of implies that
Hence, for all , by the definition of , we have
Combining Section C.4.2, Section C.4.2, Section C.4.2, we have
We are now ready to state our instance-dependent regret bound, which is a best-of-both-worlds guarantee.
For any , , by setting for all , Algorithm 1 with Option II ensures that for any instance with uniform gap ,
By Lemma C.1 and Lemma C.4, and simultaneously hold with probability at least . In the rest of the proof, we assume that both and hold. By Lemma C.2, the specification of in Algorithm 1 ensures that whenever holds.
Since for all , we have
for all . In what follows, we prove that via induction.
Base case: Since , we have , thus .
Assume that . Then by Lemma C.21,
If , then by Eq. 46,
Therefore, .
By Lemma C.21, since , we now have that for all ,
By the definition of , we have
Combining the above two cases with Lemma C.20, we know that
Theorem 2.3 can be directly obtained from Lemma C.22: by taking and , we have
Appendix D Proofs for Lower Bounds
For the proofs in this section, we let be the natural filtration, and define
to be the sum of conditional expectations of the instantaneous regret. We define to be the algorithm’s action distribution at time when , i.e.
We also define to be the average action distribution (or, the result of applying online-to-batch-conversion to the algorithm).
The following lemmas are used in multiple proofs in this section.
This result follows by using the uniform gap property, then repeatedly invoking Jensen’s inequality.
Sample uniformly.
This is established in Raginsky and Rakhlin (2011), but we re-prove the lemma in detail for completeness.
We choose . Then we have
Using Lemma D.1, for all choices , we have
In particular, by Markov’s inequality, this implies that
has . Indeed, conditioned on the event above, we have , and the packing property implies that
D.2 Proof of Theorem 2.2 and Theorem 2.4
The roadmap for this proof is as follows. First, we construct a family of hard instances as a function of the parameters in Theorem 2.2 and show that it leads to the lower bound in terms of the policy disagreement coefficient. Then, at the end of the theorem, we show how the same construction immediately implies Theorem 2.4 using a different choice of problem parameters.
For each partition , we take ) to be a collection of policies where, for each and , we have and
We also include a policy that always selects . We define obtained by stitching together over their respective subsets of the domain. The resulting policy class consists of all policies which deviate from on a subset of contexts of size at most , and for which this subset intersects with each at most once.
We now choose a regression function class that induces . For each subset we define a class of regression functions as follows. First, we let for all . Next, for each let
with the entry on the th coordinate. Next, for each and we let
As with , we obtain by stitching together over their respective subsets of the domain. It is easily verified that is precisely the set of argmax policies for .
We define the context distribution as follows:
Let be the distribution over which takes each of with probability and takes with probability .
Let .
We now choose the parameter and verify that , , and are bounded appropriately. We first observe that since each value function deviates from the vector on at most contexts, and since it can switch to one of the vectors each such context,
We choose to be the largest possible value such that ; this is possible by the assumption that . Since , we have
where the last expression uses that and . Hence, going forward, we focus our attention to lower bounding the regret in terms of , which is equivalent to up to logarithmic factors.
It follows that for any choice of . Since , we also have .
For each , set with probability . Otherwise, select uniformly from . Select uniformly from .
Note that when we disregard the value of . Let denote the optimal policy under , and let denote its restriction to .
where . Moreover, we have
where is the restriction of to .
where . In particular, we conclude that
Let denote the set of indices for which
We consider two cases. First, if , then Eq. 74 implies that
so we are done. For the other case, we have , and we argue that the algorithm must solve a hypothesis test for each index in this set. Let be fixed. First, observe that for any , we have
by Markov’s inequality. Hence, if we define , we have that
where we have used Lemma B.5 and that . Thus, taking the average, we have
Since we have assumed that , this expression combined with Eq. 76 implies that
To prove Theorem 2.4 with parameters , , , , and , we apply the construction above with parameter , which is admissible for any choice of . Since we have already shown that this construction ensures that any algorithm has
for some instance, all that remains is to verify that .
For any fixed , we have
since all of the value functions in agree on for all . Furthermore, since for all , we also have
for all . It follows that
so that .
D.3 Proof of Theorem 2.6
Rather than proving Theorem 2.6 directly, in this section we first state a more general theorem which implies it, then prove this theorem. To state the stronger theorem, we recall the definition of the graph dimension, which is a multiclass analogue of the VC dimension.
The graph dimension is the largest number such that there exists with such that for all , there exists such that
Let a policy class , , and be given. Then there exist , , and with such that the following properties hold:
.
for some instance in which is the Bayes reward function.
We choose as the reference regression function in the theorem statement.
Let be the policies accompanying that witness the strong star number. For each , define a regression function to have for all , and let
For , we simply define
For all , we have .
Let be fixed. For the result is immediate. For , Definition 2.2 requires that , and we have . Finally, we have by construction. ∎
Observe that all of the regression functions have uniform gap . Moreover, for all for , we have
as long as (by Lemma B.5). Since the tuples are distinct, this implies that
Finally, we use that since has uniform gap , we have
For each , let be such that if and if ; these policies are guaranteed to exist by the definition of the graph number. Let be defined as before, and for each define
for each . For , define
Our starting point is the following lemma.
With our choice of , for any Bayes reward function with gap , we have
By the definition of the total variation distance, we can lower bound this by
where the last inequality is Pinsker. Rearranging, we have
since (by Lemma B.5). As a result, we have
Finally, observe that for any , we have
Hence, under drawn from the uniform distribution, we have
D.4 Proof of Theorem 2.8
Let and be given. Let be fixed and recall that is chosen as the largest value such that
Take the context distribution to be uniform over .
Choose .
Let denote the optimal policy for instance . Since has gap for every context, the conditions characterizing the star number ensure the following.
has gap over .
for all .
.
The third item is immediate. For the first item, we have two cases. First, for , that has gap is immediate from Item 1 of Definition 2.4. For , Item 3 ensures that
In particular, since , we have
In particular, choosing , this implies that
In particular, the choice for in Eq. 24 ensures that . Hence, rearranging, we have
D.5 Proof of Theorem 2.9
Let and be given. We consider instances defined by a value function and sequence , in which the contexts in the sequence are presented one-by-one non-adaptively and rewards are drawn as . For each such pair, we let
be the sum of conditional-expected instantaneous regrets under this process, which is a random variable.
For each , we let , where we recall that is chosen such that
In particular, it will be useful to note that is non-increasing with , so that for sufficiently large.
Fix sufficiently large such that . Let and realize the eluder dimension, and let . Let be the induced policies. We have the following result.
has gap over .
for all .
.
Let denote the sequence that plays for the first rounds, for the second rounds, and so forth, and choose an arbitrary fixed context to fill out the remaining rounds. Let denote the subsequence consisting of the first blocks of contexts. Let denote the rounds within the th block. Set .
Let the index be fixed, and let be the number of times the algorithm deviates from in block when the sequence is . Then we have
which follows from the fact that has gap , and
which follows from the first part of Lemma D.7 (i.e., is -suboptimal under on context ).
Using Item 1 and Item 2 of Definition 2.6, as well as the fact that rewards are Gaussian, we have
Our choice of ensures that . It follows that
Combining this inequality with Eq. 83 and rearranging, we get
since is a measurable function of the data up to and including the th block. Finally, under , we have
D.6 Proof of Theorem 2.11
Fix and let and witness the policy eluder dimension. Define
We choose as the reference regression function in the theorem statement. For each , define a regression function to have for all with , and set
Finally, for all , set
Let denote the sequence that plays for the first rounds, for the second rounds, and so forth, and choose an arbitrary fixed context to fill out the remaining rounds. Let denote the subsequence consisting of the first blocks of contexts. Let denote the rounds within the th block. Set .
Let the index be fixed, and let be the number of times the algorithm deviates from in block when the sequence is . Then we have
since both instances have uniform gap over block .Note that if for some the latter lower bound may be pessimistic, since the algorithm will incur regret by following in block as well.
Now, since and agree on for all with , we have
since . Rearranging, we have
since is a measurable function of the data up to and including the th block. Finally, since this argument holds for all , under we have
Appendix E Additional Proofs from Section 2
To bound the value function disagreement coefficient for the general case, we use that
From here, we proceed exactly as in the linear case to get the result. ∎
Since this holds for all choices of and , the result is established. ∎
E.2 Proofs for Star Number Results
Let be fixed. Let and . Set and for all . For each , define a function as follows.
Let . Clearly we have , since for each , , and for all .
Now, consider the value function star number. Observe that for any , and for any set of points , we have
Since any has only if and , we conclude the following:
for all .
for all , since we must have for any set that witnesses the star number.
It follows that for all .
We prove a slightly more general version of Theorem 2.7. Consider a setting in which we have a function class and distribution . We introduce the following generalizations of the value function disagreement coefficient and value function star number. Define
The value function star number is defined as .
Our goal will be to prove the following result.
For any uniform Glivenko-Cantelli class
This immediately implies Theorem 2.7 by taking , , and for an arbitrary mapping . Note that inherits the uniform Glivenko-Cantelli property from by the contraction principle.
The key step toward proving Theorem E.1 is to prove an analogue of the result that holds whenever is the uniform distribution over a finite set of elements. For any sequence , define
Define . The finite-support analogue of Theorem E.1 is as follows.
For any sequence , for any , ,
Before proving this result, we show how it implies Theorem E.1.
Let be fixed; the result is trivial for all other parameter values. We first appeal to the following lemma.
Let be fixed. Let denote the empirical distribution formed from independent samples from . By Hoeffding’s inequality, we are guaranteed that for sufficiently large, with probability at least
Next, we observe that since has the uniform Glivenko-Cantelli property, the class does as well (by the contraction principle, since ). This implies that for sufficiently large,
If we take large enough so that both claims hold and take a union bound, we are guaranteed that with probability at least ,
Since , this event occurs with probability at least . This establishes the existence of the distribution claimed in the lemma statement ∎
where . Applying Lemma E.1, we have
where we have used that by assumption. Altogether, this implies that
Since both sides are continuous functions of (in fact, the left-hand side does not depend on at all), we may take to conclude that
Since this holds for all , the result is established.
Consider a point and a sequence such that . We say is -star-dependent on with respect to if for all such that , we have . We say that is -star-independent of w.r.t. if is not -star-dependent on .
We first claim that for any , if , then is -star-dependent on at most disjoint subsequences of (with respect to ). Indeed, let be a function in such that . If is -star-dependent on a particular subsequence but , we must have
If there are such disjoint sequences, we have
Now we claim that for any sequence , there is some such that is -star-dependent on at least disjoint subsequences of (with respect to ), where . This is a straightforward corollary of the following lemma, which is purely combinatorial.
Let be a finite set with elements, and let be a positive integer. Consider any function , and let us say that is dependent on if . Suppose has the property that for every subset with , there exists such that is dependent on (i.e., ). Then there must exist an element of that is dependent on at least disjoint subsets of .
Let consist of all elements of for which . Each element of is -star-dependent on at most disjoint subsets of , and we claim that by Lemma E.3, one element is dependent on at least disjoint subsets. This implies that , so that .
Let us carefully verify that we can indeed apply Lemma E.3 here. Take to be the index set of , and define if is -star-dependent on . With , any sequence of more than (potentially non-unique) elements of cannot witness the value function star number, so for any with , there must at least one such that for all , implies that . Such a is -star-dependent on , so satisfies the condition of the lemma. Since subsequences of are in one-to-one correspondence with subsets of , Lemma E.3 grants the desired result.
We provide two different proofs: One based on the probabilistic method, and one based on a direct counting argument. The first proof leads to slightly worse constants.
Consider . Suppose we sample with uniformly at random. Then we have
We conclude that there exists some and a collection of at least disjoint subsets of such that for all .
This is a constructive proof based on a counting argument, which enables us to directly finds an element in that is dependent on at least disjoint subsets of .
To simplify notation, let us assign the elements of an arbitrary order and represent as . For any -size subset of , by the property of , we know that such that is dependent on , and we define
Note that is always well-defined as long as .
Let and be integers such that . We define a -partition of as a set-valued sequence
.
Let denote the set of all possible -partitions of . Note that in particular that different permutations of may yield different -partitions.
and we use to denote the right-hand side of Eq. 87. Consider the single element in , denoted as . Since are disjoint and
we know that is dependent on at least disjoint subsets of .
In what follows, we calculate the value of .
Step 1. We calculate the value of using the following identity:
This holds by a direct counting argument: there are choices for , choices for given each such choice, choices for given the preceding two choices, all the way on to choices for ; the remaining elements must be assigned to .
Here rewrites the sum over partitions to make the choices for and explicit, rewrites this once more by considering the choice of the and as equivalent to the choice of a set with and an element (so that and ), and restricts only to elements for which . They key step above is , which can be seen to hold as follows. For each choice of in the outermost sum in line :
There are choices for in the middle sum.
For each choice of and , the only constraint on is that they form a partition of . There are choices for , choices for given each such choice, and eventually choices for given all the preceding choices; all elements left over from are assigned to .
The final equality above simply substitutes in .
Step 3. Combining Eq. 88 and Eq. 89, we conclude that
This implies that is dependent on at least disjoint subsets of . ∎
E.3 Proofs for Eluder Dimension Results
Let . We have by taking and as witnesses, since for each , and
We now upper bound the value function star number. Clearly for any , so consider a fixed scale parameter . Suppose we have a set of points and functions that witness , with (we must have as the action for each witness, since all functions agree on the value for action ). Since , we must have . But on the other hand, we have
since for all . Since we need , we must have , so we conclude that for all .
First, we recall the definition of the general function class UCB algorithm. Let and . Define . Then the algorithm is defined as follows. At round :
Set .
Define \mathcal{F}_{t}=\big{\{}f\in\mathcal{F}:\|f-\widehat{f}_{t}\|_{\mathcal{Z}_{t-1}}\leq{}\beta_{t}\big{\}}.
Choose .
In particular, let us define . Then by triangle inequality, , so if we define , then
To apply this result, let us order the indices such that . Consider any index for which . For any particular , if we have , then Lemma E.4 (since ) implies that
Since we have restricted to , rearranging yields
Now, let be the greatest index such that . Then we have
We know that from Eq. 90 that , so altogether we have
To conclude, we set , and the final result follows from the law of total expectation. ∎
Let us adopt the shorthand . We begin with a definition. We say is -independent of if there exists such that and . We say is -dependent on if for all with , .
We first claim that for any , if , then is -dependent on at most disjoint subsequences of . Indeed, let be such that . If is -dependent on a particular subsequence but , we must have
If there are such disjoint sequences, we have
so .
Next we claim that for and any sequence , there is some such that is dependent on at least disjoint subsequences of . Let , and let be subsequences of . We initialize with . If is -dependent on for all we are done. Otherwise, choose such that is -independent of , and add it to . Repeat this process until we reach such that either is -dependent on all or . In the first case we are done, while in the second case, we have . Moreover, , since each is -independent of its prefix. We conclude that for all , so in this case is -dependent on all .
Finally, let be the subsequence consisting of all elements for which . Each element of the sequence is dependent on at most disjoint subsequences of , and by the argument above, one element is dependent on at least disjoint subsequences, so we must have , and in particular . ∎
This proof closely follows that of Theorem 2.7. As with that theorem, we prove a slightly more general result. Let be a function class, and let be defined as in Eq. 85. Let be the length of the longest sequence of points such that for all , there exists such that
The value function eluder dimension for is defined as .
For any uniform Glivenko-Cantelli class
where . By Lemma E.4, we can bound
To conclude the result, we take (and consequently ), so that the bound above yields
Part II Proofs for Reinforcement Learning Results
We let denote the th trajectory gathered by the algorithm during iteration (i.e., the trajectory obtained by rolling in to layer with , then switching to uniform exploration. Throughout the proof, we let denote the latent states encountered during , which emphasize are not observed.
We define . For any collection , we define
We also let denote the entire history for iteration .
Let us define an intermediate quantity which is closely related to the value function disagreement coefficient, which we will work with throughout the proof. For each , define
We define analogously. Lastly, we abbreviate and . We will pass from this quantity to at the end of the proof.
be the set used to compute the upper confidence function in iteration . Let the Bayes predictor for this round be defined as
Recall that the optimistic completeness assumption implies that .
For any , if we choose in Algorithm 2 such that
then with probability at least , for all , .
Let be fixed. We prove the result by induction on . First, the property holds trivially for round , since .
Now, consider a fixed timestep , and suppose inductively that the property holds for round . Then we have
where we have used that whenever for all . ∎
F.2 Bounding Regret
We now use the concentration guarantees established above to bound the regret of the policies . That is, we wish to bound
Note that since our algorithm executes policies besides these ones, this is not a bound on the true regret of the algorithm, but rather for an intermediate quantity which is only used for the analysis.
We first state a regret decomposition for -functions and induced policies that are optimistic in the following sense.
A -function and policy are said to be optimistic if for all ,
We define as the induced value function.
Let be optimistic, and let be the optimistic surplus. Then
where .
Since , we can further upper bound as
F.3 Bounding the Surplus
We now focus on bounding the surplus terms
Let , , and be fixed. Then we have
We appeal to the following uniform concentration guarantee.
With probability at least , for all , we have
In particular, if we define , we are guaranteed that for all ,
Since , this immediately allows us to bound Eq. 96 by . To handle Eq. 95 we use the definition of the disagreement coefficient, which gives us that
where we have used that is non-increasing and . Since , we conclude that for all ,
F.4 Final Regret Bound
Now, consider a fixed state and let . Then we have , so we can bound
We apply Eq. 97 to each term in the sum to bound by
Observe that and . We appeal to the following lemma.
For any sequence with , .
Lemma F.4 grants that . Altogether, since and , we have
To simplify further, we use that for all ,
where we have used that the regret in each episode is bounded by . Finally, we observe that by dividing both sides above by , this is equivalent to
We now move to the disagreement coefficient defined in Eq. 40.
Lemma F.5 implies that we have . We conclude the proof by noting that the value of in Algorithm 2 is simply the recursion in Theorem F.1 with this upper bound substituted in, using the upper bound recursively to simplify.
F.5 Deferred Proofs
Let and be fixed. Let denote the entire history for episode . Define a filtration
with the convention . This filtration guarantees that is -measurable and .
Let be fixed, and let . Observe that . Applying Lemma B.2 to the process , we are guaranteed that ,
By taking a union bound, we are guaranteed that
since . This gives the the result for fixed. We union bound over all pairs to get the final result. ∎
where we have used the fact that for , and that . It follows that
Let , and let and for . Then we can bound
since any has . We further upper bound
Appendix G Proof of Theorem F.1
Recall that at round , for each layer , we solve
where for each round , are obtained by rolling in until time with , then sampling uniformly at random.
This proof is inductive. Let be fixed. Suppose we can guarantee that for layer , with probability at least , we have
G.2 Initial Bound on Least Squares Error
Then using strong convexity of the square loss (following the usual basic inequality argument for least squares), we have
Abbreviating , we can use this to rewrite the previous expression as
Since , if we define , we can further upper bound as
where .
and . Then we can write
In particular, returning to Eq. 100, we have
and likewise so we can further upper bound the process above by
where is an offset process and is an error term.
G.3 Bounding the Offset Process
we have . Note that is not a random variable, which is critical for the analysis. We can bound the size of as follows. First, observe that each function in is uniquely defined by the choice of the center and the set . Moreover, for any two sets , that are equivalent up to permutation, we have for all , meaning that the norm in the constraint is determined only by the multiset of states in . By the usual stars-and-bars counting argument, there are only possible such choices (assuming , if not there is clearly at most such choice). Hence, altogether, we have
Let and be fixed. For any function classes and and any constant , with probability at least ,
Using Lemma G.1 along with the bound from Eq. 101, we have that with probability at least ,
G.4 Bounding the Approximation Error
To relate the two terms in the absolute value, we appeal to a uniform concentration lemma.
where .
Fix , to be chosen later. Lemma G.2 implies that with probability at least ,
where we assume for now that is chosen such that .
Let and be fixed, and consider a function that achieves the value
If the maximum is not achieved, we can simply consider a sequence of functions approaching the supremum, but we omit the details.
where we have used that . This means that
As in the analysis for , we argue that this function belongs to a relatively small class. In particular, we have
Through the same counting argument as in the analysis of , we have . We use this to relate
to a conditional-expected variant of the same quantity via a uniform concentration bound.
With probability at least , for all , we have
Conditioned on the event in Lemma G.3, we have
by definition. Letting for each , this implies
Recall that for each latent state and , we define the disagreement coefficient as
It follows from the discussion above that we have
where we have used that is decreasing in . Recalling the definition , we are guaranteed that
G.5 Putting Everything Together
Combining the bounds on and and taking a union bound, we are guaranteed that with probability at least ,
where we define . This bound holds for any chosen a-priori, so long as . We now make an appropriate choice. Recall that
Assume for now that this constraint holds. Then we can bound
Furthermore, using the AM-GM inequality, we have
Using this, we can (rather coarsely) simplify the error bound to
The critical detail here is that the constant in front of is no larger than , so there is no exponential blowup as we propagate this constraint backward.
Overall, we get that any sequences , are admissible as long for all ,
for any chosen a-priori.
For the base case, we observe that since for all , we have that for layer ,
We conclude that the following sequence is admissible:
In particular, this guarantees that with probability at least , we have
for all within round . By union bound, the same holds for all with probability at least .
G.6 Deferred Proofs
Let , be fixed, and let . Observe that is -measurable and is a martingale difference sequence, since
Since , we have by Lemma B.1 that for any , with probability at least ,
Hence, by choosing , we are guaranteed that with probability at least ,
The result now follows by taking a union bound over all and .
Let and be fixed. Let denote the entire history for episode . Define a filtration
with the convention . This filtration guarantees that is -measurable and .
By taking a union bound over all , and by choosing , we are guaranteed that
Let be fixed, and recall that . Define and
with the convention , where denotes the entire history for episode . Lemma B.2 implies that with probability at least ,
This proves the first statement for this choice of . To prove the second statement, we define a new filtration
Lemma B.2 implies that with probability at least ,
The final result now follows from a union bound over all possible functions in . ∎