Introduction
Reinforcement Learning (RL) offers great potential for robotics but faces a significant hurdle: the "reality gap." Training directly on physical hardware is slow and risky, yet simulators often fail to capture the nuances of real-world physics. Neural Posterior Domain Randomization (NPDR) addresses this by using neural likelihood-free inference to automatically refine simulator parameters based on a small set of real-world observations.
The Challenge of Domain Randomization
Standard Domain Randomization (DR) attempts to bridge the gap by training policies across a variety of simulated environments. However, these methods typically rely on manually defined, simple distributions (e.g., uniform or Gaussian) that assume parameters are independent. In reality, physical parameters like mass, friction, and length are often highly correlated. Existing guided DR methods frequently require differentiable simulators, which are not always available for complex physics engines.
Methodology: NPDR
NPDR introduces an iterative loop consisting of two phases: policy optimization and posterior estimation. The framework treats the simulator as a "black box," making it compatible with non-differentiable engines like MuJoCo or Bullet.
The core technical contribution is the use of Sequential Neural Posterior Estimation (SNPE-C) with normalizing flows (specifically Masked Autoregressive Flows). This allows NPDR to represent complex, multi-modal, and non-linear parameter distributions. Additionally, the authors implement segment-wise synchronization to handle chaotic dynamics by periodically resetting the simulator state to match real-world observations, preventing trajectories from diverging too quickly during the inference process.
Experimental Evaluation
The researchers tested NPDR on three tasks of increasing complexity:
- Pendulum (Sim-to-Sim): Validating the recovery of ground truth parameter manifolds.
- Robot Mini Golf (Sim-to-Real): A contact-rich task involving 10 parameters such as ball radius, restitution, and friction.
- Furuta Pendulum (Sim-to-Real): An underactuated control problem requiring precise swing-up and balance maneuvers.
Key Insights and Results
NPDR demonstrates a superior ability to capture the "manifolds" of valid parameter combinations. While baseline methods like BayesSim often fail by assuming parameter independence, NPDR's use of normalizing flows allows it to identify sharp, non-linear correlations where multiple parameter combinations might explain the same observed behavior.
In the Mini Golf experiment, NPDR achieved a Root-Mean-Square Error (RMSE) of $7.19 \times 10^{-3}$, nearly an order of magnitude lower than BayesSim ($2.19 \times 10^{-2}$). On the Furuta Pendulum, NPDR was the only method capable of producing a policy that successfully performed the real-world swing-up maneuver, achieving a return of $2.02 \times 10^3$, significantly outperforming nominal baselines.
Conclusion
NPDR provides a robust framework for sim-to-real transfer by leveraging the expressive power of normalizing flows within a likelihood-free inference loop. While limited by the inherent expressiveness of the underlying simulator, it significantly improves sample efficiency and policy robustness compared to traditional domain randomization techniques, making it a practical choice for expensive or fragile robotic hardware.
Summary updated