Batch Value-function Approximation with Only Realizability
Tengyang Xie, Nan Jiang
Introduction
What is the minimal function-approximation assumption that enables polynomial sample complexity, when we try to learn from an exploratory batch dataset? Existing algorithms and analyses—those that have largely laid the theoretical foundation of modern reinforcement learning—have always demanded assumptions that are substantially stronger than the most basic one: realizability, i.e., that (approximately) lies in the function class. These strong assumptions have recently compelled Chen & Jiang (2019) to conjecture an information-theoretic barrier, that polynomial learning is impossible in batch RL, even with exploratory data and realizable function approximation.
In this paper, we break this barrier by an algorithm called Batch Value-Function Tournament (BVFT). Via a tournament procedure, BVFT reduces the learning problem to that of identifying from a pair of candidate functions. In this subproblem, we create a piecewise constant function class of statistical complexity that can express both candidate functions up to small discretization errors, and use the projected Bellman operator associated with the class to identify . We present the algorithm in Section 4 and prove its sample complexity in Sections 5 and 6. A limitation of our approach is the use of a relatively stringent version of concentrability coefficient from Munos (2003) to measure the exploratoriness of the dataset (see Assumption 1). Section 7.2 investigates the difficulties in relaxing the assumption, and Appendix D discusses how to mitigate the pathological behavior of the algorithm when the assumption does not hold.
As another limitation, BVFT enumerates over the function class and is computationally inefficient for training. That said, the algorithm is efficient when the function class has a polynomial cardinality, making it applicable to another problem in batch RL: model selection (Farahmand & Szepesvári, 2011).We use the phrase “model selection” as in the context of e.g., cross validation, and the word “model” does not refer to MDP dynamics; rather they refer to value functions for our purposes. In Section 7.1, we review the literature on this important problem and discuss how BVFT has significantly advanced the state of the art on the theoretical front.
Related Work
Stronger Function-Approximation Assumptions in Existing Theory The theory of batch RL has struggled for a long time to provide sample-efficiency guarantees when realizability is the only assumption imposed on the function class. An intuitive reason is that learning is roughly equivalent to minimizing the Bellman error, but the latter cannot be estimated from data (Jiang, 2019; Sutton & Barto, 2018, Chapter 11.6), leading to the infamous “double sampling” difficulty (Baird, 1995; Antos et al., 2008). Stronger/additional assumptions have been proposed to circumvent the issue, including low inherent Bellman errors (Munos & Szepesvári, 2008; Antos et al., 2008), averager classes (Gordon, 1995), and additional function approximation of importance weights (Xie & Jiang, 2020).
State Abstractions State abstractions are the simplest form of function approximation. (They are also special cases of the aforementioned averagers.) In fact, certainty equivalence with a state abstraction that can express , known as -irrelevant abstractions, is known to be consistent, i.e., will be correctly learned if each abstract state-action pair receives infinite amount of data (Littman & Szepesvári, 1996; Li et al., 2006, Theorem 4).
Tournament Algorithms Our algorithm design also draws inspirations from existing tournament algorithms. Closest related is Scheffé tournament for density estimation (Devroye & Lugosi, 2012), which minimizes the total-variation (TV) distance from the true density among the candidate models, and has been applied to RL by Sun et al. (2019). Interestingly, the main challenge in TV-distance minimization is very similar to ours at a high level, that TV-distance itself of a single model cannot be estimated from data when the support of the distribution has a large or infinite cardinality. Similar to Scheffé tournament, our algorithm compares pairs of candidate value functions, which is key to overcoming the fundamental unlearnability of Bellman errors.
Tournament algorithms are also found in RL when the goal is to select the best state abstraction from a candidate set (Hallak et al., 2013; Jiang et al., 2015). These works will be discussed in Section 7.1 in the context of model selection.
Lower Bounds Wang et al. (2020); Amortila et al. (2020); Zanette (2020); Chen et al. (2021) have recently proved hardness results under realizability in batch RL. These results do not contradict ours because they deploy a weaker data assumption; see Appendix A.2 for discussions. Rather, their negative and our positive results are complementary and together provide a fine-grained characterization of the landscape of batch RL.
Preliminaries
Consider an infinite-horizon discounted Markov Decision Process , where is the finite state space that can be arbitrarily large, is the finite action space, is the transition function, is the reward function, is the discount factor, and is the initial state distribution.
2 Batch Data
We assume that the learner has access to a batch dataset consisting of i.i.d. tuples, where . Such an i.i.d. assumption is standard for finite-sample analyses in the ADP literature (Munos & Szepesvári, 2008; Farahmand et al., 2010; Chen & Jiang, 2019), and can often be relaxed at the cost of significant technical burdens and complications (see e.g., Antos et al., 2008). We will also use and to denote the marginal of and the conditional of given . To learn a near-optimal policy in batch RL, an exploratory dataset is necessary, and we measure the degree of exploration as follows:
We assume that . We further assume that (1) There exists constant such that for any , . (2) There exists constant such that for any , . Also . It will be convenient to define .
The first statement is very standard, asserting that the data distribution put enough probabilities on all actions. For example, with a small number of actions, a uniformly random policy ensures that satisfies this assumption.
The second statement measures the exploratoriness of ’s state marginal by , and two comments are in order. First, this is a form of concentrability assumption, which not only enforces data to be exploratory, but also implicitly imposes restrictions on the MDP’s dynamics (see the reference to in Assumption 1). While the latter may be undesirable, Chen & Jiang (2019, Theorem 4) shows that such a restriction is unavoidable when learning with a general function class. Second, the version of concentrability coefficient we use was introduced by Munos (2003, Eq.(6)), and is more stringent than its more popular variants (e.g., Munos, 2007; Farahmand et al., 2010). That said, (1) hardness results exist under a weaker form of the assumption (see Appendix A.2), and (2) whenever the transition dynamics admit low-rank stochastic factorization, there always exist data distributions that yield small despite that can be arbitrarily large; see Appendix A.1, where we also discuss how Assumption 1 compares to no inherent Bellman errors in the context of low-rank MDPs. We investigate why it is difficult to work with more relaxed assumptions in Section 7.2, and discuss how to mitigate the negative consequences when the assumption is violated in Appendix D.
A direct consequence of Assumption 1, which we will use later to control error propagation and distribution shift, is the following proposition.
Let be a distribution over and be a policy. Let denote the distribution specified by the generative process . Under Assumption 1, we have . Also note that .
3 Value-function Approximation
Since the state space can be prohibitively large, function approximation is necessary for scaling RL to large and complex problems. In the value-function approximation setting, we are given a function class to model . Unlike prior works that measure the approximation error of using inherent Bellman errors (Munos, 2007; Antos et al., 2008)—which amounts to assuming that is (approximately) closed under —we will measure the error using Definition 1, where error only implies realizability, . In fact, given that the assumptions required by all existing algorithms are substantially stronger than realizability, Chen & Jiang (2019, Conjecture 8) conjecture that polynomial sample complexity is unattainable in batch RL when we only impose realizability on , which is why our result may be surprising.
4 Polynomial Learning
Our goal is to devise a statistically efficient algorithm with the following kind of guarantee: with high probability we can learn an -optimal policy , that is, , when is realizable and the dataset is only polynomially large. The polynomial may depend on the effective horizon , the statistical complexity of the function class , the concentrability coefficient , (the inverse of) the suboptimality gap , and where is the failure probability. Our results can also accommodate the more general setting when is not exactly realizable, in which case the suboptimality of is allowed to contain an additional term proportional to the approximation error up to a polynomial multiplicative factor.
Algorithm and the Guarantee
In this section, we introduce and provide intuitions for our algorithm, and state its sample complexity guarantee which will be proved in the subsequent sections.
While realizability is the only expressivity condition assumed, being piecewise constant is a major structural assumption, and is too restrictive to accommodate practical function-approximation schemes such as linear predictors or neural networks, let alone the completely unstructured set of functions one would encounter in model selection (Section 7.1). How can we make use of this observation?
An immediate idea is improper learning, i.e., augmenting —which is not piecewise constant in general and may have an arbitrary structure—to its smallest superset that is piecewise constant, which automatically inherits realizability from . To do so, we may first discretize the output of each function up to a small discretization error ,When is an odd integer, discretization onto a regular grid guarantees at most approximation error, and the cardinality of the set is . For arbitrary , a similar discretization yields a cardinality of , and we upper-bound it by throughout the analysis for convenience. and partition by grouping state-action pairs together only when the output (after discretization) is constant across them. The problem is that, the resulting function class is way too large compared to ; its statistical complexity—measured by the number of groups—can be as large as , doubly exponential in which is what we can afford!
To turn this idea into a polynomial algorithm, we note that the statistical complexity of the superset is affordable when is constant, say, . This provides us with a procedure that identifies out of two candidate functions. To handle an exponentially large , we simply perform pairwise comparisons between all pairs of , and output the function that has survived all pairwise comparisons involving it. Careful readers may wonder what happens when , as realizability is obviously violated. As we will show in Section 6, the outcomes of these “bad” comparisons simply do not matter: is never involved in such comparisons, and any other function will always be checked against , which is enough to expose the deficiency of a bad .
The above reasoning ignores approximation and estimation errors, which we handle in the actual algorithm and its analysis; see Algorithm 1. Below we state its sample complexity guarantee, which is the main theorem of this paper.
Under Assumption 1, with probability at least , BVFT (Algorithm 1) with returns a policy that satisfies
The most outstanding characteristic of the sample complexity is the rate. In fact, the poor dependencies on and are both due to : when we rewrite the guarantee in terms of suboptimality gap as a function of , we see an estimation-error term, featuring the standard penalty due to distribution shift and quadratic-in-horizon error propagation.
The rate comes from two sources: of it is due to the worst-case statistical complexity of the piecewise constant classes created during pairwise comparisons. The other is the standard statistical rate. While standard, proving concentration bounds in our analysis turns out to be technically challenging and requires some clever tricks. We refer mathematically inclined readers to Section 5.2.3 for how we overcome those challenges.
We prove Theorem 2 in the next two sections. Section 5 establishes the essential properties of the pairwise comparison step in Line 8, where we view the problem at a somewhat abstract level to attain proof modularity. Section 6 uses the results in Section 5 to prove the final guarantee.
Value-function Validation using a Piecewise Constant Function Class
In this section we analyze a subproblem that is crucial to our algorithm: given a piecewise constant class (induced by , a partition of )We treat as mapping to an arbitrary finite codomain, and iff . with small realizability error , we show that we can compute a statistic for any given function , and the statistic will be a good surrogate for as long as Assumption 1 holds and the sample size is polynomially large. We use to denote the number of equivalence classes induced by .
As Section 4 and Algorithm 1 have already alluded to, later we will invoke this result when comparing two candidate value functions and (with ), and define as the coarsest partition that can express both and ; when , will be small. To maintain the modularity of the analysis, however, we will view as an arbitrary partition of in this section.
The statistic we compute is (c.f. Line 8 of Algorithm 1), where is defined as follows:
Define as the sample-based projected Bellman update operator associated with : for any ,
To develop intuitions, we first consider the special case of and . In this scenario, we can show that is the unique fixed point of , which justifies using as a surrogate for . The concepts and lemmas introduced here will also be useful for the later analysis of the general case.
We start by defining as when .
Define as the projected Bellman update where the projection is onto , weighted by . That is, for any ,
Next, we show that it is possible to define an MDP , such that coincides with the Bellman update of . Readers familiar with state abstractions may find the definition unusual, as the “abstract MDP” associated with is typically defined over the compressed (or abstract) state space instead of the original one (e.g., Ravindran & Barto, 2004). We define over because (1) our is an arbitrary partition of , which does not necessarily induce a consistent notion of abstract states, and (2) even when it does, the MDPs defined over are dual representations to and share many important properties with the classical notion of abstract MDPs (Jiang, 2018).
Define , where
is the Bellman update operator of .
When , is the unique fixed point of .
2 The General Case
In the general case, we want to show that and control each other. The central result of this section is the following proposition:
Then, with probability at least , for any such that ,
Proving the proposition requires quite some preparations. We group the helper lemmas according to their nature in Sections 5.2.1 to 5.2.3, and prove Proposition 5 in Section 5.2.4.
The first two lemmas allow us to characterize error propagation in later proofs. That is, it will help answer the question: if we find to be small (but nonzero), why does it imply that is small?
In fact, it is precisely this analysis that demands the strong definition of concentrability coefficient in Assumption 1: as we will later show in the proof of Proposition 5 (Section 5.2.4), the error propagates according to the dynamics of instead of that of (c.f. the term in Eq.(45)). Therefore, popular definitions of concentrability coefficient (e.g., Munos, 2007; Antos et al., 2008; Farahmand et al., 2010; Xie & Jiang, 2020)—which all consider state distributions induced in —do not fit our analysis. Fortunately, the defined in Assumption 1 has a very nice property, that it automatically carries over to no matter what is:
Any that satisfies Assumption 1 for the true MDP also satisfies the same assumption in . As a further consequence, Proposition 1 is also satisfied when is replaced by .
The next lemma parallels Proposition 4 in Section 5.1, where we showed that when . When is non-zero, we need a more robust version of this result showing that is controlled by .
.
2.3 Concentration Bounds
We need two concentration events: that is close to , and that is close to . We will split the failure probability evenly between these events.
We begin with the former, which requires a standard result for realizable least-square regression. The proof is deferred to Appendix B.5.
We then use Lemma 8 to prove that is small.
The key proof idea is to leverage a special property of piecewise constant classesAn alternative (and much messier) approach is to prove scalar-valued concentration bounds for in each group of state-action pairs. Those groups with few data points will have high uncertainty, but they also contribute little to . Compared to this approach, our proof is much simpler. to reduce the analysis to the realizable case: regressing over is equivalent to regressing (with ) over a “tabular” function class, where the portion of the data generation process is treated as part of the inherent label noise. After switching to this alternative view, the tabular class over the codomain of is fully expressive and always realizable, which makes Lemma 8 applicable. See Appendix B.6 for the full proof of Lemma 9.
The second concentration result we need is an upper bound on for all simultaneously. We need to union bound over because our statistic is with , which is a data-dependent function.
W.p. , , , as long as
It is straightforward to bound (note the squares), but a naïve conversion to a bound on the desired quantity (difference without squares) would result in rate. To obtain rate, we consider two situations separately, depending on whether is below or above certain threshold: when it is below the threshold, we can use Bernstein’s to exploit the low variance of ; when it is above the threshold, we obtain the bound by factoring the difference of squares. Combining these two cases with an threshold yields a clean result; see proof details in Appendix B.7.
2.4 Proof of Proposition 5
We are now ready to prove Proposition 5. Due to space limit we only provide a proof sketch in the main text.
To prove Eq.(6), define as the policy . Consider any such that , we have
The first term can be bounded via Lemma 7. The second term is bounded by , where is a distribution that also satisfies (Proposition 1) and hence can be handled by recursion. The third can be bounded by due to , and can be related to by the concentration bounds established in Section 5.2.3, which are satisfied due to the choice of in the proposition statement.
To prove Eq.(7), we can similarly relate to via the concentration bounds, and
Proof of Theorem 2
With the careful analysis of the pairwise-comparison step given in Section 5, we are now ready to analyze Algorithm 1. Roughly speaking, we will make the following arguments:
For the output , if is small, then . (Eq.(6) of Proposition 5)
That will be small, because is small, where is the best approximation of in Definition 1. (Eq.(7) of Proposition 5)
Before we delve into the proof of Theorem 2, we need yet another lemma, which connects in Section 5 to the approximation error of . As Section 4 has suggested, this is feasible because we are only concerned with the comparisons involving , and may be arbitrarily large otherwise.
The induced from Line 7 satisfies . When , we further have .
Let be the partition induced by and . According to Eq.(6), for any s.t. ,
It then remains to bound . Note that
For any , let be the partition of induced by and . Then
Combining the above results, we have for any s.t. ,
Finally, since any state-action distribution induced by any (potentially non-stationary) policy always satisfies Proposition 5, by Chen & Jiang (2019, Lemma 13) we have
Discussions and Conclusions
When learning from a batch dataset in practice, one would like to try different algorithms, different function approximators, and even different hyperparameters for a fixed algorithm and see which combination gives the best result, as is always the case in machine-learning practices. In supervised learning, this can be done by a simple cross-validation procedure on the holdout dataset. In batch RL, however, how to perform such a model-selection step in a provably manner has been a widely open problem.See Mandel et al. (2014) and Paine et al. (2020) for empirical advances on this problem.
In comparison, BVFT provides a more direct approach with a much stronger guarantee: let be the output of different base algorithms. We can simply run BVFT on the holdout dataset with . The only function-approximation assumption we need is that one of ’s is a good approximation of , which is hardly an assumption as there is little we can do if all the base algorithms produce bad results. Compared to prior works, our approach is much more agnostic w.r.t. the details of the base algorithms, our loss and guarantees are directly related to as opposed to relying on (possibly loose) upper bounds based on bisimulation, and our statistical guarantee scales to an exponentially large as opposed to a constant-sized one.
Another common approach to model selection is to estimate for each candidate via off-policy evaluation (OPE).As a side note, BVFT can be adapted to OPE when for target policy as long as we change the operator in to , though Assumption 1 will still be needed. OPE-based model selection has very different characteristics compared to BVFT, and they may be used together to complement each other; see a more detailed comparison and discussion in Appendix F.
2 On the Assumption of Exploratory Data
As noted in Section 3.2, our Assumption 1 adopts a relatively stringent definition of concentrability coefficient. A more standard definition is the following, as appeared in the hardness conjecture of Chen & Jiang (2019):
Let be the distribution of when we start from and follow policy , which we will call an admissible distribution. We assume that there exists such that for any (possibly nonstationary) policy and .
In Appendix C we construct 3 scenarios to illustrate the difficulties (and sometimes possibilities) in extending our algorithm and its guarantees to a weaker data assumption such as Assumption 2; due to space limit we only include a high-level summary of the results below. In the first construction, we show that BVFT fails under Assumption 2 in a very simple MDP if we are allowed to provide a contrived distribution to the learner where data is unnaturally missing in certain states (Figure 1). Motivated by the unnaturalness of the construction, we attempt to circumvent the hardness by imposing an additional mild assumption on top of Assumption 2, that must itself be “admissible” . While it becomes much more difficult to construct a counterexample against the algorithm, it is still possible to design a scenario where our analysis breaks down seriously (Figure 2). We conclude with a positive result showing that the actual assumption we need is somewhere in between Assumptions 1 and 2, for that our algorithm and analysis work for a simple and natural “on-policy” case which obviously violates Assumption 1; formulating a tighter version of the assumption in a natural and interpretable manner remains future work.
3 Conclusions
We conclude the paper with a few open problems:
Is it possible to circumvent the failure modes discussed in Section 7.2 with novel algorithmic ideas, so that a variant of BVFT only requires a weaker assumption on data? On a related note, the original hardness conjecture of Chen & Jiang (2019) remains unsolved: our positive result assumes a stronger data assumption, and the negative results of Wang et al. (2020); Amortila et al. (2020) assume weaker ones.
When the data is seriously under-exploratory, to the extent that it is impossible to compete with (Fujimoto et al., 2019; Liu et al., 2019, 2020), what is the minimal function-approximation assumption that enables polynomial learning? In particular, requiring that realizes no longer makes sense as we do not even attempt to compete with . Recent works often suggest that we compete with whose occupancy is covered by , but as of now very strong expressivity assumptions are needed to achieve such an ambitious goal (e.g., Jiang & Huang, 2020, Proposition 9). It will be interesting to explore more humble objectives and see if the algorithmic and analytical ideas in this work extend to the more realistic setting of learning with non-exploratory data.
Acknowledgments
The authors thank Akshay Krishnamurthy, Yu Bai, Yu-Xiang Wang for discussions related to Lemma 10, and Alekh Agarwal for numerous comments and discussions after the initial draft of the paper was released. Nan Jiang acknowledges support from the DEVCOM Army Research Laboratory under Cooperative Agreement W911NF-17-2-0196 (ARL IoBT CRA). The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the Army Research Laboratory or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Government purposes notwithstanding any copyright notation herein.
References
Appendix A Further Discussions of Assumption 1
Here we show that in general environments whose transition admits low-rank stochastic factorization, there always exists that satisfies Assumption 1 with a small .
follows from the uniformity of . For , note that and are convex combinations of rows of , and is designed to be uniform mixture of these rows, so is always bounded by the number of rows, which is . ∎
Comparison to Standard Concentrability The more lenient and popular definitions of concentrability (e.g., Assumption 2) are also found to be satisfiable in low-rank MDPs—in fact, such low-rankness is the only type of general structure known to enable concentrability (Chen & Jiang, 2019, Proposition 10). Comparing our Example 1 with the example given by Chen & Jiang (2019), the most outstanding difference is that in their case, the data distribution can be a mixture of state distributions induced by different policies in the environment; if a hidden factor cannot be reached by any policy, it is possible that any mixture distribution may fail to satisfy Assumption 1 with a reasonably small .
Comparison to No Inherent Bellman Errors In the above low-rank MDP scenario, the assumption that has no inherent Bellman error (Antos et al., 2008; Chen & Jiang, 2019)—which enables polynomial sample complexity for many existing algorithms—can provably hold when the left factorization matrix (the analogy of in Example 1) is known to the learner as state-action features, so it is worth comparing such a setting to ours. In this setting, which is often known as linear MDPs (Jin et al., 2020), one can choose to be the linear class induced by the left factorization matrix, which is guaranteed to be closed under , i.e., have no inherent Bellman errors. In contrast, our Assumption 1 holds without relying on knowing the left factorization matrix. The price we pay is that we require a stochastic factorization (Example 1) instead of just low-rankness, and whether Algorithm 1 can hold with just low-rankness (possibly with additional mild assumptions) is an open problem.
A.2 Lower bounds
We assume that there exists , such that for any , for any (possibly nonstationary) policy and (see Assumption 2 for the definition of ).
In the setup of our main text, if we replace Assumption 1 with Assumption 3, no algorithm with finite sample complexity exists.
Next we consider the relationship between Assumptions 1, 2, and 3 in the following result; the proof is elementary and can be extracted from existing analyses (Munos, 2003, 2007; Chen & Jiang, 2019).
Assumption 1 Assumption 2 Assumption 3.
With these results, we now can relate the lower bounds Wang et al. (2020); Amortila et al. (2020) to our positive result: indeed they do not contradict each other, as the negative results use the weakest form of concentrability (the -aware version in Assumption 3), and our positive result uses the strongest form (Assumption 1). Furthermore, to circumvent the hardness in Proposition 12, imposing linear structure on —which is a very strong structural assumption—does not help, as the hardness results of Wang et al. (2020); Amortila et al. (2020) still apply. On the other hand, making a stronger data assumption as in Assumption 1 would avoid the lower bound.
As a final remark, the hardness conjecture of Chen & Jiang (2019), which uses Assumption 2, remains unsolved. Originally Chen & Jiang (2019) argued that hardness conjecture is highly likely true given the lack of positive results under realizability, but given our work the picture is much less clear now. If we still anticipate a hardness result, our work has substantially narrowed the search space for the lower-bound constructions (if they exist): we will necessarily be able to establish the lower bound with either or being piecewise constant, otherwise our tournament procedure can extend the polynomial upper bounds for these special settings to arbitrary function classes.
Appendix B Proofs
B.2 Proof of Proposition 4
The existence and the uniqueness of the fixed point of follow from Lemma 3, so it suffices to check . For any , we will calculate using Eq.(12), which is a convex average of terms in the form of
B.3 Proof of Lemma 6
B.4 Proof of Lemma 7
Let , and . For any ,
B.5 Proof of Lemma 8
Applying the one-sided Bernstein and union bounding over all : w.p. , ,
Now for any , let be its closest function in , and
We have already bounded the first term, so it suffices to bound the remaining two terms. Consider
Solving for the quadratic formula, we have
B.6 Proof of Lemma 9
For any , let and . When we sample according to the data distribution, we use and to denote the random variables whose realizations are and , respectively. Define as the codomain of , and . Consider the regression problem over function class . Let and be the empirical risk minimizer and the Bayes-optimal regressor, respectively, and thanks to the full expressivity of . Also note that . Invoking Lemma 8 we immediately have that w.p. ,
B.7 Proof of Lemma 10
We apply Bernstein’s inequality with a union bound over : w.p. , for any ,
Now, for any , let satisfies .
Similarly, for any , let satisfies . Then, as long as ,
The last line is obtained by the following argument:
where all the inequalities follow from the triangle inequality and the fact of .
We now analyze the two terms above separately.
We now unify those two cases above. We first set , and .
When , we apply the first case and obtain
for the case of .
If , we use the second case. The term (I) in Eq.(31) is
Since , we reorder the terms and obtain
We still set . Thus, solving
provides us with the sufficient sample size ,
Choosing the greater one between the required sample sizes for and completes the proof. ∎
B.8 Proof of Proposition 5
Since in the proposition statement is chosen to satisfy the sample-size requirements in Lemmas 9 and 10, the statement of each lemma holds with probability at least , and by union bound they hold simultaneously w.p. .
Define as the policy . Consider any such that ,
In Eq.(45), the first term follows from Lemma 7 and that , the second from Chen & Jiang (2019, Lemmas 14 and 15), and the third from Chen & Jiang (2019, Lemma 12).
According to Lemma 6, also satisfies , so it can be viewed as one of those ’s we started with on the LHS, allowing us to expand the inequality indefinitely. Alternatively, we have
So for any such that , .
It then remains to bound :
B.9 Proof of Lemma 11
For the first claim, we may write , and the number of equivalent classes induced by is at most the product of the cardinalities of the codomains of and , so the result follows.
For the second claim, recall that , so
Appendix C Obstacles in Relaxing Assumption 1
In this section we discuss the obstacles in relaxing Assumption 1. Before we start, we emphasize that the difficulties have nothing to do with the tournament procedure, and are entirely about learning with a realizable state-action aggregation —a problem so standard, that the difficulties we find may have broader implications beyond the scope of this work; see Appendix C.1 for discussions on the relevance of our findings to existing RL algorithms.
We present our first counterexample in Figure 1, where Assumption 1 is violated but Assumption 2 is satisfied due to missing data in state-action pairs unreachable from the initial state . A state-action aggregation , which is guaranteed to express , results in a projected Bellman operator that has multiple fixed points other than even when sample size goes to infinity, and many such fixed points produce suboptimal policies. Therefore, , which is the surrogate loss that plays a central role in our algorithm, cannot control the performance of in this setting; see Appendix C.1 for details.
An issue with Figure 1 is that its cannot be admitted in the MDP (i.e., generated by some behavior policy from ), and assuming admissible (which is reasonable) excludes this counterexample. While this may look promising, here we show that our analysis still faces substantial obstacles if we replace Assumption 1 with Assumption 2 plus admissible . Below we explain in more details.
As Section 5.2.1 has alluded to, the error propagates according to the dynamics of instead of in our analysis, so the purpose of Assumption 1 is really to guarantee the following type of assumption:The actual assumption we need is slightly more complicated, that we need for any admissible in but using any other admissible from as the initial distribution. This complication, however, does not affect our counterexample. Neither does it affect the next positive result.
There exists , such that for any , we have for any that is admissible in .
Unfortunately, via a carefully constructed example, we show in Figure 2 that Assumption 4 cannot be implied by Assumption 2 plus admissible . In particular, even when Assumption 2 is satisfied with a constant and is admissible, we can use the aggregation to “leak” probabilities from easy-to-reach states in to hard-to-reach states gradually over time steps, causing an exponential blow-up of . See Appendix C.2 for details.
Despite the discouraging counterexamples, we show a slightly positive result, implying that Assumption 4 could be much weaker than Assumption 1, leaving the possibility of something weaker than Assumption 1 but more natural and interpretable than Assumption 4. In particular, we show a scenario where Assumptions 2 and 4 can be satisfied with a small , yet Assumption 1 may be violated badly, implying the looseness and unnecessity of Assumption 1 for our analysis.
Consider the uncontrolled case where there is only one action, and we may treat as an transition matrix. We consider the “on-policy” case, where is an invariant distribution w.r.t. , i.e., . Since an invariant distribution always exists, this does not impose any restriction on , so we can make the in Assumption 1 very large: for example, when is identity, must be as large as to satisfy Assumption 1. On the other hand, Assumption 2 is trivially satisfied with , as is the only admissible distribution in . Perhaps surprisingly, this is also true for Assumption 4: regardless of , we have , because is defined by averaging the dynamics of with weights proportional to , and this averaging step can be ignored when the incoming distribution is itself.
C.1 Details of Figure 1
We construct an MDP, a data distribution , and a realizable function class with , such that (1) Assumption 1 is violated; (2) Assumption 2 is satisfied; (3) Algorithm 1 may output a suboptimal policy even with infinite data.
See Figure 1 for an illustration of the MDP, where the transition dynamics and the rewards are deterministic. Let , and be the deterministic initial state.
Let be uniform over all state-action pairs other than ,The probability assigned to is twice as much as that to by , because the former is the abbreviation of two state-action pairs. This detail is of minor importance, and can be changed to many other distributions, as long as the later values of are set in a way consistent with . which violates Assumption 1.The fact that is violated is of minor concern here: we can add exponentially small probabilities to in , and with a polynomially large , the non-uniqueness of the fixed point of still persists. What is really important is that no finite satisfies . However, since no policy can visit or from the starting state , lacking data in does not affect the validity of Assumption 2. It remains to specify and show that our algorithm fails.
Our consists of two functions, and . We specify them by writing down their values on {\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}(s_{0},a_{1})},(s_{0},a_{2}),(s_{1},a),(s_{2},a),{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}(s_{3},a)},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}(s_{4},a)} as a vector: Q^{\star}=({\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1},1.9,0,1,{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}1},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}0}) and Q=({\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}7},1.9,0,1,{\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}7},{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}10}). The red and blue colors correspond to the color schemes in Figure 1 to facilitate understanding.
When we run Algorithm 1, the only nontrivial aggregation performs is grouping together and ; and every other state-action pair are kept in their own equivalence classes, respectively. ( under the same state are by default aggregated except in .)
Now that the construction is complete, we can verify that our loss is zero for both and . Therefore, the algorithm may choose to output the greedy policy of either function, but the greedy policy of is suboptimal since it chooses in .
This phenomenon is particularly interesting when we notice that, everything will work fine if we remove the data on : the algorithm will still have high uncertainty in the values of and , but such uncertainty does not incorrectly propagate to and hence does not affect our ability to choose the optimal action there. Therefore, the pathological behavior is due to having data with more coverage than necessary, which may be surprising. To our best knowledge, this pathology—which affects a wide range of batch RL algorithms—is documented for the first time. It will be interesting to see if we can obtain a deeper understanding of this issue and possibly circumvent it.
C.2 Counterexample Against Admissible μ𝜇\mu
One weakness of the counterexample in Figure 1 is that cannot be generated by a behavior policy starting from , as such admissible distributions never visit . Therefore, we can exclude the pathology by assuming that is (a mixture) of admissible distributions, on top of Assumption 2.
In addition to Assumption 2, assume that is a mixture of for a set of pairs, where may be nonstationary and/or stochastic.
This seemingly mild additional assumption leads to some powerful corollaries. For example, any distribution induced from (say, with policy in steps) as the initial distribution (instead of ) will still be covered by , since the distribution is essentially a mixture of . Furthermore, creating a situation like Figure 1 becomes very difficult (see below for detailed reasons); in fact, we believe that it is impossible to induce hardness with a constant-depth construction as in Figure 1.
Despite the power of Assumption 5, we show below that our analysis still faces substantial obstacles even under Assumption 5. In particular, our proof around Eq.(45) requires that distribution induced in should also be well covered by (i.e., Assumption 4), and this is guaranteed by Assumption 1 via Lemma 6. If we replace Assumption 1 with Assumption 5, however, below we show in a counterexample that can induce a distribution that visits a state exponentially more likely compared to its likelihood in , thus breaking Assumption 4.
See Figure 2. The true MDP is essentially a 2-armed contextual bandit, where the initial state (or context) distribution is for between and a sufficiently large integer (and the rest probability goes to ; we will not need it). is a parameter to be set later. For each , we will call the two actions (for “left”) and (“right”), respectively. All states other than are absorbing states. During data collection, the learner randomly starts in some according to , and take actions uniformly at random. This guarantees that for Assumption 2. Note that we do not specify the rewards as our goal is only to show that a distribution with large density ratio against can be induced in , and not to directly show the failure of the algorithm.
The dynamics of (Definition 4) can be equivalently described as the following: given , the next-state is generated in two steps,
In Figure 2, we aggregate and together for every , and the “re-drawing” step happens after the agent lands in . That is, before the next time step, there is some probability that it will teleport to . Strictly speaking we are aggregating states instead of state-action pairs, but the effects can be reproduced by e.g., adding a dummy state with only 1 action above each , and aggregating this state-action pair with . We opt for a slightly different mechanism for simplicity of the construction.
We will show that with the effect of aggregation, we can induce a distribution whose density ratio against is exponentially large, using the policy that always takes action “”. Let be the probability of visiting at time step by this policy, and let be the mass of in . Our goal is to calculate and show that it is exponential in . First, . The division by is because contains data from two different time steps ( at time step , and and their sibling states at time step ). Note that the data is collected in the true MDP and the aggregation plays no role here.
Now we calculate . The only probability path of visiting at time step is . Along this path, , and is deterministic, so we focus on the probability of .
Recall from the above that whenever at , we will redraw a state from according to their probabilities in . Therefore,
where is calculated based on the fact that the data collection policy is uniformly random. This gives
Therefore, when , will be exponential in .
Appendix D What If Assumption 1 is Violated?
When Assumption 1 is violated, the guarantees in Theorem 2 does not hold in general. However, this does not mean that the algorithm is useless or there is nothing we can do in this case. Below we discuss a few actionable items and briefly sketch the theoretical analyses that justifies them.
As Section 7.2 has shown, one possible consequence of not having Assumption 1 is that the fixed point of may be non-unique. This suggests a diagnostic procedure that checks if such pathology occurs: let be the set of approximate fixed points of where is some small threshold. Then, we may compute as a statistic for the diagnosis. If Assumption 1 is satisfied, such a maximum distance should be small as all functions in should be close to the fixed point of under , In an early stage of the project, our algorithm actually checks whether instead of the current Line 8. This alternative algorithm also enjoys polynomial sample complexity. and it is important to note that such a claim does not depend on (see e.g., Lemma 3). On the other hand, if the maximum distance within is observed to be small when we actually run the algorithm, we can rest assured that is small (assuming is small), and we only need Assumption 2 to further guarantee the near-optimality of , regardless of whether Assumption 1 holds or not.
As an example, consider the counterexample in Figure 1 and Appendix C.1, where both and are fixed points of and is large. As Section 7.2 suggests, the pathology goes away if we remove the data from . Note that still has many fixed points (the value of can be anything), but their distance from each other under is always because is only supported on , and all these fixed points induce an optimal policy from .
D.2 Tweaking ϕitalic-ϕ\phi
Our main analysis treats the discretization step (Line 7) very casually. However, the structure of plays an important role in error propagation, and small changes in discretization can produce significantly different ’s, so one may want to search for a favorable among all possibilities. What should be the guideline for such a search?
Of course, there is no guarantee that we can find such a well-behaved for a single pair of , let alone the pairs that all need to be handled. Therefore, this suggestion is more suitable for the model-selection scenario where is small (Section 7.1). To produce a rich set of possible ’s, one can consider various designs of the discretization grid (see Footnote 4): changing the offset of the grid, using a non-regular grid, using soft aggregations instead of hard ones, or even setting to be slightly greater than intended. Whether it is easy to find a well-behaved is more of an empirical question, and we leave further investigation to future work.
It is possible to define as , and still prove a polynomial sample complexity result. However, making this change leads to a suboptimal dependence on if we still follow the same proof structure. Below we briefly explain the challenges.
Appendix F Comparison to OPE in Model Selection
Section 7.1 discussed the application of BVFT to model selection. Another common approach to model selection is to estimate for each candidate via off-policy evaluation (OPE). Unfortunately, unbiased OPE with importance sampling (IS) (Precup et al., 2000) incurs exponential variance in horizon when the behavior policy is significantly different from the ones being evaluated (Jiang & Li, 2016), and recent marginalized IS (MIS) methods that overcome such a “curse of horizon” require some nontrivial function-approximation assumptions. For example, even if one has a function class that realizes for every being evaluated, the state-or-the-art approaches only provide an interval that contains without tightness guarantees (Jiang & Huang, 2020; Feng et al., 2020), and tightness requires further assumptions on realizing marginalized importance weights (e.g., Liu et al., 2018; Uehara et al., 2020). On a related note, if a rich is used to better satisfy these additional assumptions, one has to reserve a large amount of data as holdout dataset due to the statistical complexity of . In comparison, BVFT only uses function classes of a well-controlled worst-case complexity .
Despite the additional assumptions, OPE has its own advantages: OPE directly estimates instead of going through as a surrogate, and as a consequence, it removes the assumption that the base algorithms need to approximate and hence enjoys wider applicability. The information about can also be valuable in certain application scenarios, which cannot be obtained by our approach (we can at the best provide an upper bound on ). To this end, OPE-based methods and BVFT have very different characteristics when applied to model selection, and they are complementary and may be used together to provide more information and help the practitioners in making the final decision.