Simple Algorithm
Reinforcement Learning · Fixed Point · 28 min

Breaking the Curse of Horizon

Marginalized importance sampling and the DICE family.

Trajectory importance weights multiply one ratio per step, and their variance grows exponentially with the horizon. But in a Markov process the past matters only through the present state. Reweighting each transition by how much more often the target policy visits its state and action, w(s,a)=dπ(s,a)/dD(s,a)w(s,a) = d^\pi(s,a)/d^\data(s,a), needs no products at all. This lesson derives the equations that pin ww down, the DICE estimators that learn it from transitions without knowing the behavior policy, the linear program behind them, and the error bounds, including the lower bounds that say when even this fails.

What you’ll learn

  • Derive the marginalized importance-sampling identity and the flow equations that determine the ratio w=dπ/dDw = d^\pi/d^\data, in discounted and average-reward problems.
  • Compute marginal ratios in a small chain and compare their size with that of trajectory weights.
  • Derive DualDICE's change of variables and its minimax form, and the error bound of minimax weight learning.
  • Derive the Lagrangian of the occupancy linear program for policy evaluation, and show that it is exact when either the weights or the action values are correct.
  • State the error bound of tabular marginalized importance sampling and the lower bounds that limit estimation with function approximation.

From products of ratios to a ratio of distributions

