Prioritized offline Goal-swapping Experience Replay

Wenyan Yang, Joni Pajarinen, Dingding Cai, Joni-kristian Kamarainen · DOI

Introduction

Goal-Conditioned Reinforcement Learning (GCRL) aims to develop agents capable of reaching any arbitrary goal within an environment. When restricted to the offline setting—learning solely from a fixed, pre-collected dataset—the primary challenge is data scarcity. While data augmentation techniques like "goal-swapping" (relabeling a trajectory with a different goal) are commonly used to expand the dataset, they often introduce "hallucinated" transitions. These occur when a relabeled goal is physically unreachable from the agent's current state, leading to noisy value function estimations and degraded performance.

The PGSER Framework

To address the hallucination problem, we introduce Prioritized Offline Goal-swapping Experience Replay (PGSER). This framework identifies and prioritizes reachable goal-swapped transitions, allowing agents to effectively chain skills across different trajectories without being misled by impossible data.

Overview of the PGSER framework, illustrating the goal-swapping augmentation and Q-value-based prioritization process.

PGSER operates in three distinct stages:

  1. Random Goal-Swapping: Existing trajectories are randomly relabeled to create a massive pool of augmented transitions ($\zeta_{aug}$).
  2. Reachability Identification: A Q-function is pre-trained on the offline dataset. In environments with sparse rewards (0 for success, -1 otherwise), the Q-value serves as a proxy for the negative distance to the goal. High Q-values indicate reachability, while low values signal impossible transitions.
  3. Prioritized Replay: Augmented transitions are stored in a Prioritized Experience Replay (PER) buffer, where priority is assigned based on the pre-trained Q-values. This ensures the agent primarily learns from high-quality, reachable augmentations.

Generalization and Hub States

A key insight of PGSER is the "Hub State" strategy. By identifying states that appear in multiple trajectories, the framework allows the agent to learn how to transition from the start of one trajectory to the end of another. This connectivity transforms a collection of disjoint paths into a cohesive, generalized policy.

Visualization of how PGSER moves from a sparse offline dataset to a generalized policy by connecting trajectories, avoiding the pitfalls of an overfitted policy.

Experimental Evaluation

The method was evaluated on six standard robotic manipulation tasks in the MuJoCo physics engine, including Fetch (Reach, Push, PickAndPlace, Slide) and Dexterous Hand (HandBlock-Z, HandEggRotate) tasks. The datasets comprised a mix of 500 expert and 2,000 random trajectories.

Key Results

PGSER demonstrated significant performance gains over standard offline baselines like TD3BC:

  • HandBlockZ: PGSER achieved a score of 28.43, nearly doubling the baseline's 16.35.
  • HandEggRotate: Performance reached 34.07, compared to the baseline's 21.56.
  • Algorithm Agnostic: Even standard TD3, which typically struggles in offline settings, became competitive with state-of-the-art offline algorithms when equipped with PGSER.

Limitations and Future Work

While effective, PGSER introduces computational overhead due to the required pre-training phase. Additionally, its effectiveness is tied to the presence of "hub states"; in tasks with extremely sparse successful trajectories, such as FetchSlide, the improvements were more marginal. Future research will explore applying these prioritization techniques to broader, non-goal-conditioned offline RL tasks.

Summary updated

BibTeX
@misc{yang2023prioritized,
  author = {Wenyan Yang and Joni Pajarinen and Dingding Cai and Joni-kristian Kamarainen},
  title = {{Prioritized offline Goal-swapping Experience Replay}},
  year = {2023},
  eprint = {2302.07741},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2302.07741},
}
Figure