Source-linked AI summary

Guided Cost Learning: Deep Inverse Optimal Control via Policy Optimization

Chelsea Finn, Sergey Levine, Pieter Abbeel

arXiv:1603.00448v3cs.LGcs.AIcs.RO

TL;DR

IOC must learn a task-encoding cost despite ambiguity, limited features, and unknown dynamics in complex continuous systems. The paper introduces guided cost learning, which combines nonlinear cost functions with sample-based maximum-entropy IOC and policy optimization. Evaluations on simulated and real robotic tasks show improved performance over prior IOC methods, while complex skills can yield locally explanatory costs that are difficult to reoptimize globally.

  • Problem

    IOC must learn task-encoding costs despite underdetermination, limited feature representations, and difficult forward optimization under unknown dynamics.

  • Method

    Guided cost learning uses nonlinear cost functions, sample-based maximum-entropy IOC, and policy optimization to learn costs and policies under unknown dynamics.

  • Results

    The method outperforms prior IOC methods on simulated benchmarks and learns real-world robotic manipulation behaviors from human demonstrations without hand-specified cost features.

  • Takeaways & Limitations

    Interleaving cost optimization with policy learning enables successful behaviors even when learned costs explain complex robotic demonstrations only locally.

  • Takeaways & Limitations

    For complex robotic motion skills, learned cost functions tend to explain demonstrations only locally, making reoptimization from scratch under new conditions difficult.

Abstract

from arXiv · show

Reinforcement learning can acquire complex behaviors from high-level specifications. However, defining a cost function that can be optimized effectively and encodes the correct task is challenging in practice. We explore how inverse optimal control (IOC) can be used to learn behaviors from demonstrations, with applications to torque control of high-dimensional robotic systems. Our method addresses two key challenges in inverse optimal control: first, the need for informative features and effective regularization to impose structure on the cost, and second, the difficulty of learning the cost function under unknown dynamics for high-dimensional continuous systems. To address the former challenge, we present an algorithm capable of learning arbitrary nonlinear cost functions, such as neural networks, without meticulous feature engineering. To address the latter challenge, we formulate an efficient sample-based approximation for MaxEnt IOC. We evaluate our method on a series of simulated tasks and real-world robotic manipulation problems, demonstrating substantial improvement over prior methods both in terms of task complexity and sample efficiency.

1. Introduction

The paper targets two central IOC difficulties: structuring underdetermined costs and learning them in complex systems with unknown dynamics. Guided cost learning combines expressive cost representations with policy optimization to learn costs and policies from demonstrations.

  • Challenges: IOC is underdefined because many costs can induce the same behavior, while forward optimization is difficult in high-dimensional systems with unknown dynamics.
  • Representation: Neural networks provide expressive nonlinear cost representations without requiring carefully engineered features.The approach also introduces general and episodic-domain regularization to impose structure on these costs.
  • Method: Guided cost learning uses policy optimization to adaptively sample trajectories for estimating the IOC partition function.Samples collected for policy improvement also update the cost function.
  • Contributions: The method learns nonlinear costs while simultaneously learning a policy for the task, supporting high-dimensional unknown dynamics and real physical systems.Policy optimization guides cost learning toward good regions of the space.
  • Evaluation: The evaluation covers simulated benchmarks and two real-world robotic manipulation tasks learned directly from human demonstrations without hand-specified cost features.

2. Related Work

Prior IOC methods address ambiguity and unknown dynamics through probabilistic models, handcrafted features, and sample-based approaches. This work instead adapts sampling with policy optimization while combining unknown-dynamics handling, high-dimensional systems, and expressive raw-state cost functions.

  • IOC foundations: IOC addresses underdetermined costs through maximum-margin formulations and probabilistic models that treat suboptimal behavior as noise.
  • Cost representations: Handcrafted domain features impose structure on costs but substantially increase the engineering burden.
  • Cost representations: The proposed method uses neural networks to learn nonlinear costs directly from raw state representations rather than engineered features.
  • Sample-based IOC: Sample-based IOC methods can handle unknown dynamics, but guided cost learning adapts the sampling distribution using policy optimization.The paper reports that this adaptation is crucial for complex robotic platforms with nonlinear cost functions.
  • Positioning: The method combines unknown-dynamics handling, high-dimensional systems, and expressive multilayer neural-network costs in one algorithm.

3. Preliminaries and Overview

The paper adopts maximum-entropy IOC and approximates its difficult partition function with samples, enabling learning without a known dynamics model. It represents costs with expressive functions that can operate on raw system states.

  • Maximum-entropy IOC: Maximum-entropy IOC models demonstrations as stochastic, near-optimal trajectories sampled according to their costs.
  • Partition function: The partition function is the main computational challenge because exact computation is practical only in small, discrete domains.
  • Sample-based approximation: The paper uses a sample-based approximation because it enables IOC without known system dynamics, which is important for robotic manipulation with unknown object properties.
  • Cost representation: Instead of hand-crafted linear features, the method explores high-dimensional expressive function approximators for costs computed from raw sensory input.

