Reinforcement Learning from LLM-Generated (Suboptimal) Demonstrations
Organizations: Khoury College of Computer Sciences, Northeastern University, United States
Abstract
Reinforcement learning (RL) has achieved substantial progress across many domains, but training an agent tabula rasa remains highly sample-inefficient. A common remedy is to initialize the agent using a neural network pretrained on demonstrations. However, collecting demonstrations is expensive, and the demonstrations themselves can be suboptimal. In this work, we use a large language model (LLM) to generate an advice policy that produces demonstration data with effectively no human cost. We use this data to warmstart a DQN agent, and use the advice policy itself to guide exploration during training. Because LLM-generated advice is often suboptimal, we further introduce a value warmstart method that initializes the agent to recognize promising states from the advice policy's behavior, without directly copying its actions. To characterize the robustness of this method, we systematically perturb individual sub-skills of an LLM-generated advice policy for a long-horizon, sparse-reward task. Degraded advice still meaningfully accelerates learning relative to unaided baselines. These results suggest that LLM-generated advice, though suboptimal, can be a cheap alternative to costly human demonstrations.
Figures & tables
| Sub-skill | Condition Action |
|---|---|
| Locate Key | go_to(key) |
| Pick Up Key | pickup |
| Toggle Door | toggle |
| Nav. to Door | go_to(door) |
| Nav. to Drop | go_to_drop_spot |
| Drop Key | drop |
| Variant | A: Locate Key | B: Pick Up Key | C: Nav. to Door | D: Toggle Door | E: Locate Box |
|---|---|---|---|---|---|
| Optimal | ✓ | ✓ | ✓ | ✓ | ✓ |
| One skill perturbed | |||||
| A: Random To Key | R | ✓ | ✓ | ✓ | ✓ |
| B: Random Key Pickup | ✓ | R | ✓ | ✓ | ✓ |
| C: Random To Door | ✓ | ✓ | R | ✓ | ✓ |
| D: Random Door Toggle | ✓ | ✓ | ✓ | R | ✓ |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| Hyperparameter | Value |
|---|---|
| DQN (all methods) | |
| Learning rate | , linearly annealed |
| Replay buffer size | 100,000 |
| Discount factor | 0.99 |
| Target network update rate | 1.0 |
| Target network update frequency | 1,000 steps |
LLM-Guided RL
Large language model-guided reinforcement learning uses language models to shape rewards, exploration, planning, and policy learning.
See all 160 papers