Evaluating a reinforcement learning (RL) policy is notoriously expensive. Whether you are tuning hyperparameters or testing a new architectural tweak, the "gold standard" is usually a Monte Carlo (MC) estimator: you run the policy in a simulator (or the real world) thousands of times and average the results. While reliable and unbiased, this process is a massive data hog.
In their ICML 2024 paper, "Efficient Policy Evaluation with Offline Data Informed Behavior Policy Design," Shuze Liu and Shangtong Zhang propose a clever way to break this bottleneck. By using previously collected "offline" data to design a smarter way to sample actions, they can significantly reduce the variance of these estimators without losing the holy grail of RL evaluation: unbiasedness.
TL;DR
The authors introduce a method to speed up online policy evaluation by using existing offline data to craft a "behavior policy" that minimizes estimator variance. Their approach, the Offline Data Informed (ODI) algorithm, maintains the unbiased nature of Monte Carlo estimation while requiring up to 65% fewer environment interactions to reach the same level of accuracy.
What Problem Does This Paper Address?
In RL, we often need to know the "value" (expected total reward) of a target policy $\pi$. The standard approach is on-policy evaluation: just run $\pi$ and see what happens. However, because environments are stochastic, you need many trials to get a stable average.
There are "offline" evaluation methods that don't require new interactions at all, but they often suffer from high bias or require strict assumptions that don't hold in complex environments. Consequently, most practitioners still default to expensive online MC runs.
The authors ask: Can we use the "dead" offline data we already have to make our "live" online evaluation more efficient?
Methods
The core idea is to use Importance Sampling. Instead of running the target policy $\pi$ directly, we run a different behavior policy $\mu$ and re-weight the results. If $\mu$ is chosen correctly, it can drastically reduce the variance of the estimate.
The authors make three primary technical contributions:
- Optimal Closed-Form Behavior Policy: They derive a specific behavior policy $\hat{\mu}$ that is mathematically proven to minimize the variance of the Per-Decision Importance Sampling (PDIS) estimator. Interestingly, this policy is proportional to the target policy multiplied by the square root of a modified value function: $\hat{\mu}(a|s) \propto \pi(a|s)\sqrt{\hat{q}(s,a)}$.
- The ODI Algorithm: Since we don't know the true environment dynamics, we can't calculate $\hat{\mu}$ perfectly. The authors propose the Offline Data Informed (ODI) algorithm, which uses offline data and Fitted Q-Evaluation (FQE) to learn an approximation of this optimal behavior policy.
- Relaxed Coverage Requirements: Standard importance sampling requires the behavior policy to "cover" (have non-zero probability for) every action the target policy might take. The authors prove that their specific design remains unbiased even if this coverage is incomplete, provided the actions it misses have zero contribution to the value.
Datasets
The researchers evaluated their method across two main domains:
- Gridworld: Tested on state spaces of 1,000 and 27,000 states to demonstrate how the method scales with complexity.
- MuJoCo: A standard physics engine for robotics. They used five environments: Ant, Hopper, Inverted Pendulum, Inverted Double Pendulum, and Walker2d. To adapt these to their discrete-action framework, they discretized the action spaces.
Key Insights and Ideas
- Variance vs. Bias: Most "efficient" evaluation methods trade off some bias for lower variance. This paper is a "free lunch" in that regard—it reduces variance while theoretically maintaining zero bias.
- Robustness to Error: A major "aha moment" in the paper is the theoretical proof that even if your offline data is messy and your learned behavior policy is slightly "off," the estimator remains unbiased. The error only affects how much variance is reduced, not the correctness of the final value.
- One-Step Optimality: Rather than trying to solve for a globally optimal behavior policy (which is computationally hard), they focus on "one-step" optimality, which is much easier to compute using standard offline RL tools like FQE.
Key Results
The empirical results show a massive leap in efficiency over standard on-policy Monte Carlo and existing baselines (like BPS and ROS):
- Interaction Savings: In the 27,000-state Gridworld, the ODI algorithm saved over 40% of online interactions.
- MuJoCo Performance: In robotics tasks, the gains were even more dramatic. To reach the same accuracy as 100 episodes of standard MC, ODI needed as few as 35 episodes (in Inverted Double Pendulum), representing a 65% reduction in required data.
- Scaling: As more offline data was provided, the performance of the ODI algorithm improved consistently, showing it can effectively "soak up" available information to sharpen its online estimates.
Limitations and Future Work
While powerful, the paper notes a few areas for growth:
- Discrete Actions: The current formulation is designed for discrete action spaces. While they discretized MuJoCo for testing, a native continuous-action version would be more elegant for robotics.
- Temporal Difference (TD) Learning: The current work focuses on Monte Carlo estimators. The authors suggest that extending these variance-reduction techniques to TD learning (like $Q$-learning evaluation) is a promising next step.
- Offline Data Quality: While robust, the method still performs best when the offline data has decent coverage of the state space. If the offline data is extremely sparse, the variance reduction will be minimal.
For researchers and engineers tired of waiting for simulators to finish running, this paper provides a mathematically grounded "fast-forward" button for policy evaluation.
Summary updated