4. Guided Cost Learning

Guided cost learning combines sample-based maximum-entropy IOC with policy optimization so sampling adapts toward low-cost trajectories while learning under unknown dynamics. The method jointly updates a nonlinear cost and a controller using demonstrations and policy-improvement samples.

  • Guided cost learning: Guided cost learning adapts the trajectory sampling distribution toward the maximum-entropy cost distribution while optimizing the policy.It interleaves IOC cost updates with policy optimization to generate samples in regions favored by the current cost.
  • Cost optimization: The IOC objective uses importance sampling over demonstration and background trajectories, with stochastic gradients applicable to nonlinear function approximators.Demonstration batches are added to background batches during stochastic optimization, and gradients can be computed efficiently for neural-network costs.
  • Policy optimization: The method uses time-varying linear models and modified LQR updates to optimize policies under unknown dynamics.The trajectory distribution is updated iteratively from samples collected under the current controller.
  • Algorithm: Each iteration generates trajectory samples, appends them to the background set, updates the cost, and then updates the trajectory distribution.Algorithm 1 returns optimized cost parameters and a trajectory distribution after repeated policy-optimization steps.
  • Importance weights: The approach estimates importance weights across samples from multiple controller-induced distributions and approximates the unknown demonstration distribution with a single Gaussian.The Gaussian approximation uses the demonstrations’ empirical mean and variance and was reported sufficiently accurate for estimating their importance weights.
  • Learning costs and controllers: Unlike many previous IOC methods, the algorithm learns a cost and controller simultaneously for a new task instance not present in the demonstrations.The resulting controller can execute the desired behavior on the new instance while using the learned cost.

5. Representation and Regularization

The method uses neural-network cost functions to avoid hand-designed features and adds regularization to control the complexity of nonlinear IOC. A temporal smoothness regularizer reduces high-frequency cost variation associated with overfitting.

  • Representation: Neural-network cost functions provide expressive representations that can use robotic states directly without hand-designed features.The experiments report that affine costs are insufficient for some behaviors, while neural representations also support visual inputs.
  • Regularization: Nonlinear cost functions increase model complexity in an already underspecified IOC objective, motivating additional regularization.The paper notes that parameter-norm regularization is often insufficient for high-dimensional nonlinear costs.
  • Regularization: The regularizer reduces high-frequency variation associated with overfitting and makes the learned cost easier to reoptimize.The authors found temporally slow-changing costs adequate for all behaviors in their experiments.

6. Experimental Evaluation

The evaluation tests guided cost learning on simulated control benchmarks and real robotic manipulation, emphasizing task complexity, sample use, nonlinear costs, and generalization. The method succeeds on challenging torque-controlled tasks, while direct image-pixel cost learning remains underdetermined.

  • Experimental setup: The evaluation spans simulated navigation, reaching, peg insertion, dish placement, and almond pouring tasks with complex dynamics and torque control.Simulated tasks use MuJoCo; real experiments use a PR2 robot and raw state or visual representations.
  • Simulated comparisons: Between 20 and 32 demonstrations were generated for simulated tasks, whose difficulty ranges from low-dimensional navigation to 7-DOF peg insertion with contact dynamics.Peg insertion uses a nonlinear distance-based ground-truth cost because an affine cost cannot represent the required precision.
  • Simulated comparisons: Guided cost learning generally handles more complex tasks than prior methods, while additional same-distribution samples do not generally improve prior-method performance.Figure 2 compares methods after different test-condition sample counts; guided cost learning uses five samples per policy-optimization iteration.
  • Real-world robotic control: The robot learned to place a plate gently and pour almonds, with the pouring task requiring visual features to localize the target cup.The target cup position is unavailable except through learned visual features.
  • Real-world robotic control: Only the neural-network cost recovered successful pouring behavior, whereas the affine representation was insufficient and relative-entropy IRL failed to acquire a suitable cost.All methods used two-layer neural-network parameterizations except the affine comparison on pouring.
  • Generalization: The learned cost generalized successfully to new dish positions, but less often to new pouring positions; the jointly learned policy still succeeded on pouring test positions.The authors characterize the cost as local because of the sampling distribution, while policy optimization can recover behavior beyond that local cost.
  • Limitations: Directly learning costs from image pixels was too underdetermined to succeed, indicating that better image-specific regularization is likely required.The experiments instead used unsupervised visual features as a vision-based state representation.

7. Discussion and Future Work

