Off-policy evaluation (OPE) asks a fundamental question: how well would a new "target" policy perform, given only historical data generated by a different "behavior" policy? This is critical in domains like medicine or autonomous driving, where testing a new, unproven policy in the real world is dangerous or expensive.
The standard tool for this task is Importance Sampling (IS). However, in sequential decision-making, IS suffers from the curse of horizon. As the length of the task ($H$) increases, the variance of the estimator grows exponentially ($O(\gamma^H)$). This happens because IS multiplies importance weights for every step in a trajectory; even slight differences between policies compound into massive, unstable values.
A recent wave of research has shown that we can break this curse by shifting our focus from entire trajectories to individual state-action visitations.
From Trajectories to Marginal Distributions
The core intuition behind breaking the curse of horizon is the Markov property. In a Markov Decision Process (MDP), the future depends only on the current state, not the specific sequence of actions that led there. Standard IS ignores this, effectively "penalizing" the estimator for the variance of the entire path taken to reach a state.
Yao Liu, Emma Brunskill, and Pierre-Luc Bacon demonstrated in Understanding the Curse of Horizon in Off-Policy Evaluation via Conditional Importance Sampling that we can use conditional importance sampling to reweight rewards based on long-term state occupancy. Instead of calculating the probability of a whole path, we estimate the marginalized density ratio: the ratio of how often the target policy visits a state versus how often the behavior policy does.
By focusing on these marginal distributions, Tengyang Xie and Yu-Xiang Wang showed in Towards Optimal Off-Policy Evaluation for Reinforcement Learning with Marginalized Importance Sampling that the mean-squared error can scale polynomially with the horizon rather than exponentially. This transformation turns an impossible estimation problem into a tractable one.
Stationary Density Ratios in Infinite Horizons
The problem becomes even more acute in infinite-horizon settings, where there is no natural "end" to a trajectory. In these cases, we cannot multiply weights indefinitely. Instead, we look for the stationary density ratio—the relative frequency of state-action pairs in the steady-state distribution of the environment.
In Doubly Robust Bias Reduction in Infinite Horizon Off-Policy Estimation, Yihao Feng, Lihong Li, and Qiang Liu developed methods to estimate these ratios directly. By weighting individual state-action pairs by their steady-state frequency, the estimator avoids the compounding errors of sequential importance weights. This approach is further extended by Andrew Bennett and Nathan Kallus in Off-policy Evaluation in Infinite-Horizon Reinforcement Learning with Latent Confounders, which handles scenarios where unobserved variables influence both actions and rewards by using proxies to balance the distributions.
Double Reinforcement Learning and Efficiency
While marginalized ratios reduce variance, they can introduce bias if the density ratio model is misspecified. To solve this, researchers have turned to Double Reinforcement Learning (DRL).
As detailed by Nathan Kallus and Masatoshi Uehara in Double Reinforcement Learning for Efficient and Robust Off-Policy Evaluation, DRL combines two models:
- A marginalized density ratio (how often we visit a state).
- A value function (the expected future reward from that state).
This "doubly robust" structure ensures that the evaluation is accurate if either the density ratio or the value function is correctly estimated. More importantly, it achieves semiparametric efficiency, meaning it uses the available data as effectively as theoretically possible. This framework has been adapted for individualized outcomes in An Orthogonal Learner for Individualized Outcomes in Markov Decision Processes by Emil Javurek and colleagues, ensuring that predictions remain robust even when the underlying "nuisance" models have small errors.
Why It Works: The Intuition of Forgetting
The reason marginalized importance sampling breaks the curse of horizon is that it allows the estimator to "forget" the irrelevant history.
In standard IS, if the behavior policy took a highly unlikely path to reach a common state, the importance weight for that state remains extremely small (or large) forever. In an MDP, however, once you are in a state, the path you took to get there is irrelevant to your future rewards. Marginalized methods, as explored by Nan Jiang and Tengyang Xie in Offline Reinforcement Learning in Large State Spaces: Algorithms and Guarantees, collapse these redundant histories into a single occupancy frequency. This "averaging out" of historical noise is what prevents the variance from exploding as the horizon recedes.