Reward-Constrained Behavior Cloning

Zhaorong Wang, Meng Wang, Jingqi Zhang, Yingfeng Chen, Chongjie ZhangIJCAI 2021

Abstract

Reinforcement Learning (RL) agents often achieve high performance by exploiting reward functions in ways that result in jittery, non-human-like control signals, known as "bang-bang control." This paper introduces Reward-Constrained Behavior Cloning (RCBC), a hybrid framework that integrates imitation learning with constrained RL. RCBC optimizes for human-like behavioral style while ensuring cumulative rewards meet a specified performance threshold. Evaluated across grid-worlds, MuJoCo, and TORCS, RCBC demonstrates the ability to produce smooth, high-performing agents that are robust to sub-optimal demonstrations.

Introduction

In the field of Reinforcement Learning, agents frequently exhibit "reward hacking"—finding mathematically optimal but practically undesirable solutions. A common manifestation is "bang-bang control," where an agent oscillates between extreme control values (e.g., full throttle to full brake) to maximize cumulative reward. While this may achieve high scores, it results in unstable and non-human-like behavior.

Comparison of human driving (smooth) versus standard RL driving (jittery).

Traditional Imitation Learning (IL) and Behavior Cloning (BC) attempt to solve this by mimicking human experts. However, these methods suffer from distribution shift and are limited by the quality of the demonstrations. If a human expert is mediocre, the cloned agent will be as well. RCBC addresses this gap by treating human data as a stylistic guide rather than an absolute target.

Methodology

The core of RCBC is a constrained optimization problem that flips the standard RL objective. Instead of maximizing reward directly, the agent minimizes the discrepancy (distance) between its actions and human demonstrations, subject to the constraint that the expected reward remains above a user-defined threshold ($\hat{R}$).

Key Technical Innovations

  • Lagrangian Relaxation: The framework uses a Lagrangian multiplier ($\lambda$) to automatically balance the trade-off between mimicking human style and achieving performance targets.
  • Stability Re-weighting: To maintain learning stability during constraint violations, the authors implement a re-weighting scheme that adjusts the relative importance of the imitation loss and the reward constraint.
  • Actor-Critic Integration: Unlike standard supervised BC, RCBC is compatible with modern Actor-Critic frameworks, allowing it to leverage the advantages of contemporary RL algorithms like PPO.

Experiments and Results

The authors evaluated RCBC in three environments: a navigation Grid-World, MuJoCo physical control tasks, and the TORCS racing simulator.

In the Grid-World task, the agent was tasked with reaching a high-value goal (100) while provided with a human demonstration that only reached a sub-optimal goal (50). As shown in the results, RCBC allows the agent to follow the "style" of the human (taking a specific path through an obstacle) but eventually "break away" to reach the higher-value target.

RCBC path variations in a grid-world environment across different reward thresholds (alpha).

In TORCS racing, standard PPO achieved high speeds but exhibited violent steering jitters. In contrast, RCBC produced steering curves nearly indistinguishable from human drivers—smooth and stable—while maintaining competitive lap times. Furthermore, RCBC proved robust to noise; even when 50% of human actions were replaced with random noise, the agent successfully filtered the signal to reach the target, whereas traditional imitation methods failed.

Conclusion

Reward-Constrained Behavior Cloning provides a robust mechanism for teaching agents to perform tasks with human-like "style" without sacrificing machine-like performance. By treating rewards as a lower-bound constraint rather than the primary objective, RCBC effectively mitigates the issues of bang-bang control and sub-optimal demonstrations. Future work will focus on improving sample efficiency through off-policy implementations and exploring the transferability of learned behavioral styles across related tasks.

Summary updated

BibTeX
@inproceedings{wang2021reward,
  author = {Zhaorong Wang and Meng Wang and Jingqi Zhang and Yingfeng Chen and Chongjie Zhang},
  title = {{Reward-Constrained Behavior Cloning}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.24963/ijcai.2021/436},
}
Figure