The paper combines nonlinear cost representations with sample-based maximum-entropy IOC under unknown dynamics and demonstrates performance on simulated and real robotic tasks. Its learned costs are often local, but interleaved policy learning still produces successful controllers; extending cost learning directly to images remains challenging.

  • Discussion: The algorithm learns nonlinear cost representations under unknown dynamics using a sample-based maximum-entropy IOC objective and local-model policy learning.It uses raw system state without manual feature engineering.
  • Discussion: The method outperforms prior IOC algorithms on simulated benchmarks and achieves good results on several real-world robotic tasks.The reported scope includes high-dimensional systems and direct torque control.
  • Limitations: For complex robotic motion skills, learned costs tend to explain demonstrations only locally, making reoptimization from scratch difficult under new conditions.The authors state that no prior sample-based method in their comparisons learned good global costs for these tasks.
  • Discussion: Interleaving cost optimization with policy learning allows successful policies even when the learned cost is too local for substantially different situations.The learned policy can be retained while the cost function is discarded for these tasks.
  • Future work: Extending cost learning directly to natural images faces overfitting risks because visual inputs vary substantially between demonstrations and on-policy samples.The paper suggests domain-adaptation regularization as a future direction.

A. Policy Optimization under Unknown Dynamics

The method optimizes trajectory distributions with local linear models while learning costs under unknown dynamics, using constraints and shared dynamics priors to stabilize policy updates. Its ablations show that maximum-entropy policy optimization and importance weighting are needed to recover trajectory variance.

  • Policy optimization minimizes expected cost over Gaussian trajectory distributions using linear-Gaussian controllers and dynamics, with LQR updates when the dynamics model is available.
  • Unknown dynamics are handled by estimating time-varying linear-Gaussian models from samples collected during policy improvement.
  • A KL-divergence constraint keeps the updated trajectory distribution close to the previous controller, limiting violations caused by inaccurate linear dynamics.
  • Without MaxEnt policy optimization or importance weights, the method recovers the demonstrated mean but not the true trajectory variance.
  • A Gaussian mixture model fitted to all interaction data serves as a prior for time-varying linear regression, reducing dynamics-estimation sample complexity.

B. Consistency Evaluation

The consistency experiment tests whether guided cost learning recovers the distribution underlying demonstrations in a simple known-dynamics setting. Importance weighting and maximum-entropy optimization are both important for matching trajectory variance.

  • 40 demonstrations from four known linear-Gaussian trajectory distributions were used to evaluate KL divergence against the true distribution.
  • 272.71 KL divergence resulted from empirically estimating demonstration importance weights, with little cost in this domain.
  • Removing demonstration and sample importance weights preserved a similar mean but significantly overestimated trajectory variance.
  • Removing the maximum-entropy policy term preserved a similar mean but produced zero variance.
  • The results indicate that importance weights are crucial for recovering the correct cost function in sample-based maximum-entropy IOC.

C. Neural Network Parametrization and Initialization

The cost is represented by a neural network through learned nonlinear features, while an identity-like initialization encourages simpler learned costs and improved generalization.

  • The cost uses expressive neural-network function approximators with a quadratic form over learned nonlinear features.
  • The learned features are produced by a multilayer rectified network, with yt = fθ(xt) and rectification max(z, 0).
  • The network is initialized to represent the identity function using identity and negative-identity weights in the first layer and identity weights thereafter.
  • The identity-style initialization improved generalization of the learned cost.

D. Detailed Description of Task Setup

The evaluation spans simulated and real robotic tasks with varying state dimensions, demonstrations, target conditions, and neural-network sizes. Regularization ablations show that both proposed terms improve performance, with local constant rate regularization especially important for peg insertion.

  • Task setup: Simulated tasks used MuJoCo frictional contacts and torque motors, while real experiments used a 7-DOF PR2 arm under direct effort control.
  • Task setup: Controllers ran for 5 seconds at 20 Hz, producing 100 time steps per rollout in both simulated and real experiments.
  • Task setup: The 2D navigation task used 40 demonstrations and a cost network with two 40-unit hidden layers and 20 final features.
  • Task setup: Reaching used 20 demonstrations from 12 initial states, with two 24-unit hidden layers and 100 final features.
  • Task setup: Peg insertion and dish placing used 26- and 32-dimensional task states, respectively, with 20 demonstrations each.
  • Task setup: Pouring used a 40-dimensional state, 30 kinesthetic demonstrations, and targets distributed within a 28 cm × 13 cm table rectangle.
  • Regularization ablations: The monotonic regularizer improved performance in three of four settings, while local constant rate regularization significantly improved performance in all settings.

E. Regularization Evaluation

Both proposed regularization terms improve performance on simulated reaching and peg insertion tasks. Without local constant rate regularization, learned trajectories fail to insert the peg.

  • Both regularization terms improve performance on simulated reaching and peg insertion tasks.
  • Without local constant rate regularization, learned trajectories fail to insert the peg into the hole.
Loading 1603.00448v3…