TL;DR
GuidedSAC accelerates reinforcement learning (RL) by using a dual-LLM supervisor framework to provide action-level guidance to a Soft Actor-Critic agent. This approach significantly improves sample efficiency in vast state-action spaces while maintaining rigorous theoretical convergence guarantees, outperforming state-of-the-art exploration methods in both discrete and continuous control tasks.
What Problem Does This Paper Address?
Reinforcement learning excels at optimizing policies from scratch, but it suffers from severe sample inefficiency when dealing with large state-action spaces. To find high-value trajectories, agents must explore extensively.
Traditional exploration methods often rely on intrinsic rewards (like curiosity or novelty bonuses) to encourage agents to visit unseen states. However, a critical flaw remains: a novel state is not necessarily a valuable state. An agent can waste millions of steps exploring useless novel states. Alternatively, imitation learning uses human demonstrations to guide exploration, but collecting high-quality human data is expensive and difficult to scale.
The authors bridge this gap by introducing Large Language Models (LLMs) as real-time, automated supervisors that provide targeted, semantic guidance to steer exploration directly toward high-value states.
Methods
The authors propose GuidedSAC, an architecture that integrates the Soft Actor-Critic (SAC) algorithm with a collaborative, dual-LLM supervisor framework.
- The Dual-LLM Supervisor: Rather than relying on a single LLM, the framework splits the task between two specialized agents: an Advisor and a Coder. The Advisor reviews recent trajectory data (including visual replays) to determine if the agent is struggling. If intervention is triggered, it provides high-level text advice to the Coder. The Coder then translates this advice into executable, rule-based Python code.
- Action-Level Intervention: In continuous control environments, this rule-based policy generates a residual action ($\Delta a_t$) that is added directly to the RL agent's action ($a_t$), yielding the final executed action ($\tilde{a}_t = a_t + \Delta a_t$). This allows the RL agent to maintain fine-grained control while benefiting from macro-level guidance.
- Theoretical Guarantees: Crucially, the authors provide mathematical proofs demonstrating that training on data collected via this joint behavior policy does not disrupt SAC's convergence guarantees. Furthermore, they show that if the guidance policy is locally superior to the current RL policy, it strictly raises the lower bound of policy improvement.
Datasets
The algorithm was evaluated across two distinct sets of environments:
- Discrete Control (Toy Text): Blackjack, CliffWalking, FrozenLake, and Taxi. These environments feature discrete state-action spaces and sparse rewards.
- Continuous Control (MuJoCo): Continuous MountainCar and the high-dimensional Humanoid task (a 17-joint robot with a 47-dimensional state space).
Key Insights and Ideas
- Value-Aligned Exploration: Unlike novelty-seeking baselines (e.g., RND, ICM) that might explore dangerous or irrelevant areas just because they are unvisited, GuidedSAC leverages the semantic prior knowledge of LLMs to focus exploration on task-relevant, high-value trajectories.
- Suboptimal Guidance is Still Useful: A key theoretical takeaway is that the LLM supervisor does not need to be an optimal controller. As long as its rule-based guidance is locally better than the agent's early random exploration, it accelerates convergence.
- Why SAC? The authors note that action-level interventions in policy-gradient methods (like PPO) typically mask gradients during intervened steps, destroying the learning signal. SAC avoids this because it relies on a Q-value-based Boltzmann policy for policy improvement, making it uniquely compatible with external action-level guidance.
- The Window Mechanism: Querying an LLM at every single environment step is computationally impractical due to API latency and cost. GuidedSAC solves this by using a "guided window" where an intervention lasts for a fixed duration of steps before consulting the Advisor again.
Key Results
- Toy Text Benchmarks: GuidedSAC consistently achieved the highest rewards and fastest convergence. In CliffWalking and Taxi, the LLM supervisor generated an optimal rule-based policy right at the beginning of training, leading to near-immediate convergence.
- Continuous MountainCar: Standard SAC failed completely, getting stuck in a local minimum (standing still to minimize control costs). GuidedSAC immediately discovered the non-intuitive oscillation strategy required to climb the hill.
- Humanoid Locomotion: In the complex Humanoid task, GuidedSAC demonstrated a dramatic surge in performance after the base policy achieved basic stability (around $7 \times 10^5$ steps). Visually, standard SAC converged to an unnatural, biomechanically inefficient "hopping" gait. In contrast, GuidedSAC produced a highly coordinated, natural bipedal running gait.
Limitations and Future Work
- The Rule-Based Bottleneck: The framework relies on distilling LLM insights into explicit, rule-based code. This limits its representational capacity in vision-heavy environments (like Minecraft) or ultra-high-dimensional tasks (such as the 29-DoF Unitree G1 robot) where simple mathematical rules cannot easily capture complex joint coordination.
- Inference Latency: Although the window mechanism mitigates API calls, real-time direct LLM interventions remain too slow and costly for high-frequency control loops. The authors anticipate that as LLM inference costs and latencies continue to drop, deploying powerful models for direct, real-time action generation will become practical.
Summary updated