Learning Reward Functions by Integrating Human Demonstrations and Preferences

Malayandi Palan, Nicholas C. Landolfi, Gleb Shevchuk, Dorsa Sadigh

Abstract

Learning accurate reward functions is critical for autonomous agents, yet traditional methods like Inverse Reinforcement Learning (IRL) and preference-based learning face significant challenges in efficiency and accuracy. This paper introduces DemPref, a framework that integrates human demonstrations with active preference queries. By utilizing demonstrations to establish a coarse prior and refining it through iterative preference-based corrections, DemPref achieves high-fidelity reward learning with significantly fewer human interactions than baseline methods.

Introduction

Autonomous robots require well-defined reward functions to perform tasks successfully. However, hand-coding these functions is error-prone and often leads to unintended behaviors, such as "reward hacking." Two common alternatives—Inverse Reinforcement Learning (IRL) and preference-based learning—each have distinct drawbacks. IRL relies on human demonstrations, which are often noisy or suboptimal in high-dimensional control spaces. Preference-based learning, while more accurate in capturing intent, is notoriously inefficient, requiring hundreds of binary comparisons to learn complex rewards. DemPref addresses this gap by treating demonstrations and preferences as complementary sources of information: demonstrations provide "broad strokes," while preferences offer "fine-tuning."

The DemPref Framework

DemPref operates in two distinct stages to maximize learning efficiency. In the first stage, the system collects one or more human demonstrations via teleoperation. These demonstrations are used to learn a coarse probability distribution (a prior) over the reward function space using Bayesian IRL. This step effectively "prunes" the search space, focusing subsequent efforts on relevant regions.

In the second stage, the framework employs active preference learning with two key innovations:

  1. Iterated Correction (IC): Instead of just comparing two new robot-generated paths, the query includes the original human demonstration (or the previous best path) as a baseline. This "grounds" the search, ensuring the robot doesn't wander off into irrelevant parts of the state space.
  2. Ranking over Choosing: To maximize information gain from every interaction, users rank multiple trajectories rather than just picking one, using the Plackett-Luce model to update reward weights.
The DemPref framework: (1) Learning a prior from demonstrations, (2) Generating queries based on information gain, and (3) Updating the reward distribution based on human rankings.

Experimental Evaluation

The researchers evaluated DemPref across four diverse environments:

  • 2D Driver: A highway simulator requiring a balance of speed, lane centering, and safety.
  • Lunar Lander: A classic control task modified for reward learning.
  • Simulated Fetch Reach: A 7-DOF arm task involving obstacle avoidance.
  • Physical Fetch Robot: A real-world validation involving 15 human participants using a 7-DOF mobile manipulator.

Results and Discussion

The experimental results demonstrate that DemPref significantly outperforms both pure IRL and standard preference learning. In simulations, DemPref reached target accuracy in approximately 10 queries, whereas standard preference learning required 30-35 queries.

Performance comparison across different environments showing the impact of the number of demonstrations ($n_{dem}$) on learning efficiency.

Key insights from the study include:

  • The "One Demo" Sweet Spot: Initializing with even a single demonstration provides a massive boost in efficiency. However, in complex tasks like Fetch Reach, low-quality demonstrations can be counterproductive if relied upon too heavily.
  • Grounding via Iterated Correction: Including a "known good" trajectory in queries prevents active learning algorithms from getting "stuck" in uninformative regions of the control space.
  • Statistical Significance: In the physical robot study, users preferred the DemPref-trained robot over standard IRL with a significant margin ($p = 0.0201$).
  • Robustness: DemPref outperformed IRL specifically because IRL tended to overfit to training environments. When moved to test environments with closer obstacles, the DemPref robot succeeded where IRL failed.

Conclusion

DemPref offers a robust solution for efficient reward learning by combining the broad guidance of demonstrations with the precision of preference queries. While the current implementation faces computational challenges—specifically a 45-second latency for query generation—it represents a significant step toward making complex robot training more accessible. Future work will focus on distributed optimization to speed up query generation and exploring ways to make preference queries more interpretable.

Summary updated

BibTeX
@inproceedings{palan2019learning,
  author = {Malayandi Palan and Nicholas C. Landolfi and Gleb Shevchuk and Dorsa Sadigh},
  title = {{Learning Reward Functions by Integrating Human Demonstrations and Preferences}},
  booktitle = {Robotics: Science and Systems},
  year = {2019},
  url = {https://openreview.net/forum?id=eqQarLHzbi},
}
Figure