Understanding the Curse of Horizon in Off-Policy Evaluation via Conditional Importance Sampling

Yao Liu, Pierre-Luc Bacon, Emma Brunskill

Off-policy evaluation (OPE) is a cornerstone of real-world Reinforcement Learning (RL). It allows researchers to estimate the performance of a new "target" policy using historical data collected by a different "behavior" policy—a critical capability in high-stakes domains like healthcare or autonomous driving where testing unproven policies is risky.

The standard mathematical tool for OPE is Importance Sampling (IS). However, IS is notoriously plagued by the "Curse of Horizon": as the length of a task ($T$) increases, the variance of the performance estimate grows exponentially. To combat this, the RL community developed more refined estimators like Per-Decision IS (PDIS) and Marginalized IS (MIS), which leverage the structure of Markov Decision Processes (MDPs) to ignore irrelevant data.

While it is widely believed that these advanced methods strictly improve upon vanilla IS, this paper provides a rigorous theoretical foundation that reveals a more nuanced reality: PDIS and MIS are essential for long-horizon problems, but they can actually perform worse than crude IS in short-horizon scenarios.

The Estimators at a Glance

To understand the paper's findings, we must first distinguish the three primary estimators analyzed:

  1. Crude IS: Multiplies importance weights across the entire trajectory.
  2. Per-Decision IS (PDIS): Weights each reward only by the actions that preceded it, ignoring future actions.
  3. Marginalized IS (MIS): Weights rewards based on the ratio of state-action distributions (the probability of being in a state under the target policy versus the behavior policy).

The Counter-Intuitive "Short Horizon" Result

Common wisdom dictates that more "refined" estimators like MIS and PDIS always yield lower variance. The authors prove this assumption false.

By constructing specific, small two-step MDPs, the researchers demonstrate that in short horizons, the covariance between rewards and importance weights can align in such a way that vanilla IS actually achieves the lowest variance.

Three constructed 2-step MDPs demonstrating different variance orderings for IS, PDIS, and MIS.
Table showing the calculated variances for the constructed MDP examples, confirming that IS can sometimes outperform PDIS and MIS.

The authors explain this phenomenon by viewing PDIS and MIS through the lens of Conditional Monte Carlo (CMC). While conditioning reduces the variance of individual terms, it can inadvertently increase the covariance between terms at different time steps. Thus, even with "perfect" oracle knowledge of state-distribution ratios, MIS can be suboptimal in the short term.

Breaking the Curse in Long Horizons

Despite the short-horizon anomalies, the paper formally proves why PDIS and MIS are indispensable for long-term stability. The authors establish the asymptotic behavior of these estimators as the horizon $T$ approaches infinity:

  • The Exponential Curse: For vanilla IS, the variance is mathematically proven to grow exponentially, bounded by $\Omega(\exp(T))$. PDIS can also suffer from exponential variance growth unless the discount factor or rewards decay fast enough to offset the exploding importance weights.
  • The Polynomial Rescue: For MIS, under certain continuity and boundedness assumptions, the variance grows only polynomially at $O(T^2)$.

This establishes an exponential vs. polynomial gap, confirming that MIS is mathematically necessary to break the Curse of Horizon in long-horizon RL tasks. Furthermore, the paper provides the first formal "sufficient conditions" under which PDIS is guaranteed to beat IS, and MIS is guaranteed to beat PDIS.

Limitations and Future Directions

While this theoretical framework provides deep insights, it comes with practical caveats. Much of the analysis for MIS assumes access to the true marginalized density ratios (an "oracle"). In practice, these ratios must be estimated from data, introducing new sources of variance and potential bias. Additionally, the paper focuses strictly on unbiased estimators, leaving the asymptotic analysis of popular biased variants (like Weighted Importance Sampling) for future work.

Ultimately, this research clarifies the mathematical boundaries of off-policy evaluation, guiding practitioners on when to trust advanced IS methods and paving the way for estimators that better leverage specific MDP structures.

Summary updated

BibTeX
@inproceedings{liu2020understanding,
  author = {Yao Liu and Pierre-Luc Bacon and Emma Brunskill},
  title = {{Understanding the Curse of Horizon in Off-Policy Evaluation via Conditional Importance Sampling}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
  url = {https://openreview.net/forum?id=GSgnahdAif7},
}
Figure