NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Transfer of Samples in Policy Search via Multiple Importance Sampling

Andrea Tirinzoni, Mattia Salvini, Marcello Restelli

Introduction

Reinforcement Learning (RL) is notoriously sample-hungry. A common goal is to reuse data from past "source" tasks to accelerate learning on a new "target" task. While relatively straightforward in value-based RL, transferring experience is much harder in Policy Search. This paper introduces a robust framework for transferring entire trajectories of experience between different RL tasks using Multiple Importance Sampling (MIS). By combining adaptive batch sizes, control variates, and a novel "MSE-aware" model estimation technique, the authors provide a way to speed up policy search while theoretically guaranteeing protection against negative transfer—the phenomenon where old data actually degrades learning performance.

The Challenge of Policy Search Transfer

Policy search methods often require estimating gradients over entire trajectories. When attempting to use data from a different environment (e.g., one with different physics or dynamics), researchers use "importance weights" to correct for those differences. However, over long sequences, these weights tend to explode or vanish, leading to massive variance that renders gradient estimates useless. Furthermore, if the source tasks are too dissimilar to the target task, the agent might learn the wrong behaviors entirely, resulting in negative transfer.

Methodology

The authors propose a methodology built on three main pillars to safely and efficiently transfer samples:

  1. Multiple Importance Sampling (MIS): Instead of standard Importance Sampling (IS)—which compares one source to one target—MIS treats the available data as a mixture of samples from multiple "proposals." By including a small batch of samples from the actual target task (acting as "defensive" samples), the importance weights are mathematically guaranteed to stay within a reasonable range. This prevents the infinite variance issues common in off-policy trajectory evaluation.
  2. Variance Reduction Techniques:
  3. Per-decision Estimators: Rewards at each timestep are weighted only by the probabilities of the preceding events, rather than the entire trajectory.
  4. Regression-based Control Variates (CVs): A baseline is used to cancel out noise in the gradient estimate without introducing bias.
  5. MSE-aware Model Estimation: In realistic scenarios, the exact transition physics of the new task are unknown. Instead of simply fitting a model to be as accurate as possible in a general sense, the authors derive a way to estimate the model by directly minimizing the Mean Square Error (MSE) of the resulting gradient estimator. This ensures the learned model is optimized specifically for the purpose of transfer.

Experiments and Key Results

The authors evaluated their approach on three simulated control environments of increasing complexity, proving that their estimator (using optimal control variates) is robust against negative transfer. Essentially, the transfer version will not perform worse than a standard "learn from scratch" algorithm.

Linear-Quadratic Regulator (LQR)

LQR is a classic 1D control problem used to verify the mathematical foundations and robustness to negative transfer. The MIS estimator with control variates (PDCV-MIS) significantly outperformed the standard REINFORCE algorithm (GPOMDP) and traditional per-decision IS (PD-IS). Notably, PD-IS actually suffered from negative transfer, performing worse than learning from scratch, whereas the proposed MIS methods remained robust.

LQR Results: Parameter error over episodes showing the superiority of PDCV-MIS and the negative transfer suffered by PD-IS.

Cart-pole and Minigolf

The framework was further tested on the Cart-pole balancing benchmark (transferring between carts with different masses and pole lengths) and a Minigolf environment (involving friction, hole size, and putter length variations). Minigolf is particularly challenging because the noise is non-Gaussian and changes between tasks.

In the Cart-pole environment, the "MSE-aware" model estimation (using Gaussian Processes) performed almost as well as an "Ideal" scenario where true physics were known from the start, achieving high expected returns in roughly half the episodes required by the no-transfer baseline. In Minigolf, despite heteroscedastic and non-Gaussian noise violating some theoretical assumptions, the algorithm still provided a noticeable speedup and successfully solved the task where baselines struggled.

Cartpole and Minigolf Results: Expected return over episodes. MSE-aware methods closely track the ideal performance and significantly outperform no-transfer baselines.

Limitations and Future Work

While powerful, the current framework assumes that the state space, action space, and reward functions are shared across all tasks; only the transition dynamics (the physics) are allowed to change. Additionally, estimating models via Gaussian Processes and solving the regression for control variates adds computational overhead compared to vanilla policy gradients.

A promising future direction suggested by the authors is applying these MIS concepts directly to the Policy Gradient Theorem. This would involve weighting the stationary distribution of states rather than entire trajectories, potentially unlocking even more efficient data reuse in reinforcement learning.

Summary updated

BibTeX
@inproceedings{tirinzoni2019transfer,
  author = {Andrea Tirinzoni and Mattia Salvini and Marcello Restelli},
  title = {{Transfer of Samples in Policy Search via Multiple Importance Sampling}},
  booktitle = {International Conference on Machine Learning},
  year = {2019},
}
Figure