Seedlabs
Source research

Towards Optimal Off-Policy Evaluation for Reinforcement Learning with Marginalized Importance Sampling

Tengyang Xie, Yifei Ma, Yu-Xiang Wang · 2019 · 127 citationsRead the paper

Motivated by the many real-world applications of reinforcement learning (RL) that require safe-policy iterations, we consider the problem of off-policy evaluation (OPE) -- the problem of evaluating a new policy using the historical data obtained by different behavior policies -- under the model of nonstationary episodic Markov Decision Processes (MDP) with a long horizon and a large action space. Existing importance sampling (IS) methods often suffer from large variance that depends exponentially on the RL horizon $H$. To solve this problem, we consider a marginalized importance sampling (MIS) estimator that recursively estimates the state marginal distribution for the target policy at every step. MIS achieves a mean-squared error of $$ \frac{1}{n} \sum\nolimits_{t=1}^H\mathbb{E}_μ\left[\frac{d_t^π(s_t)^2}{d_t^μ(s_t)^2} \mathrm{Var}_μ\left[\frac{π_t(a_t|s_t)}{μ_t(a_t|s_t)}\big( V_{t+1}^π(s_{t+1}) + r_t\big) \middle| s_t\right]\right] + \tilde{O}(n^{-1.5}) $$ where $μ$ and $π$ are the logging and target policies, $d_t^μ(s_t)$ and $d_t^π(s_t)$ are the marginal distribution of the state at $t$th step, $H$ is the horizon, $n$ is the sample size and $V_{t+1}^π$ is the value function of the MDP under $π$. The result matches the Cramer-Rao lower bound in \citet{jiang2016doubly} up to a multiplicative factor of $H$. To the best of our knowledge, this is the first OPE estimation error bound with a polynomial dependence on $H$. Besides theory, we show empirical superiority of our method in time-varying, partially observable, and long-horizon RL environments.

What the full text shows

Shown in the lab
  • MIS achieves a mean-squared error with polynomial dependence on the horizon H, matching the Cramer-Rao lower bound up to a multiplicative factor of H. — MSE = 1/n sum_{t=1}^H E_μ [ (d_t^π(s_t)^2 / d_t^μ(s_t)^2) Var_μ [ (π_t(a_t|s_t) / μ_t(a_t|s_t))(V_{t+1}^π(s_{t+1}) + r_t) | s_t ] ] + O(n^{-1.5}) (Nonstationary episodic MDPs with sample size n > max { 4tτaτs min{dπ, dμ}, 16 log n min{dμ} })
  • MIS matches the performance of the Direct Method (DM) in fully observable environments. (ModelWin domain)
  • MIS outperforms Importance Sampling (IS) and Weighted Importance Sampling (WIS) in partially observable environments. (ModelFail domain)
Setup
Experiments conducted on ModelWin (fully observable) and ModelFail (partially observable) MDPs with 128 runs, using a fixed horizon H=50 for episode-count tests and n=1024 for horizon tests.
How
The authors propose a Marginalized Importance Sampling (MIS) estimator that recursively estimates the state marginal distribution for the target policy at each step to avoid the exponential variance growth associated with cumulative importance weights. They provide a finite sample error bound for the MSE and evaluate the method against DM, IS, WIS, and SSD-IS.
Limitations
Requires observable states or partial trajectories between them to estimate marginal distributions. · The error bound is larger than the Cramer-Rao lower bound by a factor of H in infinite action settings.

Summarized by Gemma 4 from the open-access full text · 17 Nov 2026. Read it