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 Q⋆Q^{\star} 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 Q⋆Q^{\star} (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 Q⋆Q^{\star} from a pair of candidate functions. In this subproblem, we create a piecewise constant function class of statistical complexity O(1/ϵ2)O(1/\epsilon^{2}) that can express both candidate functions up to small discretization errors, and use the projected Bellman operator associated with the class to identify Q⋆Q^{\star}. 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 Q⋆Q^{\star} 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 Q⋆Q^{\star}, known as Q⋆Q^{\star}-irrelevant abstractions, is known to be consistent, i.e., Q⋆Q^{\star} 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 Q⋆Q^{\star} 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 (S,A,P,R,γ,d0)(\mathcal{S},\mathcal{A},P,R,\gamma,d_{0}), where S\mathcal{S} is the finite state space that can be arbitrarily large, A\mathcal{A} is the finite action space, P:S×A→Δ(S)P:\mathcal{S}\times\mathcal{A}\to\Delta(\mathcal{S}) is the transition function, R:S×A→[0,Rmax⁡]R:\mathcal{S}\times\mathcal{A}\to[0,R_{\max}] is the reward function, γ∈[0,1)\gamma\in[0,1) is the discount factor, and d0∈Δ(S)d_{0}\in\Delta(\mathcal{S}) is the initial state distribution.

2 Batch Data

We assume that the learner has access to a batch dataset DD consisting of i.i.d. (s,a,r,s′)(s,a,r,s^{\prime}) tuples, where (s,a)∼μ,r=R(s,a),s′∼P(s,a)(s,a)\sim\mu,r=R(s,a),s^{\prime}\sim P(s,a). 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 μ(s)\mu(s) and μ(a∣s)\mu(a|s) to denote the marginal of ss and the conditional of aa given ss. 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 μ(s,a)>0 ∀s,a\mu(s,a)>0~{}\forall s,a. We further assume that (1) There exists constant 1≤CA<∞1\leq C_{\mathcal{A}}<\infty such that for any s∈S,a∈As\in\mathcal{S},a\in\mathcal{A}, μ(a∣s)≥1/CA\mu(a|s)\geq 1/C_{\mathcal{A}}. (2) There exists constant 1≤CS<∞1\leq C_{\mathcal{S}}<\infty such that for any s∈S,a∈A,s′∈Ss\in\mathcal{S},a\in\mathcal{A},s^{\prime}\in\mathcal{S}, P(s′∣s,a)/μ(s′)≤CSP(s^{\prime}|s,a)/\mu(s^{\prime})\leq C_{\mathcal{S}}. Also d0(s)/μ(s)≤CSd_{0}(s)/\mu(s)\leq C_{\mathcal{S}}. It will be convenient to define C=CSCAC=C_{\mathcal{S}}C_{\mathcal{A}}.

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 CA=∣A∣C_{\mathcal{A}}=|\mathcal{A}| satisfies this assumption.

The second statement measures the exploratoriness of μ\mu’s state marginal by CSC_{\mathcal{S}}, 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 PP 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 CSC_{\mathcal{S}} despite that ∣S∣|\mathcal{S}| 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 ν\nu be a distribution over S×A\mathcal{S}\times\mathcal{A} and π\pi be a policy. Let ν′=P(ν)×π\nu^{\prime}=P(\nu)\times\pi denote the distribution specified by the generative process (s′,a′)∼ν′⇔(s,a)∼ν,s′∼P(⋅∣s,a),a′=π(s′)(s^{\prime},a^{\prime})\sim\nu^{\prime}\Leftrightarrow(s,a)\sim\nu,s^{\prime}\sim P(\cdot|s,a),a^{\prime}=\pi(s^{\prime}). Under Assumption 1, we have ∥ν′/μ∥∞:=max⁡s,aν′(s,a)/μ(s,a)≤C\|\nu^{\prime}/\mu\|_{\infty}:=\max_{s,a}\nu^{\prime}(s,a)/\mu(s,a)\leq C. Also note that ∥(d0×π)/μ∥∞≤C\|(d_{0}\times\pi)/\mu\|_{\infty}\leq C.

3 Value-function Approximation

Since the state space S\mathcal{S} 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 F⊂(S×A→[0,Vmax⁡])\mathcal{F}\subset(\mathcal{S}\times\mathcal{A}\to[0,V_{\max}]) to model Q⋆Q^{\star}. Unlike prior works that measure the approximation error of F\mathcal{F} using inherent Bellman errors (Munos, 2007; Antos et al., 2008)—which amounts to assuming that F\mathcal{F} is (approximately) closed under T\mathcal{T}—we will measure the error using Definition 1, where error only implies realizability, Q⋆∈FQ^{\star}\in\mathcal{F}. 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 F\mathcal{F}, 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 ϵ\epsilon-optimal policy π^\hat{\pi}, that is, J(π^)≥J(π⋆)−ϵ⋅Vmax⁡J(\hat{\pi})\geq J(\pi^{\star})-\epsilon\cdot V_{\max}, when F\mathcal{F} is realizable and the dataset DD is only polynomially large. The polynomial may depend on the effective horizon 1/(1−γ)1/(1-\gamma), the statistical complexity of the function class log⁡∣F∣\log|\mathcal{F}|, the concentrability coefficient CC, (the inverse of) the suboptimality gap ϵ\epsilon, and 1/δ1/\delta where δ\delta is the failure probability. Our results can also accommodate the more general setting when F\mathcal{F} is not exactly realizable, in which case the suboptimality of π^\hat{\pi} is allowed to contain an additional term proportional to the approximation error ϵF\epsilon_{\mathcal{F}} 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 F\mathcal{F}—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 F\mathcal{F}. To do so, we may first discretize the output of each function f∈Ff\in\mathcal{F} up to a small discretization error ϵdct\epsilon_{\text{dct}},When Vmax⁡/ϵdctV_{\max}/\epsilon_{\text{dct}} is an odd integer, discretization onto a regular grid {ϵdct,3ϵdct,…,Vmax⁡−ϵdct}\{\epsilon_{\text{dct}},3\epsilon_{\text{dct}},\ldots,V_{\max}-\epsilon_{\text{dct}}\} guarantees at most ϵdct\epsilon_{\text{dct}} approximation error, and the cardinality of the set is Vmax⁡/2ϵdctV_{\max}/2\epsilon_{\text{dct}}. For arbitrary ϵdct∈(0,Vmax⁡)\epsilon_{\text{dct}}\in(0,V_{\max}), a similar discretization yields a cardinality of ⌈Vmax⁡/2ϵdct⌉\lceil V_{\max}/2\epsilon_{\text{dct}}\rceil, and we upper-bound it by Vmax⁡/ϵdctV_{\max}/\epsilon_{\text{dct}} throughout the analysis for convenience. and partition S×A\mathcal{S}\times\mathcal{A} by grouping state-action pairs together only when the output f∈Ff\in\mathcal{F} (after discretization) is constant across them. The problem is that, the resulting function class is way too large compared to F\mathcal{F}; its statistical complexity—measured by the number of groups—can be as large as (Vmax⁡/ϵdct)∣F∣(V_{\max}/\epsilon_{\text{dct}})^{|\mathcal{F}|}, doubly exponential in polylog⁡∣F∣\text{poly}\log|\mathcal{F}| 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 ∣F∣|\mathcal{F}| is constant, say, ∣F∣=2|\mathcal{F}|=2. This provides us with a procedure that identifies Q⋆Q^{\star} out of two candidate functions. To handle an exponentially large F\mathcal{F}, we simply perform pairwise comparisons between all pairs of f,f′∈Ff,f^{\prime}\in\mathcal{F}, and output the function that has survived all pairwise comparisons involving it. Careful readers may wonder what happens when Q⋆∉{f,f′}Q^{\star}\notin\{f,f^{\prime}\}, as realizability is obviously violated. As we will show in Section 6, the outcomes of these “bad” comparisons simply do not matter: Q⋆Q^{\star} is never involved in such comparisons, and any other function ff will always be checked against f′=Q⋆f^{\prime}=Q^{\star}, which is enough to expose the deficiency of a bad ff.

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 1−δ1-\delta, BVFT (Algorithm 1) with ϵdct=(1−γ)2ϵVmax⁡16C\epsilon_{\text{dct}}=\frac{(1-\gamma)^{2}\epsilon V_{\max}}{16\sqrt{C}} returns a policy π^\hat{\pi} that satisfies

The most outstanding characteristic of the sample complexity is the 1/ϵ41/\epsilon^{4} rate. In fact, the poor dependencies on CC and 1/(1−γ)1/(1-\gamma) are both due to 1/ϵ41/\epsilon^{4}: when we rewrite the guarantee in terms of suboptimality gap as a function of n=∣D∣n=|D|, we see an O(Cn−1/4/(1−γ)2)O(\sqrt{C}n^{-1/4}/(1-\gamma)^{2}) estimation-error term, featuring the standard C\sqrt{C} penalty due to distribution shift and quadratic-in-horizon error propagation.

The 1/ϵ41/\epsilon^{4} rate comes from two sources: 1/ϵ21/\epsilon^{2} of it is due to the worst-case statistical complexity of the piecewise constant classes created during pairwise comparisons. The other 1/ϵ21/\epsilon^{2} is the standard statistical rate. While standard, proving O(1/ϵ2)O(1/\epsilon^{2}) 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 Gϕ⊂(S×A→[0,Vmax⁡])\mathcal{G}_{\phi}\subset(\mathcal{S}\times\mathcal{A}\to[0,V_{\max}]) (induced by ϕ\phi, a partition of S×A\mathcal{S}\times\mathcal{A})We treat ϕ\phi as mapping S×A\mathcal{S}\times\mathcal{A} to an arbitrary finite codomain, and g(s,a)=g(s′,a′) ∀g∈Gϕg(s,a)=g(s^{\prime},a^{\prime})~{}\forall g\in\mathcal{G}_{\phi} iff ϕ(s,a)=ϕ(s′,a′)\phi(s,a)=\phi(s^{\prime},a^{\prime}). with small realizability error ϵϕ:=ϵGϕ\epsilon_{\phi}:=\epsilon_{\mathcal{G}_{\phi}}, we show that we can compute a statistic for any given function f0:S×A→[0,Vmax⁡]f_{0}:\mathcal{S}\times\mathcal{A}\to[0,V_{\max}], and the statistic will be a good surrogate for ∥f0−Q⋆∥\|f_{0}-Q^{\star}\| as long as Assumption 1 holds and the sample size is polynomially large. We use ∣ϕ∣|\phi| to denote the number of equivalence classes induced by ϕ\phi.

As Section 4 and Algorithm 1 have already alluded to, later we will invoke this result when comparing two candidate value functions ff and f′f^{\prime} (with f0=ff_{0}=f), and define ϕ\phi as the coarsest partition that can express both ff and f′f^{\prime}; when Q⋆∈{f,f′}Q^{\star}\in\{f,f^{\prime}\}, ϵϕ\epsilon_{\phi} will be small. To maintain the modularity of the analysis, however, we will view ϕ\phi as an arbitrary partition of S×A\mathcal{S}\times\mathcal{A} in this section.

The statistic we compute is ∥f0−T^ϕμf0∥2,D\|f_{0}-\widehat{\mathcal{T}}_{\phi}^{\mu}f_{0}\|_{2,D} (c.f. Line 8 of Algorithm 1), where T^ϕμ\widehat{\mathcal{T}}_{\phi}^{\mu} is defined as follows:

Define T^ϕμ\widehat{\mathcal{T}}_{\phi}^{\mu} as the sample-based projected Bellman update operator associated with Gϕ\mathcal{G}_{\phi}: for any f:S×A→[0,Vmax⁡]f:\mathcal{S}\times\mathcal{A}\to[0,V_{\max}], T^ϕμf:=\widehat{\mathcal{T}}_{\phi}^{\mu}f:=

To develop intuitions, we first consider the special case of ∣D∣→∞|D|\to\infty and ϵϕ=0\epsilon_{\phi}=0. In this scenario, we can show that Q⋆Q^{\star} is the unique fixed point of T^ϕμ\widehat{\mathcal{T}}_{\phi}^{\mu}, which justifies using ∥f0−T^ϕμf0∥\|f_{0}-\widehat{\mathcal{T}}_{\phi}^{\mu}f_{0}\| as a surrogate for ∥f0−Q⋆∥\|f_{0}-Q^{\star}\|. The concepts and lemmas introduced here will also be useful for the later analysis of the general case.

We start by defining Tϕμ\mathcal{T}_{\phi}^{\mu} as T^ϕμ\widehat{\mathcal{T}}_{\phi}^{\mu} when ∣D∣→∞|D|\to\infty.

Define Tϕμ\mathcal{T}_{\phi}^{\mu} as the projected Bellman update where the projection is onto Gϕ\mathcal{G}_{\phi}, weighted by μ\mu. That is, for any f:S×A→[0,Vmax⁡]f:\mathcal{S}\times\mathcal{A}\to[0,V_{\max}],

Next, we show that it is possible to define an MDP MϕM_{\phi}, such that Tϕμ\mathcal{T}_{\phi}^{\mu} coincides with the Bellman update of MϕM_{\phi}. Readers familiar with state abstractions may find the definition unusual, as the “abstract MDP” associated with ϕ\phi is typically defined over the compressed (or abstract) state space instead of the original one (e.g., Ravindran & Barto, 2004). We define MϕM_{\phi} over S\mathcal{S} because (1) our ϕ\phi is an arbitrary partition of S×A\mathcal{S}\times\mathcal{A}, which does not necessarily induce a consistent notion of abstract states, and (2) even when it does, the MDPs defined over S\mathcal{S} are dual representations to and share many important properties with the classical notion of abstract MDPs (Jiang, 2018).

Define Mϕ=(S,A,Pϕ,Rϕ,γ,d0)M_{\phi}=(\mathcal{S},\mathcal{A},P_{\phi},R_{\phi},\gamma,d_{0}), where

Tϕμ\mathcal{T}_{\phi}^{\mu} is the Bellman update operator of MϕM_{\phi}.

When ϵϕ=0\epsilon_{\phi}=0, Q⋆Q^{\star} is the unique fixed point of Tϕμ\mathcal{T}_{\phi}^{\mu}.

2 The General Case

In the general case, we want to show that ∥f0−T^ϕμf0∥2,D\|f_{0}-\widehat{\mathcal{T}}_{\phi}^{\mu}f_{0}\|_{2,D} and ∥f0−Q⋆∥\|f_{0}-Q^{\star}\| control each other. The central result of this section is the following proposition:

Then, with probability at least 1−δ1-\delta, for any ν∈Δ(S×A)\nu\in\Delta(\mathcal{S}\times\mathcal{A}) such that ∥ν/μ∥∞≤C\|\nu/\mu\|_{\infty}\leq C,

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 ∥f0−Tϕμf0∥2,μ\|f_{0}-\mathcal{T}_{\phi}^{\mu}f_{0}\|_{2,\mu} to be small (but nonzero), why does it imply that ∥f0−Q⋆∥\|f_{0}-Q^{\star}\| is small?

In fact, it is precisely this analysis that demands the strong definition of concentrability coefficient CSC_{\mathcal{S}} 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 MϕM_{\phi} instead of that of MM (c.f. the Pϕ(ν)P_{\phi}(\nu) 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 MM—do not fit our analysis. Fortunately, the CSC_{\mathcal{S}} defined in Assumption 1 has a very nice property, that it automatically carries over to MϕM_{\phi} no matter what ϕ\phi is:

Any C<∞C<\infty that satisfies Assumption 1 for the true MDP MM also satisfies the same assumption in MϕM_{\phi}. As a further consequence, Proposition 1 is also satisfied when PP is replaced by PϕP_{\phi}.

The next lemma parallels Proposition 4 in Section 5.1, where we showed that ∥Q⋆−TϕμQ⋆∥=0\|Q^{\star}-\mathcal{T}_{\phi}^{\mu}Q^{\star}\|=0 when ϵϕ=0\epsilon_{\phi}=0. When ϵϕ\epsilon_{\phi} is non-zero, we need a more robust version of this result showing that ∥Q⋆−TϕμQ⋆∥\|Q^{\star}-\mathcal{T}_{\phi}^{\mu}Q^{\star}\| is controlled by ϵϕ\epsilon_{\phi}.

∥Q⋆−TϕμQ⋆∥∞≤2ϵϕ\|Q^{\star}-\mathcal{T}_{\phi}^{\mu}Q^{\star}\|_{\infty}\leq 2\epsilon_{\phi}.

2.3 Concentration Bounds

We need two concentration events: that T^ϕμf0\widehat{\mathcal{T}}_{\phi}^{\mu}f_{0} is close to Tϕμf0\mathcal{T}_{\phi}^{\mu}f_{0}, and that ∥f0−T^ϕμf0∥2,D\|f_{0}-\widehat{\mathcal{T}}_{\phi}^{\mu}f_{0}\|_{2,D} is close to ∥f0−T^ϕμf0∥2,μ\|f_{0}-\widehat{\mathcal{T}}_{\phi}^{\mu}f_{0}\|_{2,\mu}. We will split the failure probability δ\delta 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 ∥T^ϕμf−Tϕμf∥2,μ\|\widehat{\mathcal{T}}_{\phi}^{\mu}f-\mathcal{T}_{\phi}^{\mu}f\|_{2,\mu} 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 T^ϕμf\widehat{\mathcal{T}}_{\phi}^{\mu}f in each group of state-action pairs. Those groups with few data points will have high uncertainty, but they also contribute little to ∥⋅∥2,μ\|\cdot\|_{2,\mu}. Compared to this approach, our proof is much simpler. to reduce the analysis to the realizable case: regressing (s,a)↦r+γVg(s′)(s,a)\mapsto r+\gamma V_{g}(s^{\prime}) over Gϕ\mathcal{G}_{\phi} is equivalent to regressing x↦r+γVg(s′)x\mapsto r+\gamma V_{g}(s^{\prime}) (with x=ϕ(s,a)x=\phi(s,a)) over a “tabular” function class, where the s,a∣xs,a|x 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 ϕ\phi 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 ∣∥f0−g∥2,D−∥f0−g∥2,μ∣|\|f_{0}-g\|_{2,D}-\|f_{0}-g\|_{2,\mu}| for all g∈Gϕg\in\mathcal{G}_{\phi} simultaneously. We need to union bound over g∈Gϕg\in\mathcal{G}_{\phi} because our statistic is ∥f0−g∥2,D\|f_{0}-g\|_{2,D} with g=T^ϕμf0g=\widehat{\mathcal{T}}_{\phi}^{\mu}f_{0}, which is a data-dependent function.

W.p. ≥1−δ/2\geq 1-\delta/2, ∀g∈Gϕ\forall g\in\mathcal{G}_{\phi}, ∣∥f0−g∥2,D−∥f0−g∥2,μ∣≤ϵ1|\|f_{0}-g\|_{2,D}-\|f_{0}-g\|_{2,\mu}|\leq\epsilon_{1}, as long as

It is straightforward to bound ∣∥f0−g∥2,D2−∥f0−g∥2,μ2∣|\|f_{0}-g\|_{2,D}^{2}-\|f_{0}-g\|_{2,\mu}^{2}| (note the squares), but a naïve conversion to a bound on the desired quantity (difference without squares) would result in O(n−1/4)O(n^{-1/4}) rate. To obtain O(n−1/2)O(n^{-1/2}) rate, we consider two situations separately, depending on whether ∥f0−g∥2,μ\|f_{0}-g\|_{2,\mu} is below or above certain threshold: when it is below the threshold, we can use Bernstein’s to exploit the low variance of (f0−g)2(f_{0}-g)^{2}; when it is above the threshold, we obtain the bound by factoring the difference of squares. Combining these two cases with an O(ϵ1)O(\epsilon_{1}) threshold yields a clean O(n−1/2)O(n^{-1/2}) 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 πf,f′\pi_{f,f^{\prime}} as the policy s↦arg max⁡amax⁡{f(s,a),f′(s,a)}s\mapsto\operatorname*{arg\,max}_{a}\max\{f(s,a),f^{\prime}(s,a)\}. Consider any ν\nu such that ∥ν/μ∥∞≤C\|\nu/\mu\|_{\infty}\leq C, we have ∥Q⋆−f0∥2,ν≤\|Q^{\star}-f_{0}\|_{2,\nu}\leq

The first term can be bounded via Lemma 7. The second term is bounded by γ∥Q⋆−f0∥2,Pϕ(ν)×πf^,Q⋆\gamma\|Q^{\star}-f_{0}\|_{2,P_{\phi}(\nu)\times\pi_{\hat{f},Q^{\star}}}, where Pϕ(ν)×πf^,Q⋆P_{\phi}(\nu)\times\pi_{\hat{f},Q^{\star}} is a distribution that also satisfies ∥(⋅)/μ∥∞≤C\|(\cdot)/\mu\|_{\infty}\leq C (Proposition 1) and hence can be handled by recursion. The third can be bounded by C∥f0−Tϕμf0∥2,μ\sqrt{C}\|f_{0}-\mathcal{T}_{\phi}^{\mu}f_{0}\|_{2,\mu} due to ∥ν/μ∥∞≤C\|\nu/\mu\|_{\infty}\leq C, and ∥f0−Tϕμf0∥2,μ\|f_{0}-\mathcal{T}_{\phi}^{\mu}f_{0}\|_{2,\mu} can be related to ∥f0−Tϕμf0∥2,μ\|f_{0}-\mathcal{T}_{\phi}^{\mu}f_{0}\|_{2,\mu} by the concentration bounds established in Section 5.2.3, which are satisfied due to the choice of ∣D∣|D| in the proposition statement.

To prove Eq.(7), we can similarly relate ∥f0−T^ϕμf0∥2,D\|f_{0}-\widehat{\mathcal{T}}_{\phi}^{\mu}f_{0}\|_{2,D} to ∥f0−Tϕμf0∥2,μ\|f_{0}-\mathcal{T}_{\phi}^{\mu}f_{0}\|_{2,\mu} 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 f^\hat{f}, if max⁡f′E(f^;f′)\max_{f^{\prime}}\mathcal{E}(\hat{f};f^{\prime}) is small, then f^≈Q⋆\hat{f}\approx Q^{\star}. (Eq.(6) of Proposition 5)

That max⁡f′E(f^;f′)\max_{f^{\prime}}\mathcal{E}(\hat{f};f^{\prime}) will be small, because max⁡f′E(f⋆;f′)\max_{f^{\prime}}\mathcal{E}(f^{\star};f^{\prime}) is small, where f⋆∈Ff^{\star}\in\mathcal{F} is the best approximation of Q⋆Q^{\star} in Definition 1. (Eq.(7) of Proposition 5)

Before we delve into the proof of Theorem 2, we need yet another lemma, which connects ϵϕ\epsilon_{\phi} in Section 5 to the approximation error of F\mathcal{F}. As Section 4 has suggested, this is feasible because we are only concerned with the comparisons involving f⋆f^{\star}, and ϵϕ\epsilon_{\phi} may be arbitrarily large otherwise.

The ϕ\phi induced from Line 7 satisfies ∣ϕ∣≤(Vmax⁡/ϵdct)2|\phi|\leq(V_{\max}/\epsilon_{\text{dct}})^{2}. When f⋆∈{f,f′}f^{\star}\in\{f,f^{\prime}\}, we further have ϵϕ≤ϵF+ϵdct\epsilon_{\phi}\leq\epsilon_{\mathcal{F}}+\epsilon_{\text{dct}}.

Let ϕ\phi be the partition induced by f^\hat{f} and f⋆f^{\star}. According to Eq.(6), for any ν\nu s.t. ∥ν/μ∥∞≤C\|\nu/\mu\|_{\infty}\leq C,

It then remains to bound max⁡f′E(f^;f′)\max_{f^{\prime}}\mathcal{E}(\hat{f};f^{\prime}). Note that

For any f′f^{\prime}, let ϕ′\phi^{\prime} be the partition of S×A\mathcal{S}\times\mathcal{A} induced by f⋆f^{\star} and f′f^{\prime}. Then

Combining the above results, we have for any ν\nu s.t. ∥ν/μ∥∞≤C\|\nu/\mu\|_{\infty}\leq C,

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 Q⋆Q^{\star} 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 Q1,…,QmQ_{1},\ldots,Q_{m} be the output of different base algorithms. We can simply run BVFT on the holdout dataset with F={Qi}i=1m\mathcal{F}=\{Q_{i}\}_{i=1}^{m}. The only function-approximation assumption we need is that one of QiQ_{i}’s is a good approximation of Q⋆Q^{\star}, 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 ∥f−Q⋆∥\|f-Q^{\star}\| as opposed to relying on (possibly loose) upper bounds based on bisimulation, and our statistical guarantee scales to an exponentially large F\mathcal{F} as opposed to a constant-sized one.

Another common approach to model selection is to estimate J(π)J(\pi) for each candidate π\pi via off-policy evaluation (OPE).As a side note, BVFT can be adapted to OPE when Qπ∈FQ^{\pi}\in\mathcal{F} for target policy π\pi as long as we change the max⁡\max operator in T^ϕμ\widehat{\mathcal{T}}_{\phi}^{\mu} to π\pi, 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 dtπd^{\pi}_{t} be the distribution of (st,at)(s_{t},a_{t}) when we start from s0∼d0s_{0}\sim d_{0} and follow policy π\pi, which we will call an admissible distribution. We assume that there exists C<∞C<\infty such that ∥dtπ/μ∥∞≤C\|d_{t}^{\pi}/\mu\|_{\infty}\leq C for any (possibly nonstationary) policy π\pi and t≥0t\geq 0.

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 μ\mu 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 μ\mu 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 π⋆\pi^{\star} (Fujimoto et al., 2019; Liu et al., 2019, 2020), what is the minimal function-approximation assumption that enables polynomial learning? In particular, requiring that F\mathcal{F} realizes Q⋆Q^{\star} no longer makes sense as we do not even attempt to compete with π⋆\pi^{\star}. Recent works often suggest that we compete with π\pi whose occupancy is covered by μ\mu, 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 μ\mu that satisfies Assumption 1 with a small CC.

CA≤∣A∣C_{\mathcal{A}}\leq|\mathcal{A}| follows from the uniformity of μ(a∣s)\mu(a|s). For CS≤dC_{\mathcal{S}}\leq d, note that P(⋅∣s,a)P(\cdot|s,a) and d0(⋅)d_{0}(\cdot) are convex combinations of rows of P2P_{2}, and μ(s)\mu(s) is designed to be uniform mixture of these rows, so P(s′∣s,a)/μ(s′)P(s^{\prime}|s,a)/\mu(s^{\prime}) is always bounded by the number of rows, which is dd. ∎

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 μ\mu 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 CC.

Comparison to No Inherent Bellman Errors In the above low-rank MDP scenario, the assumption that F\mathcal{F} 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 P1P_{1} 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 F\mathcal{F} to be the linear class induced by the left factorization matrix, which is guaranteed to be closed under T\mathcal{T}, 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 C<∞C<\infty, such that for any f,f′∈Ff,f^{\prime}\in\mathcal{F}, ∥f−f′∥2,dtπ2≤C∥f−f′∥2,μ2\|f-f^{\prime}\|_{2,d_{t}^{\pi}}^{2}\leq C\|f-f^{\prime}\|_{2,\mu}^{2} for any (possibly nonstationary) policy π\pi and t≥0t\geq 0 (see Assumption 2 for the definition of dtπd_{t}^{\pi}).

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 ⇒\Rightarrow Assumption 2 ⇒\Rightarrow 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 F\mathcal{F}-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 F\mathcal{F}—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 ∣F∣=2|\mathcal{F}|=2 or F\mathcal{F} 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 Tϕμ\mathcal{T}_{\phi}^{\mu} follow from Lemma 3, so it suffices to check Q⋆=TϕμQ⋆Q^{\star}=\mathcal{T}_{\phi}^{\mu}Q^{\star}. For any (s,a)(s,a), we will calculate (TϕμQ⋆)(s,a)(\mathcal{T}_{\phi}^{\mu}Q^{\star})(s,a) 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 g⋆=arg min⁡g∈Gϕ∥g−Q⋆∥∞g^{\star}=\operatorname*{arg\,min}_{g\in\mathcal{G}_{\phi}}\|g-Q^{\star}\|_{\infty}, and ∥g⋆−Q⋆∥∞=ϵϕ\|g^{\star}-Q^{\star}\|_{\infty}=\epsilon_{\phi}. For any (s,a)(s,a),

B.5 Proof of Lemma 8

Applying the one-sided Bernstein and union bounding over all h′∈H′h^{\prime}\in\mathcal{H}^{\prime}: w.p. 1−δ1-\delta, ∀h′∈H′\forall h^{\prime}\in H^{\prime},

Now for any h∈Hh\in\mathcal{H}, let h′h^{\prime} be its closest function in H′\mathcal{H}^{\prime}, 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 (s,a,r,s′)(s,a,r,s^{\prime}), let x=ϕ(s,a)x=\phi(s,a) and y=r+γVf(s′)y=r+\gamma V_{f}(s^{\prime}). When we sample (s,a,r,s′)(s,a,r,s^{\prime}) according to the data distribution, we use XX and YY to denote the random variables whose realizations are xx and yy, respectively. Define X\mathcal{X} as the codomain of ϕ\phi, and ∣X∣=∣ϕ∣|\mathcal{X}|=|\phi|. Consider the regression problem x↦yx\mapsto y over function class H=[0,Vmax⁡]X\mathcal{H}=[0,V_{\max}]^{\mathcal{X}}. Let h^\hat{h} and h⋆h^{\star} be the empirical risk minimizer and the Bayes-optimal regressor, respectively, and h⋆∈Hh^{\star}\in\mathcal{H} thanks to the full expressivity of H\mathcal{H}. Also note that N∞(H,ϵ0)≤(Vmax⁡/ϵ0)∣X∣\mathcal{N}_{\infty}(\mathcal{H},\epsilon_{0})\leq(V_{\max}/\epsilon_{0})^{|\mathcal{X}|}. Invoking Lemma 8 we immediately have that w.p. ≥1−δ/2\geq 1-\delta/2,

B.7 Proof of Lemma 10

We apply Bernstein’s inequality with a union bound over Gϕ′\mathcal{G}_{\phi}^{\prime}: w.p. ≥1−δ/2\geq 1-\delta/2, for any g′∈Gϕ′g^{\prime}\in\mathcal{G}_{\phi}^{\prime},

Now, for any g∈Gϕg\in\mathcal{G}_{\phi}, let g′∈Gϕ′g^{\prime}\in\mathcal{G}_{\phi}^{\prime} satisfies ∥g−g′∥∞≤ϵ0′\|g-g^{\prime}\|_{\infty}\leq\epsilon_{0}^{\prime}.

Similarly, for any g∈Gϕg\in\mathcal{G}_{\phi}, let g′∈Gϕ′g^{\prime}\in\mathcal{G}_{\phi}^{\prime} satisfies ∥g−g′∥∞≤ϵ0′\|g-g^{\prime}\|_{\infty}\leq\epsilon_{0}^{\prime}. Then, as long as ∥f0−g∥2,μ≠0\|f_{0}-g\|_{2,\mu}\neq 0,

The last line is obtained by the following argument:

where all the inequalities follow from the triangle inequality and the fact of ∥g−g′∥∞≤ϵ0′\|g-g^{\prime}\|_{\infty}\leq\epsilon_{0}^{\prime}.

We now analyze the two terms above separately.

We now unify those two cases above. We first set ϵ0′=ϵ1/20\epsilon_{0}^{\prime}=\epsilon_{1}/20, and N=N∞(Gϕ,ϵ0′)≤(Vmax⁡/ϵ0′)∣ϕ∣N=\mathcal{N}_{\infty}(\mathcal{G}_{\phi},\epsilon_{0}^{\prime})\leq(V_{\max}/\epsilon_{0}^{\prime})^{|\phi|}.

When ∥f0−g∥2,μ<4ϵ0′\|f_{0}-g\|_{2,\mu}<4\epsilon_{0}^{\prime}, we apply the first case and obtain

for the case of ∥f0−g∥2,μ<4ϵ0′=15ϵ1\|f_{0}-g\|_{2,\mu}<4\epsilon_{0}^{\prime}=\frac{1}{5}\epsilon_{1}.

If ∥f0−g∥2,μ≥4ϵ0′\|f_{0}-g\|_{2,\mu}\geq 4\epsilon_{0}^{\prime}, we use the second case. The term (I) in Eq.(31) is

Since ∣∥f0−g∥2,D−∥f0−g∥2,μ∣≤(I)+(II)\left|\|f_{0}-g\|_{2,D}-\|f_{0}-g\|_{2,\mu}\right|\leq\text{(I)}+\text{(II)}, we reorder the terms and obtain

We still set ϵ0′=ϵ1/20\epsilon_{0}^{\prime}=\epsilon_{1}/20. Thus, solving

provides us with the sufficient sample size ∣D∣|D|,

Choosing the greater one between the required sample sizes for ∥f0−g∥2,μ<4ϵ0′=ϵ1/5\|f_{0}-g\|_{2,\mu}<4\epsilon_{0}^{\prime}=\epsilon_{1}/5 and ∥f0−g∥2,μ≥4ϵ0′=ϵ1/5\|f_{0}-g\|_{2,\mu}\geq 4\epsilon_{0}^{\prime}=\epsilon_{1}/5 completes the proof. ∎

B.8 Proof of Proposition 5

Since ∣D∣|D| 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 1−δ/21-\delta/2, and by union bound they hold simultaneously w.p. ≥1−δ\geq 1-\delta.

Define πf,f′\pi_{f,f^{\prime}} as the policy s↦arg max⁡amax⁡{f(s,a),f′(s,a)}s\mapsto\operatorname*{arg\,max}_{a}\max\{f(s,a),f^{\prime}(s,a)\}. Consider any ν\nu such that ∥ν/μ∥∞≤C\|\nu/\mu\|_{\infty}\leq C,

In Eq.(45), the first term follows from Lemma 7 and that ∥⋅∥2,ν≤∥⋅∥∞\|\cdot\|_{2,\nu}\leq\|\cdot\|_{\infty}, the second from Chen & Jiang (2019, Lemmas 14 and 15), and the third from Chen & Jiang (2019, Lemma 12).

According to Lemma 6, Pϕ(ν)×πf^,Q⋆P_{\phi}(\nu)\times\pi_{\hat{f},Q^{\star}} also satisfies ∥(⋅)/μ∥∞≤C\|(\cdot)/\mu\|_{\infty}\leq C, so it can be viewed as one of those ν\nu’s we started with on the LHS, allowing us to expand the inequality indefinitely. Alternatively, we have

So for any ν\nu such that ∥ν/μ∥∞≤C\|\nu/\mu\|_{\infty}\leq C, ∥Q⋆−f^∥2,ν≤2ϵϕ+C∥f0−Tϕμf0∥2,μ1−γ\|Q^{\star}-\hat{f}\|_{2,\nu}\leq\frac{2\epsilon_{\phi}+\sqrt{C}\|f_{0}-\mathcal{T}_{\phi}^{\mu}f_{0}\|_{2,\mu}}{1-\gamma}.

It then remains to bound ∥f0−Tϕμf0∥2,μ\|f_{0}-\mathcal{T}_{\phi}^{\mu}f_{0}\|_{2,\mu}:

B.9 Proof of Lemma 11

For the first claim, we may write ϕ(s,a)=(fˉ(s,a),f′ˉ(s,a))\phi(s,a)=(\bar{f}(s,a),\bar{f^{\prime}}(s,a)), and the number of equivalent classes induced by ϕ\phi is at most the product of the cardinalities of the codomains of fˉ\bar{f} and f′ˉ\bar{f^{\prime}}, so the result follows.

For the second claim, recall that ϵϕ=ϵGϕ=min⁡g∈Gϕ∥g−Q⋆∥∞\epsilon_{\phi}=\epsilon_{\mathcal{G}_{\phi}}=\min_{g\in\mathcal{G}_{\phi}}\|g-Q^{\star}\|_{\infty}, 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 Q⋆Q^{\star} with a realizable state-action aggregation ϕ\phi—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 s0s_{0}. A state-action aggregation ϕ\phi, which is guaranteed to express Q⋆Q^{\star}, results in a projected Bellman operator Tϕμ\mathcal{T}_{\phi}^{\mu} that has multiple fixed points other than Q⋆Q^{\star} even when sample size goes to infinity, and many such fixed points produce suboptimal policies. Therefore, ∥f−Tϕμf∥2,μ\|f-\mathcal{T}_{\phi}^{\mu}f\|_{2,\mu}, which is the surrogate loss that plays a central role in our algorithm, cannot control the performance of πf\pi_{f} in this setting; see Appendix C.1 for details.

An issue with Figure 1 is that its μ\mu cannot be admitted in the MDP (i.e., generated by some behavior policy from d0d_{0}), and assuming admissible μ\mu (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 μ\mu. Below we explain in more details.

As Section 5.2.1 has alluded to, the error propagates according to the dynamics of MϕM_{\phi} instead of MM 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 ∥ν/μ∥∞≤C\|\nu/\mu\|_{\infty}\leq C for any ν\nu admissible in MϕM_{\phi} but using any other admissible ν′\nu^{\prime} from MM as the initial distribution. This complication, however, does not affect our counterexample. Neither does it affect the next positive result.

There exists C<∞C<\infty, such that for any ϕ\phi, we have ∥ν/μ∥∞≤C\|\nu/\mu\|_{\infty}\leq C for any ν\nu that is admissible in MϕM_{\phi}.

Unfortunately, via a carefully constructed example, we show in Figure 2 that Assumption 4 cannot be implied by Assumption 2 plus admissible μ\mu. In particular, even when Assumption 2 is satisfied with a constant CC and μ\mu is admissible, we can use the aggregation to “leak” probabilities from easy-to-reach states in μ\mu to hard-to-reach states gradually over time steps, causing an exponential blow-up of ∥ν/μ∥∞\|\nu/\mu\|_{\infty}. 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 CC, 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 PP as an ∣S∣×∣S∣|\mathcal{S}|\times|\mathcal{S}| transition matrix. We consider the “on-policy” case, where d0=μd_{0}=\mu is an invariant distribution w.r.t. PP, i.e., μ⊤P=μ⊤\mu^{\top}P=\mu^{\top}. Since an invariant distribution always exists, this does not impose any restriction on PP, so we can make the CC in Assumption 1 very large: for example, when PP is identity, CC must be as large as ∣S∣|\mathcal{S}| to satisfy Assumption 1. On the other hand, Assumption 2 is trivially satisfied with C=1C=1, as μ\mu is the only admissible distribution in MM. Perhaps surprisingly, this is also true for Assumption 4: regardless of ϕ\phi, we have μ⊤Pϕ=μ⊤P=μ\mu^{\top}P_{\phi}=\mu^{\top}P=\mu, because PϕP_{\phi} is defined by averaging the dynamics of PP with weights proportional to μ\mu, and this averaging step can be ignored when the incoming distribution is μ\mu itself.

C.1 Details of Figure 1

We construct an MDP, a data distribution μ\mu, and a realizable function class F\mathcal{F} with ∣F∣=2|\mathcal{F}|=2, 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 γ=0.9\gamma=0.9, and s0s_{0} be the deterministic initial state.

Let μ\mu be uniform over all state-action pairs other than (s4,a)(s_{4},a),The probability assigned to (s3,a)(s_{3},a) is twice as much as that to (s0,a1)(s_{0},a_{1}) by μ\mu, because the former is the abbreviation of two state-action pairs. This detail is of minor importance, and μ\mu can be changed to many other distributions, as long as the later values of QQ are set in a way consistent with μ\mu. which violates Assumption 1.The fact that μ(s,a)>0 ∀s,a\mu(s,a)>0~{}\forall s,a is violated is of minor concern here: we can add exponentially small probabilities to (s4,a)(s_{4},a) in μ\mu, and with a polynomially large DD, the non-uniqueness of the fixed point of T^ϕμ\widehat{\mathcal{T}}_{\phi}^{\mu} still persists. What is really important is that no finite CSC_{\mathcal{S}} satisfies P(s′∣s,a)/μ(s′)≤CSP(s^{\prime}|s,a)/\mu(s^{\prime})\leq C_{\mathcal{S}}. However, since no policy can visit s3s_{3} or s4s_{4} from the starting state s0s_{0}, lacking data in s4s_{4} does not affect the validity of Assumption 2. It remains to specify F\mathcal{F} and show that our algorithm fails.

Our F\mathcal{F} consists of two functions, Q⋆Q^{\star} and QQ. 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 ϕ\phi performs is grouping together (s0,a1)(s_{0},a_{1}) and (s3,a)(s_{3},a); (s0,a2)(s_{0},a_{2}) and every other state-action pair are kept in their own equivalence classes, respectively. (a1,a2a_{1},a_{2} under the same state are by default aggregated except in s0s_{0}.)

Now that the construction is complete, we can verify that our loss ∥f−Tϕμf∥\|f-\mathcal{T}_{\phi}^{\mu}f\| is zero for both f=Q⋆f=Q^{\star} and f=Qf=Q. Therefore, the algorithm may choose to output the greedy policy of either function, but the greedy policy of QQ is suboptimal since it chooses a1a_{1} in s0s_{0}.

This phenomenon is particularly interesting when we notice that, everything will work fine if we remove the data on (s3,a)(s_{3},a): the algorithm will still have high uncertainty in the values of s3s_{3} and s4s_{4}, but such uncertainty does not incorrectly propagate to s0s_{0} 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 μ\mu cannot be generated by a behavior policy starting from d0d_{0}, as such admissible distributions never visit s3s_{3}. Therefore, we can exclude the pathology by assuming that μ\mu is (a mixture) of admissible distributions, on top of Assumption 2.

In addition to Assumption 2, assume that μ\mu is a mixture of dtπd_{t}^{\pi} for a set of (π,t)(\pi,t) pairs, where π\pi may be nonstationary and/or stochastic.

This seemingly mild additional assumption leads to some powerful corollaries. For example, any distribution induced from μ\mu (say, with policy π′\pi^{\prime} in t′t^{\prime} steps) as the initial distribution (instead of d0d_{0}) will still be covered by μ\mu, since the distribution is essentially a mixture of dπ∘π′t+t′d_{\pi\circ\pi^{\prime}}^{t+t^{\prime}}. 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 MϕM_{\phi} should also be well covered by μ\mu (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 MϕM_{\phi} can induce a distribution that visits a state exponentially more likely compared to its likelihood in μ\mu, thus breaking Assumption 4.

See Figure 2. The true MDP MM is essentially a 2-armed contextual bandit, where the initial state (or context) distribution is d0(st)=(1−p)pt−1d_{0}(s_{t})=(1-p)p^{t-1} for tt between 11 and a sufficiently large integer NN (and the rest probability goes to sN+1s_{N+1}; we will not need it). 0<p<10<p<1 is a parameter to be set later. For each sts_{t}, we will call the two actions LL (for “left”) and RR (“right”), respectively. All states other than {st}\{s_{t}\} are absorbing states. During data collection, the learner randomly starts in some sts_{t} according to d0d_{0}, and take actions uniformly at random. This guarantees that C=2C=2 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 μ\mu can be induced in MϕM_{\phi}, and not to directly show the failure of the algorithm.

The dynamics of MϕM_{\phi} (Definition 4) can be equivalently described as the following: given (s,a)(s,a), the next-state s′s^{\prime} is generated in two steps,

In Figure 2, we aggregate st′s_{t}^{\prime} and sts_{t} together for every tt, and the “re-drawing” step happens after the agent lands in st′s_{t}^{\prime}. That is, before the next time step, there is some probability that it will teleport to sts_{t}. 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 sts_{t}, and aggregating this state-action pair with (st−1,R)(s_{t-1},R). 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 μ\mu is exponentially large, using the policy that always takes action “RR”. Let P(st)P(s_{t}) be the probability of visiting sts_{t} at time step t−1t-1 by this policy, and let μ(st)\mu(s_{t}) be the mass of sts_{t} in μ\mu. Our goal is to calculate P(st)/μ(st)P(s_{t})/\mu(s_{t}) and show that it is exponential in tt. First, μ(st)=pt−1(1−p)/2\mu(s_{t})=p^{t-1}(1-p)/2. The division by 22 is because μ\mu contains data from two different time steps ({st}\{s_{t}\} at time step , and {st′}\{s_{t^{\prime}}\} and their sibling states at time step 11). Note that the data is collected in the true MDP MM and the aggregation plays no role here.

Now we calculate P(st)P(s_{t}). The only probability path of visiting sts_{t} at time step t−1t-1 is s1→s2′→s2→s3′→s3→…→st′→sts_{1}\to s_{2}^{\prime}\to s_{2}\to s_{3}^{\prime}\rightarrow s_{3}\to\ldots\to s_{t}^{\prime}\rightarrow s_{t}. Along this path, P(s1)=1−pP(s_{1})=1-p, and st−1→st′s_{t-1}\to s_{t}^{\prime} is deterministic, so we focus on the probability of st′→sts_{t}^{\prime}\to s_{t}.

Recall from the above that whenever at st′s_{t}^{\prime}, we will redraw a state from {st′,st}\{s_{t}^{\prime},s_{t}\} according to their probabilities in μ\mu. Therefore,

where μ(st′)\mu(s_{t}^{\prime}) is calculated based on the fact that the data collection policy is uniformly random. This gives

Therefore, when p<1/2p<1/2, P(st)/μ(st)P(s_{t})/\mu(s_{t}) will be exponential in tt.

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 T^ϕμ\widehat{\mathcal{T}}_{\phi}^{\mu} may be non-unique. This suggests a diagnostic procedure that checks if such pathology occurs: let Gϕ^:={g∈Gϕ:∥g−T^ϕμg∥≤ϵ′}\widehat{\mathcal{G}_{\phi}}:=\{g\in\mathcal{G}_{\phi}:\|g-\widehat{\mathcal{T}}_{\phi}^{\mu}g\|\leq\epsilon^{\prime}\} be the set of approximate fixed points of T^ϕμ\widehat{\mathcal{T}}_{\phi}^{\mu} where ϵ′\epsilon^{\prime} is some small threshold. Then, we may compute max⁡g,g′∈Gϕ^∥g−g′∥2,D\max_{g,g^{\prime}\in\widehat{\mathcal{G}_{\phi}}}\|g-g^{\prime}\|_{2,D} as a statistic for the diagnosis. If Assumption 1 is satisfied, such a maximum distance should be small as all functions in Gϕ^\widehat{\mathcal{G}_{\phi}} should be close to the fixed point of Tϕμ\mathcal{T}_{\phi}^{\mu} under ∥⋅∥2,μ\|\cdot\|_{2,\mu}, In an early stage of the project, our algorithm actually checks whether f∈Gϕ^f\in\widehat{\mathcal{G}_{\phi}} 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 f⋆∈{f,f′}f^{\star}\in\{f,f^{\prime}\} (see e.g., Lemma 3). On the other hand, if the maximum distance within Gϕ^\widehat{\mathcal{G}_{\phi}} is observed to be small when we actually run the algorithm, we can rest assured that ∥f^−Q⋆∥2,μ\|\hat{f}-Q^{\star}\|_{2,\mu} is small (assuming max⁡f′∈FE(f^;f′)\max_{f^{\prime}\in\mathcal{F}}\mathcal{E}(\hat{f};f^{\prime}) is small), and we only need Assumption 2 to further guarantee the near-optimality of πf^\pi_{\hat{f}}, regardless of whether Assumption 1 holds or not.

As an example, consider the counterexample in Figure 1 and Appendix C.1, where both Q⋆Q^{\star} and QQ are fixed points of Tϕμ\mathcal{T}_{\phi}^{\mu} and ∥Q⋆−Q∥2,μ\|Q^{\star}-Q\|_{2,\mu} is large. As Section 7.2 suggests, the pathology goes away if we remove the data from (s3,a)(s_{3},a). Note that Tϕμ\mathcal{T}_{\phi}^{\mu} still has many fixed points (the value of (s4,a)(s_{4},a) can be anything), but their distance from each other under ∥⋅∥2,μ\|\cdot\|_{2,\mu} is always because μ\mu is only supported on s0,s1,s2s_{0},s_{1},s_{2}, and all these fixed points induce an optimal policy from s0s_{0}.

D.2 Tweaking ϕitalic-ϕ\phi

Our main analysis treats the discretization step (Line 7) very casually. However, the structure of ϕ\phi plays an important role in error propagation, and small changes in discretization can produce significantly different ϕ\phi’s, so one may want to search for a favorable ϕ\phi 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 ϕ\phi for a single pair of f,f′f,f^{\prime}, let alone the ∣F∣2|\mathcal{F}|^{2} pairs that all need to be handled. Therefore, this suggestion is more suitable for the model-selection scenario where ∣F∣|\mathcal{F}| is small (Section 7.1). To produce a rich set of possible ϕ\phi’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 ϵdct\epsilon_{\text{dct}} to be slightly greater than intended. Whether it is easy to find a well-behaved ϕ\phi is more of an empirical question, and we leave further investigation to future work.

It is possible to define ϵF\epsilon_{\mathcal{F}} as inf⁡f∈F∥f−Q⋆∥2,μ\inf_{f\in\mathcal{F}}\|f-Q^{\star}\|_{2,\mu}, and still prove a polynomial sample complexity result. However, making this change leads to a suboptimal dependence on CC 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 J(π)J(\pi) for each candidate π\pi 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 Q\mathcal{Q} that realizes QπQ^{\pi} for every π\pi being evaluated, the state-or-the-art approaches only provide an interval that contains J(π)J(\pi) 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 Q\mathcal{Q} 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 Q\mathcal{Q}. In comparison, BVFT only uses function classes of a well-controlled worst-case complexity O(1/ϵ2)O(1/\epsilon^{2}).

Despite the additional assumptions, OPE has its own advantages: OPE directly estimates J(π)J(\pi) instead of going through ∥f−Q⋆∥\|f-Q^{\star}\| as a surrogate, and as a consequence, it removes the assumption that the base algorithms need to approximate Q⋆Q^{\star} and hence enjoys wider applicability. The information about J(π)J(\pi) 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 J(π⋆)−J(π)J(\pi^{\star})-J(\pi)). 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.