Offline Reinforcement Learning with Imputed Rewards

Carlo Romeo, Andrew D. BagdanovarXiv 2024 · DOI

Introduction

Training offline reinforcement learning (ORL) agents typically requires massive datasets where every single state-action transition is labeled with a reward. In real-world applications—such as healthcare or industrial robotics—collecting raw "state-action" logs is straightforward, but accurately labeling the reward for every single step is often expensive, dangerous, or technically impossible. This creates a "data-scarcity" paradox: we possess vast amounts of interaction data but very few usable reward signals.

This paper demonstrates that near-baseline performance can be achieved by labeling just 1% of the data and using a simple neural network to "impute" (predict) rewards for the remaining 99%, effectively unlocking the potential of vast, unlabeled interaction logs.

The Imputed Reward Framework

The authors propose a straightforward two-stage framework to bridge the gap between unlabeled logs and reward-dependent RL algorithms.

Comparison of standard offline RL (a) and the proposed offline RL with imputed rewards (b).

The process involves three key steps:

  1. Reward Modeling: A tiny fraction (specifically 1%) of the available transitions with ground-truth rewards is used to train a simple two-layer Multi-Layer Perceptron (MLP) via supervised learning. This model learns to map state-action pairs $(s, a)$ to a predicted reward $r$.
  2. Reward Imputation: The trained Reward Model is applied to the remaining 99% of the unlabeled dataset, "filling in the blanks" to create a fully labeled synthetic dataset.
  3. Policy Learning: Standard state-of-the-art Offline RL algorithms—specifically TD3BC (Twin Delayed Deep Deterministic Policy Gradient with Behavior Cloning) and IQL (Implicit Q-Learning)—are trained on this augmented dataset.

Unlike Inverse Reinforcement Learning (IRL), which involves complex adversarial training, or Behavior Cloning, which requires expert demonstrations, this supervised imputation approach is computationally cheap and robust.

Experimental Evaluation

The method was evaluated using the D4RL benchmark, focusing on continuous locomotion tasks in the MuJoCo simulator (Halfcheetah, Walker2D, and Hopper). Tests were conducted across three data quality levels:

  • Medium: Average performance data.
  • Medium-Replay: The entire buffer of a learning agent.
  • Medium-Expert: A mixture of average and perfect data.

Key Insights

  • The "1% Rule": A simple MLP trained on just 1% of the data was sufficient to reconstruct a reward signal that allowed agents to learn complex locomotion.
  • Efficiency: The Reward Model only requires approximately 300 epochs of training, making it a lightweight addition to the RL pipeline.
  • Algorithm Synergy: Imputed rewards worked particularly well with TD3BC. In some instances, agents trained on 1% labeled + 99% imputed data actually outperformed baselines trained on 100% ground-truth data.

Results and Performance Recovery

The study compared three scenarios: the Baseline (100% labels), Data-Scarce (only 1% labels), and the Imputed approach (1% labels + 99% predicted).

While agents in the "1% only" scenario failed significantly (often scoring near zero), the addition of imputed rewards allowed performance to jump back to an average of 85% of the baseline across all tasks. For example, in the Walker2D-Medium task, the TD3BC agent with imputed rewards achieved a score of 82.81, nearly matching the 100% label baseline of 83.70.

Limitations and Future Outlook

While the results are promising for locomotion, several challenges remain:

  • Reward Complexity: MuJoCo tasks feature relatively smooth reward functions. It is unclear if simple MLP imputation will suffice for environments with extremely sparse or noisy rewards.
  • Data Representation: The success of the method assumes the 1% labeled sample is representative of the entire dataset. If the sample is biased, the Reward Model may fail to generalize.
  • Scaling: Future work should investigate how this method performs in higher-dimensional environments and explore more sophisticated architectures for the Reward Model.

In conclusion, simple supervised reward imputation offers a powerful and efficient path toward utilizing the vast quantities of unlabeled data available in real-world domains for offline reinforcement learning.

Summary updated

BibTeX
@misc{romeo2024offline,
  author = {Carlo Romeo and Andrew D. Bagdanov},
  title = {{Offline Reinforcement Learning with Imputed Rewards}},
  year = {2024},
  eprint = {2407.10839},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.10839},
}
Figure