STO-RL: Offline RL under Sparse Rewards via LLM-Guided Subgoal Temporal Order
Chengyang Gu, Yuxin Pan, Hui Xiong, Yize Chen
TL;DR
STO-RL tackles offline RL for long-horizon, sparse-reward tasks by leveraging an LLM to generate temporally ordered subgoals and a state-to-subgoal mapping. It then applies a subgoal-temporal-order aware potential-based reward shaping to densify rewards and promote progress toward the final goal, while preserving optimality. The framework achieves faster convergence, higher success rates, and shorter trajectories across discrete and continuous benchmarks (CliffWalking, FourRoom, PointMaze-UMaze, PointMaze-Medium) compared to offline goal-conditioned and hierarchical baselines, and exhibits robustness to imperfect LLM subgoal sequences. This work demonstrates a practical, scalable approach that bridges high-level planning with low-level offline RL, enabling more reliable long-horizon policy learning without online interaction.
Abstract
Offline reinforcement learning (RL) enables policy learning from pre-collected datasets, avoiding costly and risky online interactions, but it often struggles with long-horizon tasks involving sparse rewards. Existing goal-conditioned and hierarchical offline RL methods decompose such tasks and generate intermediate rewards to mitigate limitations of traditional offline RL, but usually overlook temporal dependencies among subgoals and rely on imprecise reward shaping, leading to suboptimal policies. To address these issues, we propose STO-RL (Offline RL using LLM-Guided Subgoal Temporal Order), an offline RL framework that leverages large language models (LLMs) to generate temporally ordered subgoal sequences and corresponding state-to-subgoal-stage mappings. Using this temporal structure, STO-RL applies potential-based reward shaping to transform sparse terminal rewards into dense, temporally consistent signals, promoting subgoal progress while avoiding suboptimal solutions. The resulting augmented dataset with shaped rewards enables efficient offline training of high-performing policies. Evaluations on four discrete and continuous sparse-reward benchmarks demonstrate that STO-RL consistently outperforms state-of-the-art offline goal-conditioned and hierarchical RL baselines, achieving faster convergence, higher success rates, and shorter trajectories. Ablation studies further confirm STO-RL's robustness to imperfect or noisy LLM-generated subgoal sequences, demonstrating that LLM-guided subgoal temporal structures combined with theoretically grounded reward shaping provide a practical and scalable solution for long-horizon offline RL.
