Table of Contents
Fetching ...

Accelerated Policy Learning with Parallel Differentiable Simulation

Jie Xu, Viktor Makoviychuk, Yashraj Narang, Fabio Ramos, Wojciech Matusik, Animesh Garg, Miles Macklin

TL;DR

Deep RL requires enormous training data for control policies, especially in high-dimensional, contact-rich dynamics. The authors introduce SHAC (Short-Horizon Actor-Critic) paired with a GPU-accelerated differentiable simulator to exploit analytic gradients while mitigating gradient instability through a smooth critic and truncated backpropagation. SHAC demonstrates superior sample efficiency and competitive wall-clock time across classic benchmarks and scales to a 152-DoF muscle-actuated humanoid, achieving substantial speedups over state-of-the-art RL methods. This work shows the practical viability of gradient-based policy learning with differentiable simulation for robotics and animation applications.

Abstract

Deep reinforcement learning can generate complex control policies, but requires large amounts of training data to work effectively. Recent work has attempted to address this issue by leveraging differentiable simulators. However, inherent problems such as local minima and exploding/vanishing numerical gradients prevent these methods from being generally applied to control tasks with complex contact-rich dynamics, such as humanoid locomotion in classical RL benchmarks. In this work we present a high-performance differentiable simulator and a new policy learning algorithm (SHAC) that can effectively leverage simulation gradients, even in the presence of non-smoothness. Our learning algorithm alleviates problems with local minima through a smooth critic function, avoids vanishing/exploding gradients through a truncated learning window, and allows many physical environments to be run in parallel. We evaluate our method on classical RL control tasks, and show substantial improvements in sample efficiency and wall-clock time over state-of-the-art RL and differentiable simulation-based algorithms. In addition, we demonstrate the scalability of our method by applying it to the challenging high-dimensional problem of muscle-actuated locomotion with a large action space, achieving a greater than 17x reduction in training time over the best-performing established RL algorithm.

Accelerated Policy Learning with Parallel Differentiable Simulation

TL;DR

Deep RL requires enormous training data for control policies, especially in high-dimensional, contact-rich dynamics. The authors introduce SHAC (Short-Horizon Actor-Critic) paired with a GPU-accelerated differentiable simulator to exploit analytic gradients while mitigating gradient instability through a smooth critic and truncated backpropagation. SHAC demonstrates superior sample efficiency and competitive wall-clock time across classic benchmarks and scales to a 152-DoF muscle-actuated humanoid, achieving substantial speedups over state-of-the-art RL methods. This work shows the practical viability of gradient-based policy learning with differentiable simulation for robotics and animation applications.

Abstract

Deep reinforcement learning can generate complex control policies, but requires large amounts of training data to work effectively. Recent work has attempted to address this issue by leveraging differentiable simulators. However, inherent problems such as local minima and exploding/vanishing numerical gradients prevent these methods from being generally applied to control tasks with complex contact-rich dynamics, such as humanoid locomotion in classical RL benchmarks. In this work we present a high-performance differentiable simulator and a new policy learning algorithm (SHAC) that can effectively leverage simulation gradients, even in the presence of non-smoothness. Our learning algorithm alleviates problems with local minima through a smooth critic function, avoids vanishing/exploding gradients through a truncated learning window, and allows many physical environments to be run in parallel. We evaluate our method on classical RL control tasks, and show substantial improvements in sample efficiency and wall-clock time over state-of-the-art RL and differentiable simulation-based algorithms. In addition, we demonstrate the scalability of our method by applying it to the challenging high-dimensional problem of muscle-actuated locomotion with a large action space, achieving a greater than 17x reduction in training time over the best-performing established RL algorithm.
Paper Structure (43 sections, 21 equations, 13 figures, 12 tables, 1 algorithm)

This paper contains 43 sections, 21 equations, 13 figures, 12 tables, 1 algorithm.

Figures (13)

  • Figure 1: Environments: Here are some of our environments for evaluation. Three classical physical control RL benchmarks of increasing difficulty, from left: Cartpole Swing Up + Balance, Ant, and Humanoid. In addition, we train the policy for the high-dimensional muscle-tendon driven Humanoid MTU model from park2019. Whereas model-free reinforcement learning (PPO, SAC) needs many samples for such high-dimensional control problems, SHAC scales efficiently through the use of analytic gradients from differentiable simulation with a parallelized implementation, both in sample complexity and wall-clock time.
  • Figure 2: Landscape comparison between BPTT and SHAC. We select one single weight from a policy and change its value by $\Delta\theta_k \in [-1, 1]$ to plot the task loss landscapes of BPTT and SHAC w.r.t. one policy parameter. The task horizon is $H = 1000$ for BPTT, and the short horizon length for our method is $h = 32$. As we can see, longer optimization horizons lead to noisy loss landscape that are difficult to optimize, and the landscape of our method can be regarded as a smooth approximation of the real landscape.
  • Figure 3: Computation graph of BPTT and SHAC. Top: BPTT propagates gradients through an entire trajectory in each learning episode. This leads to noisy loss landscapes, increased memory, and numerical gradient problems. Bottom: SHAC subdivides the trajectory into short optimization windows across learning episodes. This results in a smoother surrogate reward function and reduces memory requirements, enabling parallel sampling of many trajectories. The environment is reset upon early termination happens. Solid arrows denote gradient-preserving computations; dashed arrows denote locations at which the gradients are cut off.
  • Figure 4: Learning curves comparison on four benchmark problems. Each column corresponds to a particular problem, with the top plot evaluating sample efficiency and the bottom plot evaluating wall-clock time efficiency. For better visualization, we truncate all the curves up to the maximal simulation steps/wall-clock time of our method (except for Humanoid MTU), and we provide the full plots in Appendix \ref{['appendix:results']}. Each curve is averaged from five random seeds, and the shaded area shows the standard deviation. SHAC is more sample efficient than all baselines. Model-free baselines are competitive on wall-clock time on pedagogical environments such as the cartpole, but are much less effective as the problem complexity scales.
  • Figure 5: Humanoid MTU: A sequence of frames from a learned running gait. The muscle unit color indicates the activation level at the current state.
  • ...and 8 more figures