Simulation-aided Reinforcement Learning with Control Variates
Reinforcement Learning (RL) algorithms often rely on data collected from a target environment, which can be expensive and noisy. Although simulators can generate large amounts of additional data, standard simulation mixing approaches, which directly combine simulated and real experience, can degrade performance due to simulator inaccuracies, especially when they bias the solution away from the optimal policy.
From the abstract. Our summary is in progress.
Full paper
Simulation-aided Reinforcement Learning with Control Variates
Published under CC BY 4.0. Reproduced with attribution; original at arXiv:2611.12643 (PDF).
Abstract
Reinforcement Learning (RL) algorithms often rely on data collected from a target environment, which can be expensive and noisy. Although simulators can generate large amounts of additional data, standard simulation mixing approaches—which directly combine simulated and real experience—can degrade performance due to simulator inaccuracies, especially when they bias the solution away from the optimal policy. We propose a conservative simulation-aided learning method based on control variates, where simulated data is used solely to reduce variance in the learning process rather than directly shaping the learning target. We develop our approach for Policy-Evaluation, which is a fundamental building block of RL algorithms. Then we combine it within the actor-critic framework towards policy improvement, as well as extend it towards offline RL scenarios. Experiments on multiple MuJoCo benchmark tasks demonstrate improvements over standard simulation mixing approaches, highlighting control variates as an effective tool for simulation-aided reinforcement learning. Code is available at https://github.com/OmerHemo/Simulation-Aided-Reinforcement-Learning-with-Control-Variates.
1 Introduction
Reinforcement Learning [28, RL,] has had remarkable success on a variety of complex sequential decision problems. Nonetheless, those successes are mostly confined to settings in which almost unlimited data are available, oftentimes coming from “perfect” simulators of the decision process of interest, such as in videogames [33] or reasoning tasks [14]. In many practical scenarios instead, simulators are available, or they can be developed, but they are not “perfect”. They typically cannot match the complexity of the real environment, for which they only provide a biased, approximate surrogate. This bias generates a gap between what we can learn in simulation and what we would like to achieve in the real world. Mitigating this gap is the focus of a large body of work on sim-to-real adaptation [43, 51, 29, 4, 1, 30, 9, 36, 5, 49, 50, 54, 53].
Differently from previous works, here we are not interested in training robust policies in simulation for zero-shot transfer to the real world [4], nor into exploiting real world data to improve the simulator and reduce its inherent bias [49]. Instead, we embrace the simulator bias to tackle an orthogonal research question: Can we exploit biased but abundant data coming from an “imperfect” simulator in combination with real-world experience to improve the real-world performance?
A representative domain to reason about the setting is as follows. We may want to train a navigation policy for a quadruped robot while interacting online with the physical world. While processing the real-world experience on our computing infrastructure, we can draw additional data from a simulator of the robot, which runs at a substantially higher frequency. While the simulator differs from the physical environment in some key parameters, such as friction, gravity, contact forces, the effect of simulated actions may be correlated with the effect of the same action in the real world, meaning that the biased simulated data may carry some useful information to improve the real-world policy.
We formalize this setting as simulation-aided reinforcement learning, in which the real environment and the simulator are represented by Markov decision processes (MDPs) with identical specifications except for their transition model. A naïve approach [8, 25] to this setting, which we refer to as sim-mixing, is to just feed our RL base algorithm with a mixture of the simulated and real data and to forget about the bias. This has been proved to work surprisingly well in practice, especially when the mixing parameter is carefully tuned [8], often improving the variance relative to training on real only. However, sim-mixing is bound to fail when the bias in simulated transitions is severe. An approach to tackle the bias is to use importance sampling (IS) [38], in which the probability of the simulated transitions is reweighted to match the distribution of samples from the real environment. While this results in unbiased estimates, the additional variance introduced by the weighting can grow large [16, 32], possibly erasing all the benefits from exploiting the simulated data.
In this paper, we consider a control variates approach to simulation-aided RL. In a plain statistical setting, let X a quantity of interest we aim to estimate. A control variate [38, CV,] is a random variable Y, with known expectation \E[Y], that is correlated to X. The CV allows us to rephrase the initial estimation problem on the random variable Z=X-(Y-\E[Y]), which is unbiased, with provable statistical benefits [2]. In our setting, X stands for the quantity of interest in the real environment, Y is the same quantity in simulation, for which the expectation can be obtained by drawing large number of simulated samples. With this interpretation, we develop a family of CV solutions to various simulation-aided RL settings. We corroborate the proposed CV approach both theoretically and empirically, showing that it often combines the unbiasedness of IS with the low variance of sim-mixing, while consistently outperforming or matching training on real data only, even when the bias of the simulator is severe. Specifically, our contributions are:
- We formally define the simulation-aided RL problem.
- We propose a control variates approach to policy evaluation in the introduced setting, for which we analyze theoretical and practical benefits.
- We show how improved policy evaluation can be integrated in online and offline RL algorithms, such as Soft Actor Critic [15] and Conservative Q-Learning [20].
- We conduct an experimental campaign on several tasks from the MuJoCo suite, where we show that our CV approach matches or outperforms alternative methods for the simulation-aided RL setting, including standard sim and real mixing schemes [8], PAR [26], and VGDF [55].
2 Background
Notation. For a set \mathcal{X}, we denote |\mathcal{X}| its size and \Delta_{\mathcal{X}}:=\{p\in[0,1]^{|\mathcal{X}|}\mid\sum_{x\in\mathcal{X}}p(x)=1\} the probability simplex over it. For a random variable X, we denote \E[X] its expectation, \mathbb{V}[X]=\sigma^{2}_{X} its variance. For two random variables X,Y, their covariance is \mathrm{Cov}(X,Y). Similarly, for random vectors we have \mathbb{V}[X]:=\E\|X-\E X\|^{2}_{2} and \mathrm{Cov}(X,Y):=\E\langle X-\E X,\,Y-\E Y\rangle, where \|\cdot\|_{p} denotes the \ell_{p} norm and \langle\cdot,\cdot\rangle is the inner product.
2.1 Estimation with Biased Data
Let X\sim P a random variable distributed with P, and let f a function of X for which we aim to estimate the expectation \E_{P}[f(X)]. In a typical statistical setting, we have access to a set of measurements \{f(x_{i})\}_{i=1}^{n}, where x_{i} are i.i.d. realizations of X. The Monte Carlo (MC) estimator of \E_{P}[f(X)] is then given by \hat{Y}=\sum_{i=1}^{n}f(x_{i})/n. It is well-known that \mathbb{V}(\hat{Y})=\sigma^{2}_{f}/n, implying that \hat{Y} may encompass a high error when n is small. In such settings, to reduce the variance of the estimate, one may turn to additional information coming from biased data.
Importance sampling. In some scenarios, we may access a large set of measurements \{f(x_{i})\}_{i=1}^{N} from the same function f on realizations \{x_{i}\}_{i=1}^{N} that are sampled i.i.d. from a distribution Q instead of the target distribution P. A direct MC approach on these measurements would result in a biased estimate approaching \E_{Q}[f(X)] with N\to\infty. The importance sampling (IS) estimator accounts for the distribution shift by computing \hat{Y}_{\mathrm{IS}}=\frac{1}{N}\sum_{i=1}^{N}w(x_{i})f(x_{i}), where w(x):=P(x)/Q(x) is the importance weight. The resulting estimate is unbiased and its variance is smaller than an MC estimator when N\gg n and P,Q are similar distributions [38].
Control variates. In other scenarios, we may access an additional set of measurements \{h(x_{i})\}_{i=1}^{n} from a function h on realizations sampled i.i.d. from X\sim P, for which we know the expectation \E_{P}(h(X)). The function h is often called a control variate [38, CV,]. We can define a control variate estimator \hat{Y}_{\mathrm{CV}}=\frac{1}{n}\sum_{i=1}^{n}f_{\mathrm{cv}}(x_{i}) where f_{\mathrm{cv}}(x)=f(x)-\lambda\big(h(x)-\E_{P}[h(X)]\big), such that the information from the control variate is exploited to adjust the MC estimate of \E_{P}[f(X)] with a parameter \lambda\in\mathbb{R}. It is easy to see that the estimator is unbiased, while the variance of a point-estimate is given by \sigma^{2}_{f_{\mathrm{cv}}}=\sigma_{f}^{2}+\lambda^{2}\sigma_{h}^{2}-2\lambda\mathrm{Cov}(f,h). The latter shows that the variance of the estimate can be reduced whenever the measurements from f and h are highly correlated (i.e., \mathrm{Cov}(f,h) is large). Notably, the variance depends on \lambda, which can be tuned to minimize it as \lambda^{*}=\mathrm{Cov}(f,h)/\sigma_{h}^{2}, resulting in the point-estimate f_{\mathrm{cv}}^{*}(x):=f_{\mathrm{cv}}(x)\big|_{\lambda=\lambda^{*}} with variance \sigma^{2}_{f_{\mathrm{cv}}^{*}}=\big(1-\frac{\mathrm{Cov}(f,h)^{2}}{\sigma_{f}^{2}\sigma_{h}^{2}}\big)\sigma_{f}^{2}, so the variance reduction grows with the absolute correlation |\rho_{fh}|=\frac{|\mathrm{Cov}(f,h)|}{\sigma_{f}\sigma_{h}}.
2.2 Markov Decision Processes
A Markov Decision Process [41, MDP,] models sequential decision problems. An MDP is defined as M=(\mathcal{S},\mathcal{A},P,R,\mu,\gamma), where \mathcal{S} is the state space, \mathcal{A} is the action space, P:\mathcal{S}\times\mathcal{A}\to\Delta_{\mathcal{S}} is the transition model, R:\mathcal{S}\times\mathcal{A}\to[0,R_{\mathrm{max}}] is the reward, \mu\in\Delta_{\mathcal{S}} is the initial state distribution, and \gamma\in(0,1) is the discount factor. A policy \pi:\mathcal{S}\to\Delta_{\mathcal{A}} describes the decision strategy of an agent interacting with the MDP according to the following protocol. First, a state s_{0}\sim\mu is drawn. Then, for every step t\geq 0, the agent observes s_{t}, takes an action a_{t}\sim\pi(s_{t}), and collects a reward r_{t}=R(s_{t},a_{t}), while the process transitions to the next state s_{t+1}\sim P(s_{t},a_{t}). This induces a distribution over the state-action pairs visited by \pi, from which the data are collected, which we denote by P^{\pi}(s,a), and a corresponding distribution over transitions P^{\pi}(s,a,s^{\prime}):=P^{\pi}(s,a)\,P(s^{\prime}\mid s,a).
The quality of a decision policy \pi in a given state can be measured through the value function and the state-action value function, defined respectively as
\displaystyle V^{\pi}_{P}(s) \\ \displaystyle:=\E_{\pi,P}\left[\sum_{t=0}^{\infty}\gamma^{t}r_{t}\ \Big|\ s_{0}=s\right],\qquad Q^{\pi}_{P}(s,a):=\E_{\pi,P}\left[\sum_{t=0}^{\infty}\gamma^{t}r_{t}\ \Big|\ s_{0}=s,a_{0}=a\right].in which the expectation is taken over actions a_{t}\sim\pi(s_{t}) and state transitions s_{t+1}\sim P(s_{t},a_{t}), where the exponential discount ensures the sum remains finite. Reinforcement Learning [28, RL,] is a paradigm to solve MDPs from sampled interactions, i.e., without knowledge of the MDP specification. Solving the MDP refers to two classical problems. One is called policy evaluation, in which the goal is to estimate the value V^{\pi}_{P} or Q^{\pi}_{P} of a given policy \pi. The other is policy optimization, where the goal is to learn a policy \pi^{*}\in\argmax_{\pi}\E_{\mu}[V^{\pi}_{P}(s)], which is called the optimal policy.
3 Problem Setting
In this paper, we consider a pair of MDPs
\displaystyle M_{\mathrm{real}}=(\mathcal{S},\mathcal{A},P_{\mathrm{real}},R,\mu,\gamma) \\ \displaystyle M_{\mathrm{sim}}=(\mathcal{S},\mathcal{A},P_{\mathrm{sim}},R,\mu,\gamma)with the same specification of \mathcal{S},\mathcal{A},R,\mu,\gamma but possibly different transition models. The MDP M_{\mathrm{real}} represents the real environment, i.e., the environment of interest in which we aim to solve typical policy evaluation and optimization problems. Differently from the usual setting, here we may access an additional environment M_{\mathrm{sim}} that simulates the real environment with some approximation error.
Simulation-aided RL is concerned with the problem of evaluating or optimizing a policy by combining the information from the real environment M_{\mathrm{real}} and the simulator M_{\mathrm{sim}}. Our problem falls within the broader off-dynamics RL setting [10], which encompasses any transfer between MDPs with mismatched dynamics; our emphasis is on using simulation data to aid each policy update step in the real environment. Clearly, the setting is trivial whenever P_{\mathrm{sim}}\approx P_{\mathrm{real}} in distribution: Any RL algorithm treating simulated samples as real-world samples would be approximately optimal. The following result makes the latter statement precise.
Theorem 3.1 (Lemma 10.12, [28]).
Let \pi a given policy and let q\in\Delta_{\mathcal{S}} the stationary state distribution induced by \pi in M_{\mathrm{real}}. It holds
\displaystyle(1-\gamma)^{2}\E_{q} \\ \displaystyle[|V^{\pi}_{P_{\mathrm{real}}}(s)-V^{\pi}_{P_{\mathrm{sim}}}(s)|]\leq\gamma R_{\mathrm{max}}\E_{q,\pi}[\|P_{\mathrm{real}}(s,a)-P_{\mathrm{sim}}(s,a)\|_{1}].In this paper, we are especially interested in problems in which \E_{q,\pi}[\|P_{\mathrm{real}}(s,a)-P_{\mathrm{sim}}(s,a)\|_{1}] is large, which means the simulated samples shall be handled with care. In the following sections, we first focus on the problem of policy evaluation. We describe common approaches and corresponding pitfalls, as well as a method to address them. Then, we show how the proposed policy evaluation solution can bring ripple benefits to policy optimization.
4 Simulation-aided Policy Evaluation
Here we study the problem of policy evaluation in the simulation-aided RL setting. Let \pi be the policy of which we aim to estimate the value in M_{\mathrm{real}}. We are provided with a dataset D_{\mathrm{real}}=\{(s,a,s^{\prime})_{i=1}^{n}\} taken with the policy \pi in M_{\mathrm{real}}. With this dataset, we aim to estimate Q^{\pi}_{P_{\mathrm{real}}} within a class of parametric models Q_{\theta}, where \theta\in\mathbb{R}^{d}. Typically, this is done by minimizing the squared temporal-difference (TD) error [47, 46], i.e.,
\min_{\theta\in\mathbb{R}^{d}}\ \mathcal{L}(\theta):=\E_{\pi,P_{\mathrm{real}}}\big[\delta_{\theta}(s,a,s^{\prime})^{2}\big],\quad\text{where}\ \delta_{\theta}(s,a,s^{\prime}):=Q_{\theta}(s,a)-\Bigl(R(s,a)+\gamma V_{\theta}(s^{\prime})\Bigr),with V_{\theta}(s^{\prime}):=\E_{a^{\prime}\sim\pi(s^{\prime})}\bigl[Q_{\theta}(s^{\prime},a^{\prime})\bigr]. To improve stability, it is common to employ a target network Q^{T}_{\theta}, which is a delayed copy of the current estimator Q_{\theta}. In particular, Q^{T}_{\theta}(s,a):=Q^{T}(s,a), where the target parameters \theta^{T} are updated more slowly than \theta, typically via an exponential moving average \theta^{T}\leftarrow\tau\theta+(1-\tau)\theta^{T} for some \tau\in(0,1). The use of such slowly updated target networks is known to significantly stabilize temporal-difference learning [34, 23, 11]. Therefore, in practice \delta_{\theta}(s,a,s^{\prime})=Q_{\theta}(s,a)-\big(R(s,a)+\gamma V^{T}(s^{\prime})\big), with V^{T}(s^{\prime}):=\E_{a^{\prime}\sim\pi(s^{\prime})}\bigl[Q^{T}(s^{\prime},a^{\prime})\bigr].
While the problem of minimizing the squared TD error for policy evaluation is well-understood [7], here we are interested in studying whether a superior estimate can be obtained by exploiting an additional dataset of transitions D_{\mathrm{sim}}=\{(s,a,s^{\prime})_{i=1}^{N}\} taken with the policy \pi in M_{\mathrm{sim}}.
4.1 Common Approaches and Their Pitfalls
Simulator-mixing approaches [8, 25] combine data from simulations and real to minimize the objective: \E_{P^{\pi}_{\mathrm{sim}}}\left[\,\delta_{\theta}(s,a,s^{\prime})^{2}\right]+\E_{P^{\pi}_{\mathrm{real}}}\left[\,\delta_{\theta}(s,a,s^{\prime})^{2}\right]. One can also control simulator bias by using a weighting coefficient \ 0\leq\alpha\leq 1 to get \alpha\E_{P^{\pi}_{\mathrm{sim}}}\left[\,\delta_{\theta}(s,a,s^{\prime})^{2}\right]+(1-\alpha)\E_{P^{\pi}_{\mathrm{real}}}\left[\,\delta_{\theta}(s,a,s^{\prime})^{2}\right], as it is done in [8]. We refer to this weighted objective as regular sim-mixing and denote the resulting Q-estimation method by Reg-Qmix; it serves as our main mixing baseline throughout the paper. If we recall the TD error (1), we can see that, for every \alpha>0, we are comparing Q_{\theta}(s,a) with biased targets. Importance sampling [38] can correct the bias of the expectation as \alpha\E_{P^{\pi}_{\mathrm{sim}}}\left[\frac{P^{\pi}_{\mathrm{real}}(s,a,s^{\prime})}{P^{\pi}_{\mathrm{sim}}(s,a,s^{\prime})}\delta_{\theta}(s,a,s^{\prime})^{2}\right]. This ratio can explode in some settings. For instance, if both the transition models are deterministic, e.g., P_{\mathrm{real}}(s,a)=\mathbb{I}\{s^{\prime}=s_{1}\} , P_{\mathrm{sim}}(s,a)=\mathbb{I}\{s^{\prime}=s_{2}\}, then the IS ratio tends to zero or infinity.
4.2 Policy Evaluation with Control Variates
An alternative approach to address the bias is through control variates (CV, see Section 2). In the case of the TD error in Eq. 1, the underlying random variable is the transition tuple (s,a,s^{\prime}), and the corresponding function is the temporal-difference error \delta(s,a,s^{\prime}).
We define the real TD error and simulated Bellman error [3, 33] as:
\displaystyle\delta^{\mathrm{real}}_{\theta}(s,a,s^{\prime}) \\ \displaystyle:=Q_{\theta}(s,a)-\Bigl(r(s,a)+\gamma V^{T}(s^{\prime})\Bigr), \\ \displaystyle\delta^{\mathrm{sim}}_{\theta}(s,a) \\ \displaystyle:=Q_{\theta}(s,a)-\Bigl(r(s,a)+\gamma\mathbb{E}_{\tilde{s}^{\prime}\sim P_{\mathrm{sim}}(\cdot|s,a)}[V^{T}(\tilde{s}^{\prime})]\Bigr).Then, we can write the CV objective
\displaystyle\mathcal{L}_{CV}(\theta)=\E_{s,a,s^{\prime}\sim P^{\pi}_{\mathrm{real}}}[\delta_{\theta}^{\mathrm{real}}(s,a,s^{\prime})^{2}-\lambda\delta_{\theta}^{\mathrm{sim}}(s,a)^{2}]+\lambda\E_{s,a\sim P^{\pi}_{\mathrm{sim}}}[w(s,a)\delta_{\theta}^{\mathrm{sim}}(s,a)^{2}]where w(s,a) is the IS density ratio w(s,a)=\frac{P^{\pi}_{\mathrm{real}}(s,a)}{P^{\pi}_{\mathrm{sim}}(s,a)}. Applying IS to the pair (s,a) is better than on the triplet (s,a,s^{\prime}), since the distributions P^{\pi}_{\mathrm{real}}(s,a) and P^{\pi}_{\mathrm{sim}}(s,a) are necessarily closer than the non-marginalized P^{\pi}_{\mathrm{real}}(s,a,s^{\prime}) and P^{\pi}_{\mathrm{sim}}(s,a,s^{\prime}).
Empirical Loss. To compute (2), we use the datasets D_{\mathrm{real}} and D_{\mathrm{sim}}. In addition, we construct an auxiliary dataset \tilde{D}_{\mathrm{real}}=\{(s,a,s^{\prime},\{\tilde{s}^{\prime}\}_{j=1}^{K})\}_{i=1}^{n} by taking each (s,a) pair from D_{\mathrm{real}}, resetting the simulator to state s, and executing action a to generate \tilde{s}^{\prime}. For stochastic simulators, we collect K independent next-state samples for each (s,a) pair.
For example, in the MuJoCo simulator, the state consists of the robot’s joint positions and velocities, which are also the inputs provided to the learned policy \pi. Resetting the simulator to a specified configuration of joint positions and velocities is therefore straightforward. This capability is also available in many other physics simulators, such as NVIDIA Isaac Sim [37] and PyBullet [6].
4.3 Analysis of the Gradient of the Empirical CV Loss
Since our goal is to optimize \mathcal{L}_{CV}(\theta) using gradient-based methods, we study the bias and variance of the resulting gradient estimators. Throughout, \theta is fixed and gradients treat the target V^{T} as a constant, as in any TD method with a target network. As is standard in covariate-shift analyses [2, 45, 12, 24, e.g.,], we assume access to the density ratio w. The gradient of the empirical CV loss is
\hat{g}_{\lambda}=\frac{1}{n}\sum_{i=1}^{n}\Big[\nabla_{\theta}\delta^{\mathrm{real}}_{\theta}(x_{i})^{2}-\lambda\,\nabla_{\theta}\delta^{\mathrm{sim}}_{\theta}(x_{i})^{2}\Big]+\frac{\lambda}{N}\sum_{j=1}^{N}w(\tilde{s}_{j},\tilde{a}_{j})\,\nabla_{\theta}\delta^{\mathrm{sim}}_{\theta}(\tilde{x}_{j})^{2},where x_{i}\in\tilde{D}_{\mathrm{real}}, \tilde{x}_{j}\in D_{\mathrm{sim}}, and \delta^{\mathrm{sim}}_{\theta} uses the average of V^{T} over the available simulated next states (K for \tilde{D}_{\mathrm{real}}, one for D_{\mathrm{sim}}). Its behaviour is governed by the expected real and simulated gradients at a state–action pair,
\displaystyle b(s,a) \\ \displaystyle:=2\big(Q_{\theta}(s,a)-r(s,a)-\gamma\,\E_{s^{\prime}\sim P_{\mathrm{real}}(s,a)}V^{T}(s^{\prime})\big)\nabla_{\theta}Q_{\theta}(s,a), \\ \displaystyle\tilde{b}(s,a) \\ \displaystyle:=2\big(Q_{\theta}(s,a)-r(s,a)-\gamma\,\E_{\tilde{s}^{\prime}\sim P_{\mathrm{sim}}(s,a)}V^{T}(\tilde{s}^{\prime})\big)\nabla_{\theta}Q_{\theta}(s,a),together with the transition noise and the variance of the importance-weighted term,
\displaystyle\sigma_{T}^{2} \\ \displaystyle:=4\gamma^{2}\E_{s,a\sim P^{\pi}_{\mathrm{real}}}\Big[\|\nabla_{\theta}Q_{\theta}(s,a)\|^{2}_{2}\,\mathbb{V}_{s^{\prime}\sim P_{\mathrm{real}}(s,a)}\big[V^{T}(s^{\prime})\big]\Big], \\ \displaystyle\sigma_{\mathrm{IS}}^{2} \\ \displaystyle:=\mathbb{V}_{\tilde{x}\sim P^{\pi}_{\mathrm{sim}}}\big[w(\tilde{s},\tilde{a})\,\nabla_{\theta}\delta^{\mathrm{sim}}_{\theta}(\tilde{x})^{2}\big],the simulator counterpart \tilde{\sigma}_{T}^{2} of \sigma_{T}^{2} (same expression with P_{\mathrm{sim}}) and the simulator value mismatch
\Delta^{2}_{V^{T}}:=\E_{s,a\sim P^{\pi}_{\mathrm{real}}}\Big[\big(\E_{s^{\prime}\sim P_{\mathrm{real}}(s,a)}V^{T}(s^{\prime})-\E_{\tilde{s}^{\prime}\sim P_{\mathrm{sim}}(s,a)}V^{T}(\tilde{s}^{\prime})\big)^{2}\Big]We can characterize the bias and variance of the CV loss gradient estimator as follows.
Theorem 4.1 (Gradient bias and variance).
Assume access to the density ratio w and let the samples in \tilde{D}_{\mathrm{real}} and D_{\mathrm{sim}} be drawn independently. For every \lambda\in\mathbb{R} and K\geq 1:
\E[\hat{g}_{\lambda}]=\E_{s,a\sim P^{\pi}_{\mathrm{real}}}[b(s,a)]=\E[\hat{g}_{0}], which is the gradient of the TD objective (1);\displaystyle\mathbb{V}[\hat{g}_{\lambda}]=\frac{1}{n}\Big(\mathbb{V}\big[b-\lambda\tilde{b}\big]+\sigma_{T}^{2}+\frac{\lambda^{2}\tilde{\sigma}_{T}^{2}}{K}\Big)+\frac{\lambda^{2}}{N}\sigma_{\mathrm{IS}}^{2}, withb,\tilde{b}evaluated at(s,a)\sim P^{\pi}_{\mathrm{real}};\mathbb{V}[\hat{g}_{\lambda^{\star}}]\;\leq\;\,\mathbb{V}[\hat{g}_{0}]for the variance minimizer\lambda^{\star}=\frac{\mathrm{Cov}(b,\tilde{b})}{\mathbb{V}[\tilde{b}]+\tilde{\sigma}_{T}^{2}/K+n\,\sigma_{\mathrm{IS}}^{2}/N};\mathbb{V}\big[b-\lambda\tilde{b}\big]\leq 2(1-\lambda)^{2}\,\mathbb{V}[b]+8\lambda^{2}\gamma^{2}G^{2}\,\Delta^{2}_{V^{T}},with\|\nabla_{\theta}Q_{\theta}(s,a)\|_{2}\leq Gfor all(s,a).
Proof. See Appendix A.2.
Theorem 4.1 has four parts. Part (i) shows that the estimator of the CV gradient is unbiased. Part (ii) reports an exact expression of the variance. Setting \lambda=0 recovers real-only TD, whose variance (\mathbb{V}[b]+\sigma_{T}^{2})/n has two sources: the randomness of the real next state (\sigma_{T}^{2}) and which state-action pairs happen to be in D_{\mathrm{real}} (\mathbb{V}[b]). Because simulated next states are drawn independently of real ones, the simulator cannot reduce \sigma_{T}^{2}, it acts on \mathbb{V}[b] only. There, \mathbb{V}[b-\lambda\tilde{b}]=\mathbb{V}[b]-2\lambda\,\mathrm{Cov}(b,\tilde{b})+\lambda^{2}\mathbb{V}[\tilde{b}] is exactly the classical control-variate variance of Sec. 2 with f=b and h=\tilde{b}: The simulator’s expected Bellman gradient is a control variate for the real one. The last two terms are the price of estimating \E[\tilde{b}] and the simulator expectation from finitely many samples, and vanish in the abundant-simulation regime N,K\to\infty. Part (iii) shows that, with a well-chosen \lambda, the CV gradient reduces the variance of real-only TD when \mathrm{Cov}(b,\tilde{b})\neq 0. Part (iv) ties this gain to simulator quality: \lambda removes state-action variance at rate (1-\lambda)^{2} and pays for the simulator value mismatch at rate \lambda^{2}. This is the key difference from sim-mixing. By Theorem 3.1, a mismatched simulator biases the sim-mixing solution. Here, the mismatch enters only the variance, scaled by 1/n and controlled by \lambda.
4.4 Practical Implementation of the CV Method
After the theoretical analysis of the CV loss we now look into deriving a fully practical algorithm to optimize the objective (2). We summarize its main steps in Algorithm 1, which we refer to as CV-Qmix in the remainder of the paper.
In cases where we do not have access to w(s,a), it can be estimated using a subset of D_{\mathrm{real}},D_{\mathrm{sim}}. A large body of works have shown that this can be done in practice by training a classifier (e.g., [31]) where w_{\psi}(s,a):=\frac{P_{\psi}(x\in\mathrm{real}\mid x)}{P_{\psi}(x\in\mathrm{sim}\mid x)}\approx\frac{P^{\pi}_{\mathrm{real}}(s,a)}{P^{\pi}_{\mathrm{sim}}(s,a)}.
The classifier is trained by minimizing the cross-entropy \mathcal{L}_{\mathrm{CE}}(\psi)=-\mathbb{E}_{x\sim D_{\mathrm{real}}}\big[\log P_{\psi}(y=1\mid x)\big]-\mathbb{E}_{x\sim D_{\mathrm{sim}}}\big[\log P_{\psi}(y=0\mid x)\big].
In addition, we observe that the CV loss in Eq. 2 can become unstable when state–action pairs that appear predominantly in the real dataset are overfit by the value function Q_{\theta}(s,a), leading to excessively negative contributions in the first expectation. To mitigate this issue, we apply zero masking, \mathbb{I}_{m}:=\mathbb{I}\{w_{\psi}(x)<\beta_{w}\} to samples with large importance weights, effectively excluding simulator samples for which w_{\psi}(s,a)>\beta_{w}. The masked loss:
\displaystyle L_{CV}(\theta)=\frac{1}{n}\sum_{i=1}^{n}\Big[\delta_{\theta}^{\mathrm{real}}(x_{i})^{2}-\mathbb{I}_{m}\,\lambda\,\delta_{\theta}^{\mathrm{sim}}(x_{i})^{2}\Big]+\frac{1}{N}\sum_{j=1}^{N}\Big[\mathbb{I}_{m}\,\lambda\,w_{\psi}(\tilde{s}_{j},\tilde{a}_{j})\,\delta_{\theta}^{\mathrm{sim}}(\tilde{x}_{j})^{2}\Big]Importantly, the estimator is still unbiased (Apx. A.3) and, since the mask is a function of (s,a) only, Theorem 4.1 holds verbatim for the masked estimator, with \tilde{b} and the simulator terms multiplied by \mathbb{I}_{m}. The mask also controls the importance-sampling term: Since \E_{P^{\pi}_{\mathrm{sim}}}\big[\mathbb{I}_{m}w^{2}\|\nabla_{\theta}(\delta^{\mathrm{sim}}_{\theta})^{2}\|^{2}_{2}\big]=\E_{P^{\pi}_{\mathrm{real}}}\big[\mathbb{I}_{m}w\,\|\nabla_{\theta}(\delta^{\mathrm{sim}}_{\theta})^{2}\|^{2}_{2}\big], for the mask computed with the true w we get \sigma_{\mathrm{IS}}^{2}\leq\beta_{w}\,\E_{P^{\pi}_{\mathrm{real}}}\big[\|\nabla_{\theta}(\delta^{\mathrm{sim}}_{\theta})^{2}\|^{2}_{2}\big], whereas without masking it can be arbitrarily large when the two state-action distributions overlap poorly.
We tune the mixing coefficient \lambda using the control variate formulation at the loss level rather than at the gradient level, as a cheap scalar surrogate of the \lambda^{\star} in Theorem 4.1(iii). We find this approach to be effective for gating simulated data. When updating the target network Q^{T}(s,a), we also update \lambda according to: \hat{\lambda}=\mathrm{Cov}\big((\delta^{\mathrm{real}}_{\theta})^{2},(\delta^{\mathrm{sim}}_{\theta})^{2}\big)/\mathbb{V}\big((\delta^{\mathrm{sim}}_{\theta})^{2}\big).
5 Simulation-aided Policy Optimization
After analyzing the policy evaluation problem, we now shift the focus to policy optimization in simulation-aided RL. In this setting, we consider a class of parametric policies \pi_{\phi}, where \phi\in\mathbb{R}^{z}. The typical goal is to learn a policy
\phi^{*}\in\argmax_{\phi\in\mathbb{R}^{z}}\E_{\mu}[V^{\pi_{\phi}}_{P_{\mathrm{real}}}(s)]from sampled interactions with the MDP M_{\mathrm{real}}. The interactions may come online by querying the MDP with a policy of our choice, or offline, in which data are gathered beforehand by running one or multiple policies in the MDP.
In modern algorithms, the optimization of the objective (5) is typically done by iterative gradient ascent updates over the current policy parameters \phi_{t} or the current value parameters \theta_{t}, from which the policy parameters are recovered later. In both settings, the policy evaluation step is crucial to either estimate the policy gradient [44, 15] or as the main target of the optimization [33, 20].
In the simulation-aided setting, we further access transitions coming from an imperfect simulator M_{\mathrm{sim}}, which we may use to improve the gradient estimates at each step. Especially, we aim to test whether our simulation-aided policy evaluation method can bring benefits to the corresponding policy optimization problem as well. We detail below how to incorporate Algorithm 1 as a policy evaluation building block in common actor-critic algorithms for the online and offline settings, respectively.
5.1 Online Policy Optimization
For the online setting, we use Soft Actor-Critic [15, SAC,] as a representative approach, although our Q estimation method can be easily incorporated in other popular algorithms, such as PPO [44] or TD3 [11]. To extend SAC to the simulation-aided setting, we just need to incorporate our Q estimation procedure in the critic update step and an additional sampling routine to collect fresh data from M_{\mathrm{sim}} with the current policy at each iteration. Crucially, SAC makes use of entropy regularization, so that we need to substitute in Algorithm 1 the standard TD error (1) with a soft Bellman error \delta^{\mathrm{soft}}_{\theta}(s,a,s^{\prime}):=Q_{\theta}(s,a)-y where the target y is entropy-regularized with some \alpha>0,
y=R(s,a)+\gamma\E_{a^{\prime}\sim\pi_{\phi}(s^{\prime})}\Big[Q^{T}(s^{\prime},a^{\prime})-\alpha\log\pi_{\phi}(a^{\prime}|s^{\prime})\Big].5.2 Offline Policy Optimization
Collecting data online with the current policy is often impractical in safety-critical and expensive domains, such as robotic manipulation or autonomous driving. In those settings, one would rather collect the data once and then iterate on the fixed dataset to learn a good policy. In the simulation-aided setting, we assume to have a pre-collected dataset from both the environment M_{\mathrm{real}} and its simulator M_{\mathrm{sim}}. Similarly as in the previous section, we want to extend popular offline RL algorithms with our Q estimation procedure. Here we chose Conservative Q-Learning [20, CQL,] as a representative example. Extending our method to the offline setting introduces two additional challenges. First, if the real and simulated datasets, D_{\mathrm{real}} and D_{\mathrm{sim}}, are collected under different policies, then the induced state-action distributions P^{\pi_{1}}_{\mathrm{sim}} and P^{\pi_{2}}_{\mathrm{real}} may have limited overlap. As a result, the masking mechanism and density ratio term w(s,a) (Eq. 4) may discard a large portion of the data.
The high-overlap condition is naturally satisfied when both datasets are generated by the same behavior policy. While this coupling is straightforward to enforce in the online setting, it is more challenging offline, where real-world data may be collected under an unknown policy. In our current formulation, we assume access to the behavior policy. A practical instance of this setting arises when the behavior policy is trained in simulation and then used to collect real-world data.
When incorporating simulated data into CQL, a second challenge arises from dataset imbalance. In particular, when the amount of simulated data is much larger than the real dataset (N\gg n), the CQL regularization term can be dominated by simulated transitions, effectively under-regularizing the real data. To address this issue, we apply CQL regularization separately to the simulated and real datasets.
6 Experimental Results
We evaluate our method on standard MuJoCo continuous-control benchmarks [52], and on a custom MuJoCo robotics task, Puck Sliding, inspired by [39] (see Appendix G for details). To simulate the sim-to-real gap, we construct distinct real and simulated environments by perturbing physical parameters such as gravity, contact friction, joint damping, body part lengths, and actuator strength.
Baselines. In all of the domains, we evaluate our approach, CV-Qmix, against several baselines. The most relevant are Reg-Qmix, a standard approach to mix sim and real data without correction (see Sec. 4.1), closely inspired by [8], and Real, which is a standard TD critic operating on real data only, corresponding to CV-Qmix with \lambda=0. While these are policy evaluation methods, in policy optimization experiments we use the same algorithms’ names to refer to actor-critic methods in which the critic is implemented by CV-Qmix, Reg-Qmix, Real, respectively. The actor-critic backbone is SAC [15] for online policy optimization and CQL [20] for offline policy optimization. In online policy optimization, we further compare against PAR [26] and VGDF [55], two strong baselines from the ODRL benchmark [27] (see Section 7 for details on how they work).
Experiments. We first evaluate CV-Qmix on policy evaluation, the task it is designed to address, against Reg-Qmix and Real (Section 6.1, Figure 1). We further ablate the CV coefficient \lambda of CV-Qmix and the mixing coefficient \alpha of Reg-Qmix (Figure 1 center, right). We then test whether these gains carry over to online and offline policy optimization (Section 6.2, Figure 2 3). Throughout, we vary the sim gap, i.e., how far the simulator’s dynamics parameters are shifted from those of M_{\mathrm{real}}: a larger gap corresponds to a larger shift and therefore a more biased simulator (exact values in Apx C.3). Additional results on robustness to increasing sim gaps and on the values of the adaptive \lambda are reported in Apx. B and D.
6.1 Policy Evaluation Experiments
We evaluate on the MuJoCo Humanoid task, where M_{\mathrm{real}} uses the default dynamics and M_{\mathrm{sim}} perturbs the gravity magnitude and tilt (Appendix C.3). We report the normalized Q-value error: the mean absolute error between the Monte Carlo Q-values predicted by the methods and ground-truth Q-values, after min-max normalizing both by the range of the ground-truth returns. To obtain ground-truth values, we construct a test set of state–action pairs (s,a) and estimate the Q-value of each pair under the evaluation policy by averaging the returns of 10 rollouts from (s,a) in M_{\mathrm{real}}.
Figure 1 (left) shows that CV-Qmix outperforms the real-only estimator at every real-data budget. At the smallest budget, Reg-Qmix attains the lowest error, but CV-Qmix overtakes it beyond roughly 2,000 samples and, unlike Reg-Qmix, keeps improving and plateaus at a lower error as real data grows. The Reg-Qmix ablation (right) shows why naive mixing falls short. A high simulated-data ratio (\alpha=0.8) reduces error when real data is scarce but plateaus above the real-only baseline, whereas a low ratio (\alpha=0.2) tracks the baseline closely: more simulated data trades variance for bias. In contrast, CV-Qmix uses simulated data to reduce the variance of the real-data estimator while correcting for the simulator’s bias. As Theorem 4.1 shows, the variance is quadratic in \lambda and therefore minimized at an intermediate value. In this experiment, \lambda=0.8 performs best (middle), and the adaptive estimate of \lambda (Section 4.4) comes close to this best fixed value.
6.2 Policy Optimization Experiments
\lambda on CV-Qmix, including the adaptive choice of \lambda. Right: Effect of \alpha on Reg-Qmix. In all plots, the real-only estimator is shown for reference. Curves show the mean and shaded regions \pm1 std over 10 seeds.We evaluate how improved policy evaluation can benefit policy optimization, both online and offline, in variety of MuJoCo domains, Ant, Walker, Hopper, and Puck Sliding.
Online policy optimization. Figure 2 shows the results. In this experiment, all policies are pre-trained in simulation with SAC, and then fine-tuned using both simulated and real data (except the Real baseline) with SAC equipped with the corresponding critic. The simulator and real environment differ in their dynamics parameters at three gap levels (small, medium, and large; see Appendix C.3 for dynamics shift details). The plots report the performance of the fine-tuning stage. As we can see, CV-Qmix performs better or on par with the most competitive baseline across all the gap levels, with the benefit of CV-Qmix approach increasing with larger sim gaps. On Ant, CV-Qmix is comparable to other baselines at small and medium gap levels, but on the large gap it clearly outperforms all the baselines, with the margin growing with the gap. On Walker2D, the methods are comparable at small and medium gaps, while at a large gap Reg-Qmix and PAR degrade and CV-Qmix remains the best together with VGDF. These results are consistent with bias correction becoming important as the gap grows. It is interesting to take a closer look at ODRL baselines. PAR closely tracks Reg-Qmix: both train on mixed data, and PAR’s reward penalty does not remove the bias of simulated TD targets. VGDF avoids this bias, by filtering out simulation samples, but filtering too much simulated samples costs sample efficiency.
In figure 3 (left), we test whether simulated data enables more policy updates, performing 10\times more updates per real interaction. M_{\mathrm{real}} uses the default MuJoCo dynamics and M_{\mathrm{sim}} uses perturbed dynamics (Appendix C.3). Figure 3 compares Reg-Qmix and CV-Qmix (ours) against standard SAC (Real), which uses only real samples. Both mixing methods outperform the baseline, but Reg-Qmix plateaus earlier and has higher variance. We attribute the higher variance to the instability of jointly minimizing the real and simulated expectations (Sec. 4.1), which is sensitive to the real data collected during training; CV-Qmix reduces the variance of the real expectation, giving more stable optimization. We attribute the earlier plateau and lower asymptotic performance of Reg-Qmix to simulator bias, which can lead the policy toward actions that are suboptimal in the real environment.
Offline policy optimization. In the offline setting (Figure 3, right), we first train a behavioral policy in the simulator with SAC until it plateaus, then use it to collect D_{\mathrm{real}} and D_{\mathrm{sim}}, with substantially more simulated than real data (Appendix C.1). We run CQL with a CV-Qmix, Reg-Qmix, and real only critic with those data. Since offline policies cannot be evaluated by interacting with the real environment during training, early stopping and model selection are difficult [22, 21]; we therefore report performance averaged over the last 50k of 200k update steps, summarized as box plots. CV-Qmix outperforms both Reg-Qmix and real-only training on the Hopper and Sliding tasks. These results highlight a further advantage of CV-Qmix in the offline setting: by reducing the variance of the learning process (most visibly on Hopper), it makes performance less sensitive to the choice of stopping point, which matters when early stopping and model selection are difficult.
7 Related Work
\pm std of 5 seeds.\pm std over 10 seeds), while the plots on the right show offline optimization (box plots over 10 seeds).Off-dynamics RL. Our setting falls within off-dynamics RL [10], where a source and a target MDP differ only in their transition dynamics, and access to the target is limited while the source is cheap to query. Existing methods handle the dynamics mismatch per transition, by correcting, penalizing, or discarding source samples: DARC [10] corrects source rewards using domain classifiers, PAR [26] penalizes them by the representation mismatch across domains, and VGDF [55] discards source transitions whose value targets disagree with those expected under the target dynamics, a criterion closely related to our \Delta^{2}_{V^{T}} term. In contrast, we use simulation data to aid each policy update in the real environment: rather than discarding simulated samples or modifying their rewards, we exploit their correlation with real ones and correct their bias at the policy-evaluation level, through a control-variate formulation of the TD loss (1). We compare against PAR and VGDF in Section 6.
Control variates in RL. Control variates (CV) are a standard variance-reduction tool in RL, e.g., baselines and action-dependent critics in policy-gradient methods [13]. In off-policy evaluation, the doubly robust (DR) estimator [17] combines importance-weighted returns with a learned value model as a CV. DR is designed to debias off-policy data, while we debias off-dynamics data. Moreover, DR applies the CV directly to the policy-evaluation objective, while we apply it to the squared TD error. Statistically, our approach is closer to prediction-powered inference [2], which combines many biased model predictions with a few ground-truth samples to obtain unbiased, lower-variance estimates; here, simulated transitions play the role of the biased predictions.
8 Conclusion
In this paper, we introduced the simulation-aided reinforcement learning and a control variates approach that exploits biased simulator data to reduce variance without negatively biasing the performance on the real environment. Applying control variates to the squared TD error with a stable importance-sampling correction enables seamless integration into both online and offline actor–critic methods. Theory shows that variance reduction improves as the simulator more closely matches the real dynamics. Experiments on MuJoCo tasks demonstrate improved sample efficiency and robustness over standard simulation mixing, especially large under dynamics mismatch.
Notably, our approach is entirely focused on policy evaluation, which is then incorporated into policy optimization algorithms as a building block. Future works may extend our control variates approach to the policy gradient estimate, bringing variance reduction in both the actor-critic components. Another future direction may consider a similar control variates solution to the model-based RL approach, in which we aim to estimate the transition dynamics of the real environment by exploiting information coming from multiple biased simulators.
Finally, our approach requires resetting the simulator to visited real states, and therefore does not directly apply in partially observable settings where the real states cannot be fully accessed [18, 48]. One natural resolution is to adapt our method to such settings by constructing an estimator that predicts the state from partial observations, in the spirit of [40, 42, 35], and to then reset the simulator according to this state-estimation. Curiously, [19] show that training such a predictor over the simulator enables to perform well on real partially-observable environments. While this is only one possible extension, it will be interesting to explore other alternative directions.
Acknowledgments
OH and KYL acknowledge support from the Israel Science Foundation (grant No. 3109/24), and were also partially supported by the Israel PBC-VATAT. IS, MM and AT were funded by the European Union (ERC, Bayes-RL, 101041250). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency (ERCEA). Neither the European Union nor the granting authority can be held responsible for them.
References
Appendix A Proofs
A.1 Proof of Theorem 3.1
To prove the result, we write
\displaystyle\E_{q}[|V_{P_{\mathrm{real}}}^{\pi}(s)-V_{P_{\mathrm{sim}}}^{\pi}(s)|] \\ \displaystyle\;\leq\gamma\E_{q,\pi}\left[\left|\sum_{s^{\prime}\in\mathcal{S}}P_{\mathrm{real}}(s^{\prime}|s,a)V_{P_{\mathrm{real}}}^{\pi}(s^{\prime})-\sum_{s^{\prime}\in\mathcal{S}}P_{\mathrm{sim}}(s^{\prime}|s,a)V_{P_{\mathrm{sim}}}^{\pi}(s^{\prime})\right|\right] \\ \displaystyle\;=\gamma\E_{q,\pi}\left[\left|\sum_{s^{\prime}\in\mathcal{S}}P_{\mathrm{real}}(s^{\prime}|s,a)\Big(V_{P_{\mathrm{real}}}^{\pi}(s^{\prime})-V_{P_{\mathrm{sim}}}^{\pi}(s^{\prime})\Big)+\sum_{s^{\prime}\in\mathcal{S}}V_{P_{\mathrm{sim}}}^{\pi}(s^{\prime})\Big(P_{\mathrm{real}}(s^{\prime}|s,a)-P_{\mathrm{sim}}(s^{\prime}|s,a)\Big)\right|\right] \\ \displaystyle\;\leq\gamma\E_{q}\left[|V_{P_{\mathrm{real}}}^{\pi}(s)-V_{P_{\mathrm{sim}}}^{\pi}(s)|\right]+\frac{\gamma R_{\mathrm{max}}}{(1-\gamma)}\E_{q,\pi}\left[\sum_{s^{\prime}\in\mathcal{S}}\Big|P_{\mathrm{real}}(s^{\prime}|s,a)-P_{\mathrm{sim}}(s^{\prime}|s,a)\Big|\right]by applying the Bellman equation V^{\pi}(s)=\sum_{a\in\mathcal{A}}\pi(a|s)\big(R(s,a)+\gamma\sum_{s^{\prime}\in\mathcal{S}}P(s^{\prime}|s,a)V^{\pi}(s^{\prime})\big) to both V_{P_{\mathrm{real}}}^{\pi}(s) and V_{P_{\mathrm{sim}}}^{\pi}(s) to obtain (6), by summing and subtracting \gamma\E_{q,\pi}[\sum_{s^{\prime}\in\mathcal{S}}V_{P_{\mathrm{sim}}}^{\pi}P_{\mathrm{real}}(s^{\prime}|s,a)] to obtain (7), by exploiting |a+b|\leq|a|+|b|, \sum_{s^{\prime}\in\mathcal{S}}P_{\mathrm{real}}(s^{\prime}|s,a)=1, V^{\pi}_{P_{\mathrm{sim}}}(s)\leq R_{\mathrm{max}}/(1-\gamma), and stationarity of q to obtain (8), from which the result follows.
A.2 Proof of Theorem 4.1
Proof.
Throughout the proof, \theta and the target network are fixed, and all gradients are taken with respect to \theta with V^{T} treated as a constant. We assume that P^{\pi}_{\mathrm{real}} is absolutely continuous w.r.t. P^{\pi}_{\mathrm{sim}}, so that the density ratio w is well defined, and that all the second moments appearing below are finite.
Notation. A sample of \tilde{D}_{\mathrm{real}} is x=(s,a,s^{\prime},\tilde{s}^{\prime}_{1},\dots,\tilde{s}^{\prime}_{K}), where (s,a)\sim P^{\pi}_{\mathrm{real}}, s^{\prime}\sim P_{\mathrm{real}}(s,a), and \tilde{s}^{\prime}_{1},\dots,\tilde{s}^{\prime}_{K} are drawn i.i.d. from P_{\mathrm{sim}}(s,a), independently of s^{\prime} given (s,a). A sample of D_{\mathrm{sim}} is \tilde{x}=(\tilde{s},\tilde{a},\tilde{s}^{\prime}), where (\tilde{s},\tilde{a})\sim P^{\pi}_{\mathrm{sim}} and \tilde{s}^{\prime}\sim P_{\mathrm{sim}}(\tilde{s},\tilde{a}). In (3), the simulated Bellman error is computed with the empirical average of the simulated next-state values,
\delta^{\mathrm{sim}}_{\theta}(x):=Q_{\theta}(s,a)-\big(r(s,a)+\gamma\,\bar{V}_{K}(x)\big),\qquad\bar{V}_{K}(x):=\frac{1}{K}\sum_{k=1}^{K}V^{T}(\tilde{s}^{\prime}_{k}),and \delta^{\mathrm{sim}}_{\theta}(\tilde{x}) is defined analogously with the single next state \tilde{s}^{\prime} (i.e., K=1). We also denote the expected next-state values as
\mu_{\mathrm{real}}(s,a):=\E_{s^{\prime}\sim P_{\mathrm{real}}(s,a)}\big[V^{T}(s^{\prime})\big],\qquad\mu_{\mathrm{sim}}(s,a):=\E_{\tilde{s}^{\prime}\sim P_{\mathrm{sim}}(s,a)}\big[V^{T}(\tilde{s}^{\prime})\big],so that b(s,a)=2\big(Q_{\theta}(s,a)-r(s,a)-\gamma\,\mu_{\mathrm{real}}(s,a)\big)\nabla_{\theta}Q_{\theta}(s,a), \tilde{b}(s,a)=2\big(Q_{\theta}(s,a)-r(s,a)-\gamma\,\mu_{\mathrm{sim}}(s,a)\big)\nabla_{\theta}Q_{\theta}(s,a), and \Delta^{2}_{V^{T}}=\E_{s,a\sim P^{\pi}_{\mathrm{real}}}\big[\big(\mu_{\mathrm{real}}(s,a)-\mu_{\mathrm{sim}}(s,a)\big)^{2}\big].
Preliminary: conditional expectations of the gradients. Since V^{T} is treated as a constant, \nabla_{\theta}\delta^{\mathrm{real}}_{\theta}(x)=\nabla_{\theta}\delta^{\mathrm{sim}}_{\theta}(x)=\nabla_{\theta}Q_{\theta}(s,a), and therefore
\nabla_{\theta}\delta^{\mathrm{real}}_{\theta}(x)^{2}=2\,\delta^{\mathrm{real}}_{\theta}(x)\,\nabla_{\theta}Q_{\theta}(s,a),\qquad\nabla_{\theta}\delta^{\mathrm{sim}}_{\theta}(x)^{2}=2\,\delta^{\mathrm{sim}}_{\theta}(x)\,\nabla_{\theta}Q_{\theta}(s,a).Both gradients are linear in the corresponding TD error. Since Q_{\theta}(s,a), r(s,a) and \nabla_{\theta}Q_{\theta}(s,a) are fixed given (s,a), taking conditional expectations in (9) gives
\displaystyle\E\big[\nabla_{\theta}\delta^{\mathrm{real}}_{\theta}(x)^{2}\,\big|\,s,a\big] \\ \displaystyle=2\big(Q_{\theta}(s,a)-r(s,a)-\gamma\,\E[V^{T}(s^{\prime})\mid s,a]\big)\nabla_{\theta}Q_{\theta}(s,a)=b(s,a), \\ \displaystyle\E\big[\nabla_{\theta}\delta^{\mathrm{sim}}_{\theta}(x)^{2}\,\big|\,s,a\big] \\ \displaystyle=2\big(Q_{\theta}(s,a)-r(s,a)-\gamma\,\E[\bar{V}_{K}(x)\mid s,a]\big)\nabla_{\theta}Q_{\theta}(s,a)=\tilde{b}(s,a),where (11) uses \E[\bar{V}_{K}(x)\mid s,a]=\mu_{\mathrm{sim}}(s,a), which holds for every K\geq 1. In particular, (11) also holds for the samples of D_{\mathrm{sim}} (K=1), i.e., \E\big[\nabla_{\theta}\delta^{\mathrm{sim}}_{\theta}(\tilde{x})^{2}\,\big|\,\tilde{s},\tilde{a}\big]=\tilde{b}(\tilde{s},\tilde{a}).
Proof of (i). Since the samples within each dataset are i.i.d., by linearity of expectation we write
\displaystyle\E[\hat{g}_{\lambda}] \\ \displaystyle=\E_{x}\big[\nabla_{\theta}\delta^{\mathrm{real}}_{\theta}(x)^{2}-\lambda\,\nabla_{\theta}\delta^{\mathrm{sim}}_{\theta}(x)^{2}\big]+\lambda\,\E_{\tilde{x}}\big[w(\tilde{s},\tilde{a})\,\nabla_{\theta}\delta^{\mathrm{sim}}_{\theta}(\tilde{x})^{2}\big] \\ \displaystyle=\E_{s,a\sim P^{\pi}_{\mathrm{real}}}\big[b(s,a)-\lambda\,\tilde{b}(s,a)\big]+\lambda\,\E_{s,a\sim P^{\pi}_{\mathrm{sim}}}\big[w(s,a)\,\tilde{b}(s,a)\big] \\ \displaystyle=\E_{s,a\sim P^{\pi}_{\mathrm{real}}}\big[b(s,a)\big]-\lambda\,\E_{s,a\sim P^{\pi}_{\mathrm{real}}}\big[\tilde{b}(s,a)\big]+\lambda\,\E_{s,a\sim P^{\pi}_{\mathrm{real}}}\big[\tilde{b}(s,a)\big] \\ \displaystyle=\E_{s,a\sim P^{\pi}_{\mathrm{real}}}\big[b(s,a)\big],by applying the tower property together with (10)–(11) to obtain (12), and the definition of the density ratio to obtain (13) as
\E_{s,a\sim P^{\pi}_{\mathrm{sim}}}\big[w(s,a)\,\tilde{b}(s,a)\big]=\sum_{(s,a)}P^{\pi}_{\mathrm{sim}}(s,a)\,\frac{P^{\pi}_{\mathrm{real}}(s,a)}{P^{\pi}_{\mathrm{sim}}(s,a)}\,\tilde{b}(s,a)=\E_{s,a\sim P^{\pi}_{\mathrm{real}}}\big[\tilde{b}(s,a)\big].The right-hand side does not depend on \lambda, hence \E[\hat{g}_{\lambda}]=\E[\hat{g}_{0}]. Finally, by (9) and the tower property, \E_{s,a\sim P^{\pi}_{\mathrm{real}}}[b(s,a)]=\E_{\pi,P_{\mathrm{real}}}\big[2\,\delta_{\theta}(s,a,s^{\prime})\,\nabla_{\theta}Q_{\theta}(s,a)\big]=\nabla_{\theta}\E_{\pi,P_{\mathrm{real}}}\big[\delta_{\theta}(s,a,s^{\prime})^{2}\big], which is the gradient of the TD objective (1) with the target network held fixed.
Proof of (ii). We write \hat{g}_{\lambda}=\frac{1}{n}\sum_{i=1}^{n}u(x_{i})+\frac{\lambda}{N}\sum_{j=1}^{N}v(\tilde{x}_{j}), where
u(x):=\nabla_{\theta}\delta^{\mathrm{real}}_{\theta}(x)^{2}-\lambda\,\nabla_{\theta}\delta^{\mathrm{sim}}_{\theta}(x)^{2},\qquad v(\tilde{x}):=w(\tilde{s},\tilde{a})\,\nabla_{\theta}\delta^{\mathrm{sim}}_{\theta}(\tilde{x})^{2}.The vectors u(x_{1}),\dots,u(x_{n}),v(\tilde{x}_{1}),\dots,v(\tilde{x}_{N}) are independent, the u(x_{i}) are identically distributed, and so are the v(\tilde{x}_{j}). Hence, all the cross terms \E\langle u(x_{i})-\E u,\,u(x_{i^{\prime}})-\E u\rangle for i\neq i^{\prime}, \E\langle v(\tilde{x}_{j})-\E v,\,v(\tilde{x}_{j^{\prime}})-\E v\rangle for j\neq j^{\prime}, and \E\langle u(x_{i})-\E u,\,v(\tilde{x}_{j})-\E v\rangle vanish, and
\mathbb{V}[\hat{g}_{\lambda}]=\frac{1}{n}\,\mathbb{V}[u(x)]+\frac{\lambda^{2}}{N}\,\mathbb{V}[v(\tilde{x})]=\frac{1}{n}\,\mathbb{V}[u(x)]+\frac{\lambda^{2}}{N}\,\sigma^{2}_{\mathrm{IS}},where the last equality follows from the definition of \sigma^{2}_{\mathrm{IS}}. It remains to compute \mathbb{V}[u(x)]. By the law of total variance,
\displaystyle\mathbb{V}[u(x)] \\ \displaystyle=\E_{s,a\sim P^{\pi}_{\mathrm{real}}}\Big[\big\|\E[u(x)\mid s,a]-\E[u(x)]\big\|_{2}^{2}\Big] \\ \displaystyle\quad+\E_{s,a\sim P^{\pi}_{\mathrm{real}}}\Big[\E\big[\|u(x)-\E[u(x)\mid s,a]\|_{2}^{2}\,\big|\,s,a\big]\Big],where the cross term vanishes since \E\big[u(x)-\E[u(x)\mid s,a]\,\big|\,s,a\big]=0.
For the first term of (15), by (10)–(11) we have \E[u(x)\mid s,a]=b(s,a)-\lambda\,\tilde{b}(s,a) and \E[u(x)]=\E_{s,a\sim P^{\pi}_{\mathrm{real}}}[b(s,a)-\lambda\,\tilde{b}(s,a)], so that the first term equals \mathbb{V}[b-\lambda\tilde{b}], with b,\tilde{b} evaluated at (s,a)\sim P^{\pi}_{\mathrm{real}}.
For the second term of (15), by (9) and the definition of the TD errors, we write
\displaystyle u(x)-\E[u(x)\mid s,a] \\ \displaystyle=2\big(\delta^{\mathrm{real}}_{\theta}(x)-\E[\delta^{\mathrm{real}}_{\theta}(x)\mid s,a]\big)\nabla_{\theta}Q_{\theta}(s,a) \\ \displaystyle\quad-2\lambda\big(\delta^{\mathrm{sim}}_{\theta}(x)-\E[\delta^{\mathrm{sim}}_{\theta}(x)\mid s,a]\big)\nabla_{\theta}Q_{\theta}(s,a) \\ \displaystyle=-2\gamma\Big(\big(V^{T}(s^{\prime})-\mu_{\mathrm{real}}(s,a)\big)-\lambda\big(\bar{V}_{K}(x)-\mu_{\mathrm{sim}}(s,a)\big)\Big)\nabla_{\theta}Q_{\theta}(s,a).Taking the squared norm of (16) and the conditional expectation, we obtain
\displaystyle\E\big[\|u(x)-\E[u(x)\mid s,a]\|_{2}^{2}\,\big|\,s,a\big] \\ \displaystyle\quad=4\gamma^{2}\,\|\nabla_{\theta}Q_{\theta}(s,a)\|_{2}^{2}\;\E\Big[\big(\big(V^{T}(s^{\prime})-\mu_{\mathrm{real}}(s,a)\big)-\lambda\big(\bar{V}_{K}(x)-\mu_{\mathrm{sim}}(s,a)\big)\big)^{2}\,\Big|\,s,a\Big] \\ \displaystyle\quad=4\gamma^{2}\,\|\nabla_{\theta}Q_{\theta}(s,a)\|_{2}^{2}\,\Big(\mathbb{V}_{s^{\prime}\sim P_{\mathrm{real}}(s,a)}\big[V^{T}(s^{\prime})\big]+\lambda^{2}\,\mathbb{V}\big[\bar{V}_{K}(x)\mid s,a\big]\Big) \\ \displaystyle\quad=4\gamma^{2}\,\|\nabla_{\theta}Q_{\theta}(s,a)\|_{2}^{2}\,\Big(\mathbb{V}_{s^{\prime}\sim P_{\mathrm{real}}(s,a)}\big[V^{T}(s^{\prime})\big]+\frac{\lambda^{2}}{K}\,\mathbb{V}_{\tilde{s}^{\prime}\sim P_{\mathrm{sim}}(s,a)}\big[V^{T}(\tilde{s}^{\prime})\big]\Big),where we obtain (17) since s^{\prime} and \tilde{s}^{\prime}_{1},\dots,\tilde{s}^{\prime}_{K} are independent given (s,a), so that the cross term vanishes,
\displaystyle\E\big[(V^{T}(s^{\prime})-\mu_{\mathrm{real}}(s,a))(\bar{V}_{K}(x)-\mu_{\mathrm{sim}}(s,a))\,\big|\,s,a\big] \\ \displaystyle\quad=\E\big[V^{T}(s^{\prime})-\mu_{\mathrm{real}}(s,a)\,\big|\,s,a\big]\,\E\big[\bar{V}_{K}(x)-\mu_{\mathrm{sim}}(s,a)\,\big|\,s,a\big]=0,and we obtain (18) since \bar{V}_{K}(x) is the average of K i.i.d. samples of V^{T}(\tilde{s}^{\prime}) with \tilde{s}^{\prime}\sim P_{\mathrm{sim}}(s,a). Taking the expectation of (18) over (s,a)\sim P^{\pi}_{\mathrm{real}}, the second term of (15) equals \sigma_{T}^{2}+\lambda^{2}\tilde{\sigma}_{T}^{2}/K by the definitions of \sigma_{T}^{2} and \tilde{\sigma}_{T}^{2}. Plugging both terms into (15), and then into (14), gives (ii).
Proof of (iii). By expanding the squared norm in the definition of the variance, we have
\mathbb{V}[b-\lambda\tilde{b}]=\E\big\|(b-\E b)-\lambda(\tilde{b}-\E\tilde{b})\big\|_{2}^{2}=\mathbb{V}[b]-2\lambda\,\mathrm{Cov}(b,\tilde{b})+\lambda^{2}\,\mathbb{V}[\tilde{b}].Plugging it into (ii) and denoting C:=\mathrm{Cov}(b,\tilde{b}) and D:=\mathbb{V}[\tilde{b}]+\tilde{\sigma}_{T}^{2}/K+n\,\sigma^{2}_{\mathrm{IS}}/N, we obtain
n\,\mathbb{V}[\hat{g}_{\lambda}]=\mathbb{V}[b]+\sigma_{T}^{2}-2\lambda\,C+\lambda^{2}D.If D>0, the right-hand side of (19) is a strictly convex quadratic function of \lambda. Setting its derivative -2C+2\lambda D to zero gives the minimizer \lambda^{\star}=C/D, and substituting it back into (19) gives
n\,\mathbb{V}[\hat{g}_{\lambda^{\star}}]=\mathbb{V}[b]+\sigma_{T}^{2}-\frac{C^{2}}{D}.Setting \lambda=0 in (19) gives n\,\mathbb{V}[\hat{g}_{0}]=\mathbb{V}[b]+\sigma_{T}^{2}, the variance of real-only TD. Since C^{2}/D\geq 0, we conclude \mathbb{V}[\hat{g}_{\lambda^{\star}}]\leq\mathbb{V}[\hat{g}_{0}], with equality if and only if C=0. If instead D=0, then \mathbb{V}[\tilde{b}]=0 and, by the Cauchy–Schwarz inequality, |C|\leq\sqrt{\mathbb{V}[b]\,\mathbb{V}[\tilde{b}]}=0, so that (19) does not depend on \lambda and the claim holds trivially (with \lambda^{\star}:=0). Finally, the Cauchy–Schwarz inequality also gives C^{2}\leq\mathbb{V}[b]\,\mathbb{V}[\tilde{b}]\leq\mathbb{V}[b]\,D, so that (20) is bounded from below by \sigma_{T}^{2}: no choice of \lambda reduces the variance below the real transition noise.
Proof of (iv). We write b-\lambda\tilde{b}=(1-\lambda)\,b+\lambda\,(b-\tilde{b}). For any random vectors X,Y, applying \|x+y\|_{2}^{2}\leq 2\|x\|_{2}^{2}+2\|y\|_{2}^{2} to x=X-\E X and y=Y-\E Y and taking expectations gives \mathbb{V}[X+Y]\leq 2\,\mathbb{V}[X]+2\,\mathbb{V}[Y]. With X=(1-\lambda)\,b and Y=\lambda\,(b-\tilde{b}), we get
\mathbb{V}[b-\lambda\tilde{b}]\leq 2(1-\lambda)^{2}\,\mathbb{V}[b]+2\lambda^{2}\,\mathbb{V}[b-\tilde{b}].At each (s,a), the terms Q_{\theta}(s,a), r(s,a) and \nabla_{\theta}Q_{\theta}(s,a) are the same in b and \tilde{b}, so that they cancel in the difference, giving
b(s,a)-\tilde{b}(s,a)=2\gamma\,\big(\mu_{\mathrm{sim}}(s,a)-\mu_{\mathrm{real}}(s,a)\big)\,\nabla_{\theta}Q_{\theta}(s,a).Then, we write
\displaystyle\mathbb{V}[b-\tilde{b}] \\ \displaystyle\leq\E_{s,a\sim P^{\pi}_{\mathrm{real}}}\big\|b(s,a)-\tilde{b}(s,a)\big\|_{2}^{2} \\ \displaystyle=4\gamma^{2}\,\E_{s,a\sim P^{\pi}_{\mathrm{real}}}\Big[\big(\mu_{\mathrm{real}}(s,a)-\mu_{\mathrm{sim}}(s,a)\big)^{2}\,\|\nabla_{\theta}Q_{\theta}(s,a)\|_{2}^{2}\Big] \\ \displaystyle\leq 4\gamma^{2}G^{2}\,\E_{s,a\sim P^{\pi}_{\mathrm{real}}}\Big[\big(\mu_{\mathrm{real}}(s,a)-\mu_{\mathrm{sim}}(s,a)\big)^{2}\Big]=4\gamma^{2}G^{2}\,\Delta^{2}_{V^{T}},by exploiting \mathbb{V}[X]=\E\|X\|_{2}^{2}-\|\E X\|_{2}^{2}\leq\E\|X\|_{2}^{2} to obtain (23), by (22) and \|c\,z\|_{2}^{2}=c^{2}\|z\|_{2}^{2} for a scalar c to obtain (24), and by \|\nabla_{\theta}Q_{\theta}(s,a)\|_{2}\leq G for all (s,a), together with the definition of \Delta^{2}_{V^{T}}, to obtain (25). Plugging (25) into (21) gives (iv). ∎
A.3 Proof of Unbiased Gradients with Masking
Proof.
For the masked loss version we have
\E[\hat{g}_{\lambda}]=\E\!\left[\nabla_{\theta}\delta_{\theta}^{\mathrm{real}}(x)^{2}-\lambda\mathbb{I}_{m}\nabla_{\theta}\delta_{\theta}^{\mathrm{sim}}(x)^{2}\right]+\E\!\left[\lambda\mathbb{I}_{m}w(\tilde{s},\tilde{a})\nabla_{\theta}\delta_{\theta}^{\mathrm{sim}}(\tilde{x})^{2}\right].By definition of the density ratio w(s,a), we have
\E_{\tilde{x}\sim P^{\pi}_{\mathrm{sim}}}\!\left[w(\tilde{s},\tilde{a})\mathbb{I}_{m}\nabla_{\theta}\delta_{\theta}^{\mathrm{sim}}(\tilde{x})^{2}\right]=\E_{x\sim P^{\pi}_{\mathrm{real}}}\!\left[\mathbb{I}_{m}\nabla_{\theta}\delta_{\theta}^{\mathrm{sim}}(x)^{2}\right].Therefore, the simulator terms cancel, yielding
\E[\hat{g}_{\lambda}]=\E\!\left[\nabla_{\theta}\delta_{\theta}^{\mathrm{real}}(x)^{2}\right].This is exactly the gradient of the squared TD error objective, implying that \hat{g}_{\lambda} is an unbiased estimator. ∎
Appendix B Robustness to Simulation Bias Experiment
\pm std over 5 seeds).We study the behavior of simulation mixing methods across a range of sim-to-real gaps, by progressively increasing the deviation of simulator parameters from the real environment. To this end, we use the online SAC variant in which, for both mixing methods (Reg-Qmix and CV-Qmix), we conservatively perform one policy update per real environment interaction, while incorporating a large number of additional interactions using simulated data.
In these experiments, we additionally evaluate the MuJoCo Ant and Walker2D tasks. For the Ant task, we reduce the motor strength in the real environment to 30\% of its default value. In our testing we observed that lowering motor strength of Ant amplifies the effect of dynamics mismatches, making performance degradation under sim-to-real transfer more pronounced, creating a meaningful bias for evaluation.
In this experiment, we vary joint damping, armature, and joint friction to construct simulators with progressively increasing dynamics mismatch relative to M_{\mathrm{real}} (from left to right in Fig. 4). For exact experiments setup details see appendix C.3.
Across both tasks, when M_{\mathrm{sim}} is close to M_{\mathrm{real}}, both regular mixing and CV mixing improve policy performance relative to training on real data alone. However, as the dynamics mismatch increases, regular mixing degrades performance, whereas CV mixing remains comparable to the real-only baseline. These results highlight the robustness of CV mixing, which mitigates the introduction of simulator-induced bias that can otherwise destabilize the optimization process.
Appendix C Experiments Setup
C.1 Training Hyper parameters
- critic learning rate
- 0.0003
- 0.0003
- policy learning rate
- 0.0003
- 0.0003
- real step frequency
- 1
- 1
- batch size real
- 128
- 128
- batch size sim
- 128
- 128
- replay buffer size real
- 100000
- 100000
- replay buffer size sim
- 11000000
- 11000000
- sim step frequency
- 1
- 1
- num steps in sim
- 10
- 10
- critic update frequency
- 1
- 1
- target network update frequency
- 1
- 1
- \tau
- 0.005
- 0.005
- \gamma
- 0.99
- 0.99
- policy update frequency
- 2
- 2
- policy update steps
- 2
- 2
- classifier update frequency
- 10
- 10
- classifier update steps
- 10
- 10
- classifier learning rate
- 0.0003
- 0.0003
- classifier batch size
- 128
- 128
- initial \lambda
- 0
- 0
- \lambda decay
- 0.001
- 0.001
- SAC \alpha
- 0.05
- 0.2
- CV mask \beta
- 3.0
- 3.0
C.2 Off-Dynamics finetuning benchmark Hyper parameters
- critic learning rate
- 0.0003
- 0.0003
- policy learning rate
- 0.0003
- 0.0003
- total real env steps
- 100000
- 200000
- real step frequency
- 1
- 1
- batch size real
- 128
- 128
- replay buffer size real
- 100000
- 100000
- learning starts
- 25000
- 5000
- critic update frequency
- 1
- 1
- target network update frequency
- 1
- 1
- \tau
- 0.005
- 0.005
- \gamma
- 0.99
- 0.99
- policy update frequency
- 2
- 2
- policy update steps
- 2
- 2
- SAC \alpha
- auto-tuned
- 0.2
- critic learning rate
- 0.0003
- 0.0003
- policy learning rate
- 0.0003
- 0.0003
- total update steps
- 1000000
- 1000000
- real step frequency
- 5
- 5
- sim step frequency
- 1
- 1
- num steps in sim
- 100
- 100
- batch size real
- 128
- 128
- batch size sim
- 128
- 128
- policy batch size
- 128
- 128
- replay buffer size real
- 100000
- 100000
- replay buffer size sim
- 1000000
- 1000000
- learning starts
- 5000
- 5000
- critic update frequency
- 1
- 1
- target network update frequency
- 1
- 1
- \tau
- 0.005
- 0.005
- \gamma
- 0.99
- 0.99
- policy update frequency
- 2
- 2
- policy update steps
- 2
- 2
- actor-critic grad-norm clip
- 100
- 100
- dynamics ensemble size / elites
- 7 / 5
- 7 / 5
- dynamics hidden dim
- 200
- 200
- dynamics learning rate
- 0.001
- 0.001
- dynamics batch size
- 256
- 256
- dynamics train frequency
- 250
- 250
- dynamics holdout ratio
- 0.1
- 0.1
- likelihood gate threshold
- 0.75
- 0.75
- sim samples before gating
- 100000
- 100000
- optimistic exploration
- True
- True
- SAC \alpha
- auto-tuned
- 0.2
C.3 MuJoCo environment setting
- gravity
- -9.81
- -8.82
- -7.84
- -6.86
- floor friction
- 1.0
- 0.8
- 0.8
- 0.7
- torso length
- 0.2
- 0.24
- 0.24
- 0.26
Appendix D Additional Implementation Details
To improve the stability of the practical CV loss (4) We clipped the loss value so it cannot be negative. In our experiments this helps the performance of CV-Qmix.
L_{\mathrm{CV}}^{\mathrm{clip}}(\theta)=\mathrm{clip}(L_{\mathrm{CV}}(\theta),0,\infty)Appendix E The role of \lambda in CV-Qmix
- Small
- 0.37\pm 0.02
- 0.45\pm 0.06
- Medium
- 0.21\pm 0.01
- 0.32\pm 0.06
- Large
- 0.08\pm 0.02
- 0.25\pm 0.05
The learned adaptive coefficient \lambda also exhibited a clear relationship with the simulator mismatch (see table 18). when the simulator is strongly correlated with the real environment, the method assigns it a larger weight, whereas under a large mismatch the simulator contribution is automatically suppressed. This supports the interpretation of \lambda as both a diagnostic of real–sim correlation and a soft gating mechanism for simulated information.
Appendix F Compute Resources
For all experiments, we used two NVIDIA L40S GPUs. The computational requirements of our method are modest, and the experiments can be run on standard GPUs with as little as 4GB of VRAM. Each experiment reported in the paper required approximately one day to complete.
Appendix G Puck Sliding Environment
(x,y) plane, along with a puck that can slide on the surface. The objective is for the arm to strike the puck so that it reaches a target location on the plane, which is placed far from the robot. The puck, arms joints, target positions are randomized at each episode.