Designing Rewards for Fast Learning

Henry Sowerby, Zhiyuan Zhou, Michael L. LittmanarXiv 2022 · DOI

Abstract

In Reinforcement Learning (RL), the reward function is the primary mechanism for communicating desired behavior. However, many different reward functions can lead to the same optimal policy, with some facilitating much faster learning than others. This paper investigates the reward-identification problem: finding the specific reward function that minimizes learning time. We propose a linear programming (LP) approach that optimizes rewards based on two metrics: the action gap and the subjective discount factor. Our results in tabular environments demonstrate that automated reward design consistently outperforms manual heuristics, revealing principles such as the "salary raise" effect for subgoals and the necessity of precision in dense reward functions.

Introduction

A common challenge in RL is the "sparse reward" problem, where an agent receives feedback only upon reaching a final goal, leading to inefficient exploration. While designers often use "dense" rewards or step penalties to guide the agent, these heuristics are often suboptimal. This research tackles the reward-identification problem by seeking reward functions that not only induce the target behavior but also maximize the speed of acquisition.

Methodology

The authors frame reward design as an optimization problem centered on two key metrics:

  1. Action Gap ($\delta$): The difference in value between the optimal action and the next-best alternative. A larger gap increases robustness against noisy value estimates.
  2. Subjective Discount ($\tilde{\gamma}$): A design-time discount factor that encourages the agent to prioritize shorter-term horizons, simplifying the credit assignment problem.

Using Linear Programming (LP), the algorithm searches for a reward function—modeled as a linear combination of state features—that satisfies the target policy while maximizing the action gap and optimizing the subjective discount. These rewards were evaluated using Q-Learning in two environments: the Russell/Norvig 4x3 Gridworld and a 60-state Chain MDP.

Key Insights: The Geometry of Effective Rewards

The LP-optimized rewards revealed several non-intuitive principles for effective reward design:

  • The "Salary Raise" Principle: For environments with subgoals, rewards should not be constant. Instead, they should gradually increase as the agent approaches the goal to counteract the natural decay caused by the discount factor.
  • Precision in Density: While dense rewards (feedback at every state) are generally helpful, poorly designed ones can hinder learning. LP-designed dense rewards are often "jagged" and primarily negative, ensuring the agent is strictly guided toward the goal without being trapped in local reward loops.
Figure 5: Visualization of different reward functions for the 60-state chain, highlighting the increasing 'salary raise' structure of LP-generated rewards.

Key Results

The automated LP approach consistently surpassed human-designed rewards in learning efficiency. In the Russell/Norvig grid, the LP-designed reward achieved approximately 88,364 correct actions over 100k steps, significantly higher than the 83,666 achieved by standard rewards.

In the 60-state chain environment, the "ideal dense" reward generated by the LP algorithm showed the steepest learning curve, reaching high performance levels much faster than simple goal-based or action-penalty rewards.

Figure 4: Learning performance comparison on the 60-state chain. LP-generated 'ideal dense' and 'subgoal' rewards significantly outperform standard goal-based and action-penalty rewards.

Conclusion and Future Work

This work provides a formal framework for "compiling" a target policy into an efficient reward function. By focusing on the action gap and subjective discount, the LP method automates the discovery of complex reward structures like the "salary raise" principle.

Future research is needed to scale these principles beyond tabular environments into high-dimensional state spaces requiring deep reinforcement learning. Additionally, while the current method requires a pre-defined target policy, future iterations could explore reward design for behavior discovery in entirely unknown environments.

Summary updated

BibTeX
@misc{sowerby2022designing,
  author = {Henry Sowerby and Zhiyuan Zhou and Michael L. Littman},
  title = {{Designing Rewards for Fast Learning}},
  year = {2022},
  eprint = {2205.15400},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2205.15400},
}
Figure