Large Language Models (LLMs) are brilliant at writing poetry and code, but put them in a complex, multi-step environment—like a virtual kitchen or a science lab—and they often stumble. They get lost in the "long horizon," failing to connect an action taken now with a reward received fifty steps later. A new paper introduces GLIDER, a framework designed to fix this by teaching LLMs the age-old strategy of "divide and conquer."
TL;DR
GLIDER introduces a hierarchical structure to LLM agents, splitting them into a high-level "planner" and a low-level "executor." By using offline hierarchical reinforcement learning, the model learns to decompose complex goals into manageable sub-tasks, significantly improving performance and generalization on long-horizon tasks like ScienceWorld and ALFWorld.
What Problem Does This Paper Address?
While LLMs have sophisticated reasoning abilities, they struggle as autonomous agents in interactive environments. Two main issues plague them:
- Deficient Exploration: In "sparse-reward" scenarios (where you only get a "win" signal at the very end), LLMs often wander aimlessly because they don't know how to explore systematically.
- Long-term Credit Assignment: If an agent successfully boils water after 100 steps, it’s hard for a standard model to figure out which specific actions (like picking up the pot or turning on the stove) were the most critical.
Existing "prompt-based" methods like ReAct or Reflexion try to solve this by feeding the model its own history, but they quickly hit context window limits and can be incredibly expensive to run.
Methods: The GLIDER Framework
The authors propose GLIDER (Grounding Language Models as EffIcient Decision-Making Agents via Offline HiErarchical Reinforcement Learning). The core innovation is a two-layer hierarchy:
- The High-Level Planner ($\pi^h$): Operates at a coarse temporal scale. Every $c$ steps, it looks at the task and current observation to generate a "sub-task" (e.g., "Go to the kitchen").
- The Low-Level Executor ($\pi^l$): Takes the sub-task and generates the specific, "primitive" actions (e.g., "open door," "move forward") to achieve it.
The Training Pipeline
GLIDER uses a three-stage training process to build this capability efficiently:
- Supervised Fine-Tuning (SFT): The model is first trained on expert demonstrations to learn the basic "language" and mechanics of the environment.
- Offline Hierarchical RL (ORL): This is the core of the methodology. Using reward-annotated datasets, the model learns a Sentence-Level Critic (to evaluate how good a plan is) and a Token-Level Actor (to generate the actions). Crucially, they use Implicit Q-Learning (IQL) and AWAC styles to update the model without needing to interact with the environment during this phase, ensuring stable learning.
- Offline-to-Online Adaptation (O2O): When faced with a brand-new environment, GLIDER freezes the low-level "skills" (which are generally useful across many tasks) and only fine-tunes the high-level planner.
Parameter Efficiency: Instead of training two separate 7B models, GLIDER uses a single frozen LLM backbone (like Llama-3-8B) with LoRA adapters. The model switches between being a "boss" and a "worker" based on a specific hierarchy prompt.
Key Insights and Ideas
- Hierarchy as Temporal Abstraction: By making the "boss" only speak every few steps, the search space for planning is drastically reduced. It’s much easier to plan 5 sub-tasks than 50 individual actions.
- The Power of "Medium" Data: One surprising finding was that training only on expert data leads to poor performance. Including "medium-quality" data (trajectories where the agent makes mistakes and recovers) helps the model learn how to handle failures.
- Skill Transferability: Low-level skills (like "open cupboard") are task-agnostic. Because GLIDER decouples these from the high-level goal, the agent can adapt to a new room or a new experiment much faster than a "flat" model could.
Key Results
The researchers evaluated GLIDER on two rigorous benchmarks: ScienceWorld (complex science experiments) and ALFWorld (household manipulation). GLIDER consistently outperformed both prompt-based and fine-tuning baselines:
- Massive Gains: On ScienceWorld, GLIDER with a Llama-3-8B backbone achieved a score of 77.43 on seen tasks (a +33.7% improvement over the best baseline) and 68.34 on unseen tasks (+30.6% improvement).
- Robustness: Even smaller models (like Llama-1B) using the GLIDER hierarchy outperformed much larger 7B/8B models that didn't use a hierarchy.
- Zero-Shot Generalization: In online adaptation tests, GLIDER started with a much higher initial score on new tasks compared to standard RL algorithms, proving that its hierarchical knowledge transfers effectively.
Limitations and Future Work
The authors acknowledge that their multi-stage pipeline (SFT $\rightarrow$ ORL $\rightarrow$ O2O) is somewhat complex. They suggest that future work could streamline the training process, perhaps inspired by recent "reasoning-loop" breakthroughs. Additionally, they aim to expand GLIDER beyond embodied agents into broader domains like mathematical reasoning and code generation, where "divide and conquer" is equally vital.
Summary updated