TL;DR
This paper introduces Off-Environment Evaluation (OEE), a method to predict how a reinforcement learning (RL) policy will perform in a real-world "target" environment using only a simulator and a small amount of real-world trajectory data. By using convex risk minimization to estimate the transition probability ratio between the two environments, the researchers can "correct" the simulator’s performance estimates, significantly narrowing the Sim2Real gap.
What Problem Does This Paper Address?
Reinforcement learning agents are usually trained in simulators because real-world training is slow, expensive, and potentially dangerous. However, simulators are rarely perfect—they often miss complex physics like friction, contact forces, or sensor noise. This discrepancy is known as the Sim2Real gap.
While "Robust RL" tries to solve this by adding synthetic noise during training, it doesn't provide a way to evaluate a policy's actual performance in the target environment before full deployment. Standard Off-Policy Evaluation (OPE) techniques exist, but they typically focus on evaluating a new policy using data from a different policy in the same environment. This paper tackles a harder problem: evaluating a policy across different environments (simulator vs. reality).
Methods
The core idea is to learn a "mismatch function" that quantifies the difference between the training MDP (simulator) and the testing MDP (real world).
- Transition Ratio Estimation ($\zeta$): The authors define $\zeta$ as the ratio of transition probabilities between the target and simulator environments. If you know this ratio, you can re-weight the rewards observed in the simulator to approximate the rewards in the real world.
- Convex Risk Minimization: Estimating this ratio directly is hard. Instead, the authors frame it as a convex optimization problem. They use the dual form of the Kullback-Leibler (KL) divergence to turn the ratio estimation into a loss-minimization task that can be solved using neural networks.
- The OEE Algorithm: The algorithm takes a few real-world trajectories and uses them to train two density ratio estimators (one for state-action pairs and one for state-action-next-state triplets). The ratio of these two estimators gives the transition ratio $\zeta$, which is then used to "correct" the simulator's value function.
Datasets
The authors evaluated their approach across four distinct settings:
- Gridworld: A discrete $n \times n$ grid used to validate the mathematical convergence of the estimator.
- Cartpole: A classic continuous-state, discrete-action control task where gravity was varied between the simulator and the test environment.
- Reacher: A continuous-state, continuous-action task where link lengths were modified to create environment mismatch.
- Kinova Gen3 Robot: A real-world 7-DOF robotic arm. Data was collected from the physical robot and compared against a Kinova simulator to test the method's practicality in robotics.
Key Insights and Ideas
- Generalization over Importance Sampling: Traditional Importance Sampling (IS) works well only if the policy you are evaluating is very similar to the policy used to collect data. The OEE method generalizes much better, accurately predicting performance even when the target policy diverges significantly from the data-collection policy.
- Theoretical Bounds: The authors prove that the estimator's error decreases at a rate of $n^{-1/4}$ (where $n$ is the number of samples). While the error scales exponentially with the time horizon (a common "curse of horizon" in RL), it remains manageable for horizons around $T=100$.
- Implicit Constraints: Interestingly, the neural network estimator sometimes outperforms an "Oracle" (which knows the true transition ratios) in practice. The authors suggest this might be because the unconstrained neural network doesn't strictly adhere to probability distribution constraints, allowing it to find "smoother" approximations that generalize better from finite data.
Key Results
- Sim2Real Accuracy: In the Kinova robot experiment, the simulator's raw performance estimate was off by approximately 30%. Using the OEE method, the researchers reduced this discrepancy to 20%, providing a much more realistic expectation of how the robot would behave.
- Robustness to Mismatch: In the Cartpole and Reacher experiments, OEE consistently tracked the "True Value" of the policy across varying levels of environmental mismatch (e.g., different gravity or link lengths), whereas standard Model-Based (MLE) baselines often failed as the mismatch increased.
- Sample Efficiency: The method demonstrated that even a "minimal amount" of target environment data is sufficient to significantly improve performance estimation.
Limitations and Future Work
- The Horizon Problem: The error bound grows exponentially with the time horizon $T$. This makes the current method less suitable for tasks requiring very long-term planning without further modifications.
- Data Quality: The authors noted that if the data collected from the target environment comes from a very "sub-optimal" policy, the estimator's ability to generalize to high-performing policies may degrade.
- Scaling Complexity: While tested on a 7-DOF arm, the authors aim to explore how this method scales to even more complex systems with higher-dimensional state spaces and more intricate physics (like soft robotics or multi-agent systems).
Summary updated