Introduction
In Deep Reinforcement Learning (RL), sparse rewards present a significant challenge for agents attempting to master complex tasks. In environments where a reward is only granted upon perfect completion (e.g., a "1" for success and "0" otherwise), an agent may spend millions of iterations exploring without receiving any meaningful feedback. Hindsight Experience Replay (HER) was developed to mitigate this by allowing agents to learn from failures. By re-labeling a failed trajectory's final state as the "intended" goal, HER enables the agent to extract useful information from every episode.
However, standard HER introduces a subtle mathematical bias. It treats "accidental" successes—where the agent reached a state it didn't intend to—as if they were intentional. This paper introduces ARCHER (Aggressive Rewards to Counter bias in HER), a method designed to correct this bias and improve sample efficiency.
The Hindsight Bias Problem
The core issue identified by the authors is "Hindsight Bias." When an agent intended to reach Goal A but reached State B instead, HER assumes the actions taken are representative of a policy aiming for B. In reality, those actions were optimized for A. Treating these transitions identically to intentional successes leads to an overestimation of the policy's effectiveness for the hindsight goal, slowing down the learning process.
The ARCHER Method
ARCHER addresses this by weighting hindsight rewards more "aggressively" than real rewards. The intuition is to force the agent's policy to become more consistent with the hindsight data by making those "accidental" successes numerically more significant.
The authors introduce two scalar multipliers: $\lambda_r$ for real rewards and $\lambda_h$ for hindsight rewards. The fundamental constraint is $r^h_t \ge r_t$.
- In positive reward regimes (0 for failure, +1 for success), $\lambda_h > \lambda_r$.
- In negative reward regimes (-1 for failure, 0 for success), $\lambda_r > \lambda_h$, making the hindsight "failure" less penalizing than a real failure.
This weighting scheme encourages the Critic network to assign higher values to hindsight state-action pairs, prioritizing these successful transitions during policy updates.
Experimental Setup
The researchers evaluated ARCHER using the DeepMind (DM) Control Suite, focusing on two primary environments:
- Reacher: A 2-degree-of-freedom planar robot arm tasked with moving its tip to a random target.
- Finger: A complex multi-body task where an arm must flick a spinner to a specific orientation. This task is particularly difficult due to the discontinuous dynamics involved in the impact between the finger and the spinner.
The experiments covered various reward structures, including sparse binary rewards and continuous "shaped" rewards.
Results and Discussion
ARCHER demonstrated superior performance across several metrics:
- Sample Efficiency: In the Reacher environment, ARCHER achieved high success rates significantly faster than vanilla HER.
- Handling Complexity: The benefits were most pronounced in the high-dimensional Finger task. As the complexity of the environment increases, the "accidental" nature of successes becomes more frequent, making ARCHER’s bias correction more impactful.
- Robustness: The method proved effective regardless of the reward sign or the specific goal-sampling strategy (e.g., "final" vs. "future" sampling). Notably, ARCHER outperformed baselines even in shaped reward scenarios, where standard HER typically struggles.
Conclusion
ARCHER provides a simple, computationally inexpensive modification to Hindsight Experience Replay that significantly boosts learning speed in robotic control tasks. By acknowledging and correcting for the bias inherent in hindsight learning, ARCHER allows agents to make better use of "accidental" successes. Future work may explore dynamic weight annealing or the use of generative models to further refine the reward mapping between real and hindsight experiences.
Summary updated