Potential-Based Reward Shaping for Intrinsic Motivation (Student Abstract)

Grant C. Forbes, David L. RobertsAAAI 2024

Introduction

Reinforcement Learning (RL) agents often struggle in environments with sparse rewards, where the goal is rarely reached during initial exploration. To address this, researchers frequently employ Intrinsic Motivation (IM), providing auxiliary rewards based on curiosity or state novelty. However, these additional rewards can lead to "reward hacking," where an agent optimizes for intrinsic bonuses at the expense of the primary task. This paper introduces Potential-Based Intrinsic Motivation (PBIM), a framework that mathematically transforms arbitrary intrinsic rewards into a potential-based form, ensuring that the agent's optimal policy remains aligned with the original goal.

The PBIM Framework

Traditional Potential-Based Reward Shaping (PBRS) is often too restrictive for modern IM functions that change as the agent learns. PBIM extends this theory to handle general, non-stationary reward functions in episodic environments through three key components:

  1. Boundary Conditions: The authors derive a mathematical condition specifying how a reward function must behave at the end of an episode to prevent it from distracting the agent from the true goal.
  2. Terminal Correction: Any standard IM reward is converted into a modified version. At the final step of an episode, a "counter-reward" is applied to cancel out the accumulated bias of the intrinsic rewards, effectively "settling the bill" and preserving the original optimal policy.
  3. Mean-Adjustment: To enhance stability and prevent the potential from growing excessively large, the algorithm subtracts the expected value of the intrinsic rewards. This centering around zero is crucial for convergence in challenging settings.

Experimental Evaluation

The researchers evaluated PBIM in the MiniGrid DoorKey 8x8 environment, a sparse-reward grid world requiring the agent to find a key, unlock a door, and reach a goal. They utilized a tabular exploration reward based on state visit counts.

Learning curves for different hyperparameters. PBIM (green dashed) consistently converges faster and more reliably than standard IM (blue solid) or no IM (red dotted).

Key Results

The experimental results demonstrate that PBIM acts as a robust safety mechanism for curiosity-driven exploration.

  • Policy Preservation: While standard IM can lead agents toward suboptimal policies (e.g., taking excessive steps to maximize curiosity), PBIM successfully guides the agent to the true optimal policy.
  • Accelerated Convergence: As shown in the performance table below, PBIM significantly reduces the number of steps required to solve the environment. For instance, at $\alpha = 0.02$, PBIM converged in 1.67 million steps, whereas the agent without IM failed to converge within the time limit.
  • Robustness: PBIM consistently outperformed baseline IM methods across varying hyperparameters, mitigating the risks of reward shaping without sacrificing exploratory benefits.
Quantitative comparison of convergence steps (T) and post-convergence performance (N) across different settings.

Conclusion and Future Work

PBIM provides a theoretically grounded method for integrating intrinsic motivation without the risk of policy suboptimality. While currently demonstrated in discrete grid-world environments, future work will explore its application to high-dimensional spaces and complex, trainable IM functions in deep RL. The "mean-adjusted" variant highlights the importance of reward centering for stability, though estimating expected intrinsic rewards in highly non-stationary environments remains a challenge for future research.

Summary updated

BibTeX
@inproceedings{forbes2024potential,
  author = {Grant C. Forbes and David L. Roberts},
  title = {{Potential-Based Reward Shaping for Intrinsic Motivation (Student Abstract)}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i21.30441},
}
Figure