Use the normalized discounted occupancy measure dπ(s,a)=(1−γ)∑t≥0γtPr⁡π(St=s,At=a)d^\pi(s,a) = (1-\gamma)\sum_{t\ge0}\gamma^t\Pr_\pi(S_t = s, A_t = a), started from μ\mu, and the normalized value Jˉ(π)=(1−γ)J(π)=E(s,a)∼dπ[r(s,a)]\bar J(\pi) = (1-\gamma)J(\pi) = \E_{(s,a)\sim d^\pi}[r(s,a)]. Let the logged transitions (s,a,r,s′)(s,a,r,s') have state–action distribution dDd^\data, from one behavior policy or several, with dD(s,a)>0d^\data(s,a) > 0 wherever dπ(s,a)>0d^\pi(s,a) > 0. A change of measure gives the marginalized importance sampling identity

Jˉ(π)=E(s,a,r)∼dD[w(s,a) r],w(s,a)=dπ(s,a)dD(s,a).\bar J(\pi) = \E_{(s,a,r)\sim d^\data}\big[w(s,a)\,r\big],\qquad w(s,a) = \frac{d^\pi(s,a)}{d^\data(s,a)}.

Each transition is reweighted on its own; no product over the trajectory appears. Liu, Li, Tang and Zhou (2018) proposed this to break the curse of horizon, first for average-reward problems, with a ratio of state distributions times the one-step action ratio π(a∣s)/b(a∣s)\pi(a\mid s)/b(a\mid s).

DerivationA chain where trajectory weights explode and marginal ratios do not
  1. db(A)=11.2≈0.833,db(B)≈0.167;dπ(A)=23,dπ(B)=13d^b(A) = \tfrac{1}{1.2}\approx0.833,\quad d^b(B)\approx0.167;\qquad d^\pi(A) = \tfrac23,\quad d^\pi(B) = \tfrac13

    Two states. In AA, stay keeps you in AA and go moves you to BB; from BB you always return to AA. The reward is 1 in BB and 0 in AA, averaged over a long run. The behavior goes with probability 0.2, the target with probability 0.5. A chain that leaves AA with probability pp spends a fraction 1/(1+p)1/(1+p) of its time in AA:

  2. w(A,go)=23⋅0.556⋅0.2=2,w(A,stay)=23⋅0.556⋅0.8=0.5,w(B)=2,Edb[w r]=16⋅2=13=dπ(B)w(A,\text{go}) = \frac{\tfrac23\cdot0.5}{\tfrac56\cdot0.2} = 2,\qquad w(A,\text{stay}) = \frac{\tfrac23\cdot0.5}{\tfrac56\cdot0.8} = 0.5,\qquad w(B) = 2,\qquad \E_{d^b}[w\,r] = \tfrac16\cdot2 = \tfrac13 = d^\pi(B)

    The marginal ratios are modest numbers, and reweighting the behavior's transitions by them recovers the target's average reward:

  3. Eb[WT2]≈13.7,3.1×105,8.8×1010for T=10, 50, 100\E_b\big[W_T^2\big]\approx13.7,\quad 3.1\times10^{5},\quad 8.8\times10^{10}\qquad\text{for } T = 10,\ 50,\ 100

    The trajectory weight WTW_T multiplies π/b\pi/b at every visit to AA: 2.5 after go, 0.625 after stay. Its second moment obeys a linear recursion over the current state, with matrix entries ∑aπ(a∣s)2/b(a∣s)\sum_a\pi(a\mid s)^2/b(a\mid s) for each move s→s′s\to s': from AA, 0.3125 back to AA and 1.25 to BB; from BB, 1 to AA. The largest eigenvalue is about 1.285, so starting from AA:

Predict before you look

In the same chain, the target now goes with probability 0.8 (the behavior still 0.2). What is the state ratio w(B)=dπ(B)/db(B)w(B) = d^\pi(B)/d^b(B)?

Show the answer

2.67

dπ(B)=0.8/1.8≈0.444d^\pi(B) = 0.8/1.8\approx0.444 and db(B)=0.2/1.2≈0.167d^b(B) = 0.2/1.2\approx0.167, so w(B)≈2.67w(B)\approx2.67, still a modest number. The trajectory weight now multiplies 4 after every go and 0.25 after every stay; its second moment grows like 1.81T1.81^T instead of 1.285T1.285^T.

The variance of a reweighted estimate is governed by EdD[w2]=1+χ2(dπ ∥ dD)\E_{d^\data}[w^2] = 1 + \chi^2(d^\pi\,\|\,d^\data), a divergence between occupancies; the trajectory weight's second moment is 1+χ21 + \chi^2 between trajectory distributions, which compounds step by step. If dDd^\data is the behavior's own discounted occupancy, the occupancy is the image of the trajectory distribution under "pick a geometric random time and report (St,At)(S_t, A_t)", a map applied identically to both policies, so by the data-processing inequality the first divergence can never exceed the second.

The catch is that ww is unknown: it depends on the dynamics through dπd^\pi. The rest of the lesson is about estimating it from the logged transitions alone.

Pinning the ratio down: the flow equations

The occupancy measure satisfies a flow equation, the dual side of the Bellman equation (Occupancy Measures & the Dual View). Testing it against an arbitrary function f(s,a)f(s,a) gives an identity that, after a change of measure, involves only the data.

DerivationFrom the flow equation to a test on the data
  1. E(s,a)∼dπ, s′∼P(⋅∣s,a)[f(s,a)−γf(s′,π)]=(1−γ) Es0∼μ[f(s0,π)]\E_{(s,a)\sim d^\pi,\ s'\sim P(\cdot\mid s,a)}\big[f(s,a) - \gamma f(s',\pi)\big] = (1-\gamma)\,\E_{s_0\sim\mu}\big[f(s_0,\pi)\big]

    Telescope ∑tγtEπ[f(St,At)]−∑tγt+1Eπ[f(St+1,At+1)]=Eπ[f(S0,A0)]\sum_t\gamma^t\E_\pi[f(S_t,A_t)] - \sum_t\gamma^{t+1}\E_\pi[f(S_{t+1},A_{t+1})] = \E_\pi[f(S_0,A_0)] and multiply by 1−γ1-\gamma. For every ff, with f(s′,π)=∑a′π(a′∣s′)f(s′,a′)f(s',\pi) = \sum_{a'}\pi(a'\mid s')f(s',a'):

  2. L(w,f):=E(s,a,s′)∼D[w(s,a)(γf(s′,π)−f(s,a))]+(1−γ) Es0∼μ[f(s0,π)]=0L(w, f) := \E_{(s,a,s')\sim\data}\Big[w(s,a)\big(\gamma f(s',\pi) - f(s,a)\big)\Big] + (1-\gamma)\,\E_{s_0\sim\mu}\big[f(s_0,\pi)\big] = 0

    Change measure to the data. The true ratio w⋆=dπ/dDw^\star = d^\pi/d^\data makes the following vanish for every test function ff:

  3. L(w,f)=0  ∀f⟺w=w⋆  on supp⁡dDL(w,f) = 0\ \ \forall f\quad\Longleftrightarrow\quad w = w^\star\ \text{ on } \supp d^\data

    Conversely, if L(w,f)=0L(w,f) = 0 for all ff, the measure ν=w dD\nu = w\,d^\data solves ν⊤(I−γPπ)=(1−γ)(μ⊗π)⊤\nu^\top(I - \gamma P^\pi) = (1-\gamma)(\mu\otimes\pi)^\top, where PπP^\pi is here the state–action transition matrix under π\pi. Since I−γPπI - \gamma P^\pi is invertible, ν=dπ\nu = d^\pi: the test identifies w⋆w^\star wherever dD>0d^\data > 0. In the average-reward case (γ=1\gamma = 1) the initial term disappears and the solution is fixed only up to scale, so estimators add the normalization EdD[w]=1\E_{d^\data}[w] = 1.

