TL;DR
Teaching reinforcement learning (RL) agents to follow open-ended natural language instructions usually demands either online trial-and-error or costly human-labeled demonstrations. TEDUO (Teaching the Environment Dynamics from Unlabeled Observations) enables zero-shot language-conditioned policy learning from completely unlabeled, offline state transitions and an unpaired list of text goals. By leveraging Large Language Models (LLMs) both as data annotators/abstractors and as fine-tuned generalist policies, TEDUO substantially outperforms traditional offline RL and imitation baselines on unseen environments and instructions.
What Problem Does This Paper Address?
Traditional goal-conditioned RL struggles with two fundamental bottlenecks:
- Data requirements: Most pipelines assume access to an interactive environment with ground-truth reward functions or large, curated corpora of expert trajectories labeled with language. In the real world, available data is often uncurated, unannotated, and suboptimal (e.g., raw robot logs or uncaptioned videos).
- Generalization "in the wild": Even when offline policies learn within familiar domains, their performance crashes when transferred to novel environments or semantically distinct instructions.
While off-the-shelf LLMs excel at language understanding, their world knowledge is ungrounded: when dropped into an interactive task without grounding, they hallucinate transitions, pick invalid actions, and fail to track spatial constraints. TEDUO addresses this gap by asking: Can we use an LLM's high-level semantic reasoning to label and structure raw offline data, solve it with conventional RL, and then distill that grounded dynamics knowledge back into the LLM?
Methods
TEDUO splits policy synthesis into three main stages:
Unlabeled Transitions (D) + Text Goals (G^tr)
│
├── 1. LLMs as Data Enhancers
│ ├─ State Abstraction: LLM writes Python functions to strip irrelevant state features.
│ └─ Proxy Rewards: LLM labels a small seed set; a tiny CNN generalizes hindsight labels.
│
├── 2. Offline Abstract MDP Solving
│ └─ Tabular Q-learning solves the abstracted MDPs to find optimal paths (π^g).
│
└── 3. LLMs as Generalizers
└─ Supervised fine-tuning (LoRA) distills optimal trajectories back into a base LLM.
- Abstract MDP Construction (LLMs as Data Enhancers):
- Language-Guided State Abstraction: Prompting an LLM per state is prohibitively expensive. Instead, TEDUO prompts an LLM once per goal to generate a Python abstraction function. This function filters out irrelevant distractors (e.g., treating unused objects as generic obstacles and unreferenced doors as uniform colors).
- Cost-Effective Hindsight Labeling: The LLM inspects a small, diverse subset of abstracted states ($\sim$5,000) to identify whether a goal was met. A lightweight convolutional proxy network then trains on these labels to score the rest of the dataset with $\ge$95% precision.
- Offline Goal-Conditioned RL:
- On the abstracted dataset, the authors apply tabular Q-learning across the training goals. Because the state space has been drastically compressed, standard tabular updates converge quickly without needing to generalize over unseen states at this stage.
- LLM Supervised Fine-Tuning (LLMs as Generalizers):
- The solved Q-learning policies produce an instruction dataset $\mathcal{D}^{SFT}$ consisting of
(Goal, Initial Abstract State) -> [Sequence of Optimal Actions]. - A pre-trained base model (Llama-3-8B-Instruct) is fine-tuned using LoRA. The fine-tuned LLM acts as the deployed policy, leveraging both its web-scale language priors and newly acquired environment dynamics.
Datasets
- Environment: Evaluated on the BabyAI (Minigrid) framework using 9-room, $22 \times 22$ grid worlds with navigation primitives, locked doors, keys, and multi-colored distractors.
- Offline Trajectories ($\mathcal{D}$): 800,000 non-unique transitions generated by a random mixture of default BabyAI behavioral policies, uncoupled from rewards or goal labels.
- Goal Sets: 500 training goals ($\mathcal{G}^{tr}$) and 100 held-out test goals. Test instructions were grammatically and semantically distinct, augmented with GPT-4 paraphrases and synonyms (e.g., "Acquire a cobalt container" instead of "Pick up a blue box").
- Domain Generalization Splits: 40 grid layouts used for training and 2 entirely unseen layouts held out for testing.
Key Insights and Ideas
- The LLM Dual Role: LLMs serve as structured feature selectors and reward evaluators during offline preprocessing, then flip to becoming the execution policy at test time.
- Acquiring Grounded World Models, Not Just Memorizing: Linear probing across hidden layers revealed that fine-tuning fundamentally alters the internal representations: probing accuracy for identifying physical obstacles jumps from $\sim$80% in base models to nearly 100% in the final layers of TEDUO-Llama-3-8B.
- Zero-Shot Skill Composition: In targeted transfer experiments (training in Room A on navigating/picking up boxes, and Room B on key/door unlocking), TEDUO achieved 60% success in an unseen Room C requiring compound execution (unlocking a door to reach a box). Policies trained on single domains scored 0%.
- Shifting the Bottleneck to Compute: Expanding the goal set $\mathcal{G}^{tr}$ produces more training combinations from the same raw data $\mathcal{D}$ at virtually zero data-collection cost. Policy performance scales steadily with training FLOPs rather than plateauing with dataset size.
Key Results
| Method | Environment | Goals | Success Rate [%] | Invalid Actions [%] |
|---|---|---|---|---|
| Llama-3-70B (In-Context + CoT) | Train / Test | Train / Test | $21 \pm 0.9$ | $47 \pm 0.3$ |
| BabyAI-IL-Bot (Imitation Baseline) | Test | Test | $16 \pm 0.8$ | $36 \pm 0.6$ |
| TEDUO (Llama-3-8B) | Train | Train | $65 \pm 1.4$ | $21 \pm 0.7$ |
| TEDUO (Llama-3-8B) | Test | Test | $45 \pm 1.3$ | $31 \pm 1.2$ |
- Out-of-the-box LLMs fail: Both zero-shot and CoT-prompted Llama-3-70B failed to surpass 21% success, frequently issuing invalid moves into walls.
- Outperforming Classic Imitation Learning: In the strict "in-the-wild" evaluation (unseen environments + unseen instructions), TEDUO achieves 45% success, nearly tripling the 16% success rate of BabyAI-IL-bot.
- Efficiency Gains: LLM-guided state abstraction reduced unique state counts by $\sim$10% and goal-relevant state features by 80%, providing a 5-fold reduction in data required for proxy reward models.
Limitations and Future Work
- Discrete Text Assumptions: States must currently be serialized into text format, and action spaces are discrete. Applying this directly to continuous torque control in robotics will require tokenized action abstractions or multimodal vision-language-action (VLA) architectures.
- Coverage of Offline Data: The pipeline still relies on the assumption that pre-collected transitions $\mathcal{D}$ sufficiently explore behaviors relevant to the training goals $\mathcal{G}^{tr}$.
- Scaling Environment Complexity: Current empirical validation is confined to grid worlds (BabyAI). The authors note that transferring these principles to rich 3D simulators (e.g., MineDojo, VirtualHome) or physical robot platforms remains an open challenge.
Summary updated