Liu et al. (2018) turned this into an estimator: restrict ff to the unit ball of a reproducing kernel Hilbert space, where max⁡fL(w,f)2\max_fL(w,f)^2 has a closed form, a kernel-weighted quadratic in the residuals of the flow equation that resembles a maximum mean discrepancy, and minimize it over ww. Their state-ratio version needs the behavior's action probabilities for the one-step ratio. The next estimators do not.

Learning the ratio: DualDICE and minimax weights

DICE estimators (stationary distribution correction estimation) learn the ratio from transitions alone, without the behavior's probabilities, so the data may come from several unknown policies or from people. DualDICE (Nachum, Chow, Dai & Li, 2019) found a change of variables that turns the flow equations into a convex minimization.

DerivationDualDICE
  1. J(ν)=12 E(s,a)∼dD[(ν−Bπν)(s,a)2]−(1−γ) Es0∼μ, a0∼π[ν(s0,a0)]J(\nu) = \tfrac12\,\E_{(s,a)\sim d^\data}\Big[\big(\nu - \mathcal B^\pi\nu\big)(s,a)^2\Big] - (1-\gamma)\,\E_{s_0\sim\mu,\,a_0\sim\pi}\big[\nu(s_0,a_0)\big]

    Let (Bπν)(s,a)=γ Es′∼P(⋅∣s,a), a′∼π(⋅∣s′) ν(s′,a′)(\mathcal B^\pi\nu)(s,a) = \gamma\,\E_{s'\sim P(\cdot\mid s,a),\,a'\sim\pi(\cdot\mid s')}\,\nu(s',a'), a Bellman operator with zero reward, and minimize over functions ν\nu:

  2. J(ν)=E(s,a)∼dD[12 x(s,a)2−w⋆(s,a) x(s,a)]J(\nu) = \E_{(s,a)\sim d^\data}\Big[\tfrac12\,x(s,a)^2 - w^\star(s,a)\,x(s,a)\Big]

    Write x=ν−Bπνx = \nu - \mathcal B^\pi\nu. By the telescoping identity of the previous step (with f=νf = \nu), the second term is Edπ[x]=EdD[w⋆x]\E_{d^\pi}[x] = \E_{d^\data}[w^\star x], so the objective is a pointwise quadratic:

  3. (ν⋆−Bπν⋆)(s,a)=dπ(s,a)dD(s,a)\big(\nu^\star - \mathcal B^\pi\nu^\star\big)(s,a) = \frac{d^\pi(s,a)}{d^\data(s,a)}

    It is minimized at x=w⋆x = w^\star, and every xx is reachable because ν↦ν−Bπν\nu\mapsto\nu - \mathcal B^\pi\nu is invertible. The optimum's Bellman residual is the ratio:

  4. min⁡ν max⁡ζ  E(s,a,s′)∼D, a′∼π(⋅∣s′)[(ν(s,a)−γ ν(s′,a′))ζ(s,a)−12 ζ(s,a)2]−(1−γ) Es0∼μ, a0∼π[ν(s0,a0)]\min_\nu\ \max_\zeta\ \ \E_{(s,a,s')\sim\data,\ a'\sim\pi(\cdot\mid s')}\Big[\big(\nu(s,a) - \gamma\,\nu(s',a')\big)\zeta(s,a) - \tfrac12\,\zeta(s,a)^2\Big] - (1-\gamma)\,\E_{s_0\sim\mu,\,a_0\sim\pi}\big[\nu(s_0,a_0)\big]

    The square of a conditional expectation cannot be estimated without bias from one sampled next state (the double-sampling problem). DualDICE therefore uses the Fenchel dual 12x2=max⁡ζ(xζ−12ζ2)\tfrac12x^2 = \max_\zeta\big(x\zeta - \tfrac12\zeta^2\big) and solves a saddle-point problem whose inner maximizer is the ratio itself, ζ⋆=w⋆\zeta^\star = w^\star:

Nachum et al. also replace 12x2\tfrac12x^2 by other convex functions such as 1p∣x∣p\tfrac1p\abs x^p; p=1.5p = 1.5 worked best in their experiments. GenDICE (Zhang, Dai, Li & Schuurmans, 2020) covers the average-reward case, where DualDICE's initial-state term vanishes, by minimizing a variational divergence between the reweighted data distribution and its image under one step of the target's dynamics, with a penalty enforcing EdD[w]=1\E_{d^\data}[w] = 1. GradientDICE (Zhang, Liu & Whiteson, 2020) observed that GenDICE's saddle-point problem stops being convex–concave once a nonlinearity is used to keep ww positive, and replaced the divergence with an objective that is convex–concave with linear function approximation and provably convergent.

Proof. Take f=Qπf = Q^\pi. The Bellman equation gives E[γQπ(s′,π)−Qπ(s,a) ∣ s,a]=−r(s,a)\E\big[\gamma Q^\pi(s',\pi) - Q^\pi(s,a)\,\big|\,s,a\big] = -r(s,a), so L(w,Qπ)=(1−γ)Eμ[Vπ(s0)]−EdD[w r]=Jˉ(π)−EdD[w r]L(w, Q^\pi) = (1-\gamma)\E_\mu[V^\pi(s_0)] - \E_{d^\data}[w\,r] = \bar J(\pi) - \E_{d^\data}[w\,r]. Since LL is linear in ff, its maximum over F\mathcal F bounds its value at any point of the convex hull. ■\blacksquare

The discriminator class only needs to contain the right value function, and the weights only need to satisfy the flow equations against that class, a weak, test-function notion of accuracy. Swapping the roles gives minimax Q-learning (MQL): fit qq with weights as discriminators, min⁡qmax⁡g∈G(ED[g(s,a)(r+γq(s′,π)−q(s,a))])2\min_q\max_{g\in\mathcal G}\big(\E_\data\big[g(s,a)\big(r + \gamma q(s',\pi) - q(s,a)\big)\big]\big)^2, which is accurate when the true ratio lies in the convex hull of G\mathcal G.

The Lagrangian behind DICE

For a fixed π\pi the occupancy measure is the unique solution of the flow constraints, so the linear program "maximize ∑s,ad(s,a)r(s,a)\sum_{s,a}d(s,a)r(s,a) subject to the flow constraints" has value Jˉ(π)\bar J(\pi). Give each constraint a Lagrange multiplier Q(s,a)Q(s,a) and write d=w dDd = w\,d^\data.

DerivationThe evaluation Lagrangian and its double robustness
  1. L(w,Q)=(1−γ) Es0∼μ[Q(s0,π)]+E(s,a,r,s′)∼D[w(s,a)(r+γ Q(s′,π)−Q(s,a))]\mathcal L(w, Q) = (1-\gamma)\,\E_{s_0\sim\mu}\big[Q(s_0,\pi)\big] + \E_{(s,a,r,s')\sim\data}\Big[w(s,a)\big(r + \gamma\,Q(s',\pi) - Q(s,a)\big)\Big]

    Collecting the terms of each variable, the Lagrangian in (w,Q)(w, Q) is

  2. L(w,Qπ)=(1−γ) Es0∼μ[Vπ(s0)]=Jˉ(π)for every w\mathcal L(w, Q^\pi) = (1-\gamma)\,\E_{s_0\sim\mu}\big[V^\pi(s_0)\big] = \bar J(\pi)\qquad\text{for every } w

    Correct QQ, any ww. If Q=QπQ = Q^\pi, the Bellman residual r+γQπ(s′,π)−Qπ(s,a)r + \gamma Q^\pi(s',\pi) - Q^\pi(s,a) has conditional mean zero given (s,a)(s,a), so the second term vanishes:

  3. L(w⋆,Q)=(1−γ) Eμ[Q(s0,π)]+Edπ[r]−(1−γ) Eμ[Q(s0,π)]=Jˉ(π)for every Q\mathcal L(w^\star, Q) = (1-\gamma)\,\E_\mu\big[Q(s_0,\pi)\big] + \E_{d^\pi}[r] - (1-\gamma)\,\E_\mu\big[Q(s_0,\pi)\big] = \bar J(\pi)\qquad\text{for every } Q

    Correct ww, any QQ. If w=w⋆w = w^\star, the second term is an expectation under dπd^\pi, and the telescoping identity cancels every QQ term against the first:

  4. L(w,Q)−Jˉ(π)=E(s,a,s′)∼D[(w−w⋆)(s,a) (γ g(s′,π)−g(s,a))]\mathcal L(w, Q) - \bar J(\pi) = \E_{(s,a,s')\sim\data}\Big[\big(w - w^\star\big)(s,a)\,\big(\gamma\,g(s',\pi) - g(s,a)\big)\Big]

    Combining the two facts, the error of any pair is a product of the two errors, with g=Q−Qπg = Q - Q^\pi (a version of this identity appears in Uehara et al., 2020):

This is double robustness in marginal form: the estimate is exact if either argument is, and its error is second order when both are close, which is what lets Kallus and Uehara's estimator reach the efficiency bound (Importance Sampling & Doubly Robust Estimators). Setting Q=0Q = 0 recovers the weighting estimate ED[w r]\E_\data[w\,r]; setting w=0w = 0 recovers the direct estimate (1−γ)Eμ[Q(s0,π)](1-\gamma)\E_\mu[Q(s_0,\pi)]; and minimax weight learning's test function is L(w,f)=L(w,f)−ED[w r]L(w,f) = \mathcal L(w,f) - \E_\data[w\,r]. Yang, Nachum, Dai, Li and Schuurmans (2020) showed that the DICE estimators are regularized versions of this Lagrangian. Because L\mathcal L is bilinear, its saddle points are fragile to optimize; convex regularizers on ww or on QQ make the problem better conditioned, at the price of bias unless chosen carefully, and DualDICE and GenDICE correspond to particular choices.

Error bounds, and their limits

Tabular, finite horizon. Xie, Ma and Wang (2019) estimate the target's state distribution at each step recursively from the empirical transition model, d^t+1π(s′)=∑s,aP^t(s′∣s,a) π(a∣s) d^tπ(s)\hat d^\pi_{t+1}(s') = \sum_{s,a}\hat P_t(s'\mid s,a)\,\pi(a\mid s)\,\hat d^\pi_t(s), and reweight. For nn episodes of a non-stationary episodic MDP, in their indexing (rtr_t is the reward at step tt), the mean squared error is

1n∑t=1HEb[dtπ(st)2dtb(st)2 Var⁡b[π(at∣st)b(at∣st)(Vt+1π(st+1)+rt) ∣ st]]+O~(n−3/2),\frac1n\sum_{t=1}^H\E_b\bigg[\frac{d^\pi_t(s_t)^2}{d^b_t(s_t)^2}\,\Var_b\Big[\frac{\pi(a_t\mid s_t)}{b(a_t\mid s_t)}\big(V^\pi_{t+1}(s_{t+1}) + r_t\big)\,\Big|\,s_t\Big]\bigg] + \tilde O\big(n^{-3/2}\big),

within a factor HH of the Cramér–Rao bound for Markov problems (Jiang & Li, 2016). It was the first off-policy evaluation error bound with only polynomial dependence on the horizon, and Yin and Wang (2020) later showed that a simple modification of the tabular estimator attains the Cramér–Rao bound asymptotically when the action space is finite.

Function approximation. Minimax weight learning's bound says what is needed: a discriminator class that contains QπQ^\pi and a weight class that can nearly satisfy the flow equations against it. Two cautions remain.

  • The ratio itself can be large. ∥w⋆∥∞\norm{w^\star}_\infty is the single-policy concentrability of Pessimism: The Theory of Offline RL, and the variance of a reweighted estimate scales with EdD[w⋆2]=1+χ2(dπ ∥ dD)\E_{d^\data}[w^{\star2}] = 1 + \chi^2(d^\pi\,\|\,d^\data). Marginalizing stops the mismatch from compounding; it does not remove it.
  • Realizability is not enough. Wang, Foster and Kakade (2021) constructed problems in which every policy's value is linear in known features and the data cover all feature directions well, yet any estimator needs a number of samples exponential in the horizon. Their bound covers marginalized estimators too: realizing QπQ^\pi in the discriminator class does not help when no tractable weight class can approximate the true ratio.

Key takeaways

  • Marginalized importance sampling reweights each transition by w=dπ/dDw = d^\pi/d^\data. No products appear, and in a Markov chain these ratios can stay bounded while the trajectory weight's second moment grows exponentially (1.285T1.285^T in the two-state example).
  • The flow equations, tested against all functions, identify ww from transitions alone; in the average-reward case they fix it only up to scale. DualDICE turns them into a convex problem whose optimal Bellman residual is ww, and minimax weight learning is accurate whenever its discriminator class contains QπQ^\pi.
  • The evaluation Lagrangian L(w,Q)=(1−γ)Eμ[Q(s0,π)]+ED[w(r+γQ(s′,π)−Q(s,a))]\mathcal L(w,Q) = (1-\gamma)\E_\mu[Q(s_0,\pi)] + \E_\data[w(r + \gamma Q(s',\pi) - Q(s,a))] is exact if either argument is exact, with an error that is a product of the two errors; the DICE estimators are its regularized versions.
  • Tabular marginalized importance sampling has error polynomial in HH, within a factor HH of the Cramér–Rao bound. With function approximation the ratio can still be large, EdD[w2]=1+χ2(dπ ∥ dD)\E_{d^\data}[w^2] = 1 + \chi^2(d^\pi\,\|\,d^\data), and realizability alone cannot avoid exponential lower bounds.

Check yourself

In the interactive lesson these are scored with your confidence, and what you miss comes back for review.

Question 1

Why can marginalized importance sampling avoid the exponential growth of trajectory-wise importance weights?

  1. It ignores the mismatch between the policies
  2. It assumes deterministic dynamics
  3. In a Markov process each transition can be reweighted by a ratio of state–action distributions, which involves no product over the trajectory
  4. It uses only the first step of each episode
Show the answer

C. In a Markov process each transition can be reweighted by a ratio of state–action distributions, which involves no product over the trajectory

The past affects the future only through the current state, so what matters is how much more often the target visits (s,a)(s,a), not the probability of the whole action sequence. The ratio w=dπ/dDw = d^\pi/d^\data can stay bounded (2 in the two-state chain) while the trajectory weight's second moment grows like 1.285T1.285^T.

Question 2

DualDICE minimizes 12EdD[(ν−Bπν)2]−(1−γ)Es0∼μ,a0∼π[ν(s0,a0)]\tfrac12\E_{d^\data}\big[(\nu - \mathcal B^\pi\nu)^2\big] - (1-\gamma)\E_{s_0\sim\mu,a_0\sim\pi}[\nu(s_0,a_0)], where Bπ\mathcal B^\pi is the Bellman operator with zero reward. What is the Bellman residual ν⋆−Bπν⋆\nu^\star - \mathcal B^\pi\nu^\star of the minimizer?

  1. The ratio dπ/dDd^\pi/d^\data
  2. The action-value function QπQ^\pi
  3. Zero
  4. The behavior policy's action probabilities
Show the answer

A. The ratio dπ/dDd^\pi/d^\data

With x=ν−Bπνx = \nu - \mathcal B^\pi\nu, the telescoping identity turns the objective into EdD[12x2−w⋆x]\E_{d^\data}\big[\tfrac12x^2 - w^\star x\big], minimized pointwise at x=w⋆x = w^\star. The residual of the optimal ν\nu is the correction ratio.

Question 3

In the evaluation Lagrangian L(w,Q)=(1−γ)Eμ[Q(s0,π)]+ED[w(s,a)(r+γQ(s′,π)−Q(s,a))]\mathcal L(w,Q) = (1-\gamma)\E_\mu[Q(s_0,\pi)] + \E_\data\big[w(s,a)\big(r + \gamma Q(s',\pi) - Q(s,a)\big)\big], when does L(w,Q)\mathcal L(w,Q) equal Jˉ(π)\bar J(\pi) exactly?

  1. Only when both ww and QQ are exact
  2. Only when ww is exact
  3. Only when QQ is exact
  4. When either ww or QQ is exact
Show the answer

D. When either ww or QQ is exact

With Q=QπQ = Q^\pi the Bellman residual has conditional mean zero, so any ww gives (1−γ)Eμ[Vπ(s0)](1-\gamma)\E_\mu[V^\pi(s_0)]. With w=w⋆w = w^\star the telescoping identity cancels every QQ term. The general error is a product of the two errors: double robustness in marginal form.

Question 4

Minimax weight learning's error bound min⁡w∈Wmax⁡f∈F∣L(w,f)∣\min_{w\in\mathcal W}\max_{f\in\mathcal F}\abs{L(w,f)} requires which assumption?

  1. The weight class contains the true ratio
  2. The discriminator class contains, in its convex hull, the true action-value function QπQ^\pi
  3. The behavior policy is known
  4. The dynamics are deterministic
Show the answer

B. The discriminator class contains, in its convex hull, the true action-value function QπQ^\pi

L(w,Qπ)=Jˉ(π)−EdD[w r]L(w, Q^\pi) = \bar J(\pi) - \E_{d^\data}[w\,r] exactly, and LL is linear in ff, so if QπQ^\pi is in the convex hull of F\mathcal F the worst case over F\mathcal F bounds the error. The weight class only needs some member that nearly satisfies the flow equations against F\mathcal F.

Further reading

  • Q. Liu, L. Li, Z. Tang & D. Zhou, "Breaking the curse of horizon: Infinite-horizon off-policy estimation," Advances in Neural Information Processing Systems 31 (2018).
  • T. Xie, Y. Ma & Y.-X. Wang, "Towards optimal off-policy evaluation for reinforcement learning with marginalized importance sampling," Advances in Neural Information Processing Systems 32 (2019).
  • O. Nachum, Y. Chow, B. Dai & L. Li, "DualDICE: Behavior-agnostic estimation of discounted stationary distribution corrections," Advances in Neural Information Processing Systems 32 (2019).
  • M. Uehara, J. Huang & N. Jiang, "Minimax weight and Q-function learning for off-policy evaluation," Proceedings of the 37th International Conference on Machine Learning (ICML) (2020).
  • M. Yang, O. Nachum, B. Dai, L. Li & D. Schuurmans, "Off-policy evaluation via the regularized Lagrangian," Advances in Neural Information Processing Systems 33 (2020).