Abstract
Embodied agents leveraging Large Language Models (LLMs) frequently encounter challenges in aligning high-level planning with low-level physical constraints. Traditional approaches like behavior cloning (BC) focus solely on successful trajectories, leaving agents ill-equipped to handle failures. We introduce Exploration-based Error Correction Learning (E²CL), a framework that encourages agents to learn from environmental feedback triggered by intentional exploration. Through a combination of teacher-guided and teacher-free exploration, agents are trained to generate feedback and corrections, enabling "speculative inference"—a mental simulation that catches errors before they occur. Our results in the VirtualHome environment demonstrate that E²CL significantly enhances plan executability and affordance rates, allowing smaller models to outperform much larger baselines trained on success-only data.
Introduction
Large Language Models (LLMs) have demonstrated remarkable proficiency in high-level reasoning and planning. However, when deployed as embodied agents in physical environments, they often suffer from a lack of "physical common sense." An agent might plan to pick up an object while its hands are full or attempt to interact with an item across the room. These failures stem from a fundamental misalignment between the LLM's internal knowledge and environmental constraints.
Existing paradigms like behavior cloning (BC) only expose agents to successful expert trajectories, failing to teach them how to recover from errors. Conversely, Reinforcement Learning (RL) can address failures but often suffers from sparse rewards and slow convergence in complex, multi-step tasks. E²CL bridges this gap by treating errors as essential learning opportunities, aligning agents with physical reality through feedback-driven exploration.
The E²CL Framework
The E²CL framework operates through three distinct phases designed to build a robust error-correction capability.
1. Pre-tuning
The agent is initially trained on a small set of expert trajectories using standard behavior cloning. This provides a foundational "common sense" for basic task planning before the exploration phase begins.
2. Exploration Phase
The core of E²CL lies in collecting diverse failure data. This is achieved through two methods:
- Teacher-guided exploration (TGE): The agent intentionally deviates from expert paths to trigger failures, recording the resulting environmental error and the expert's intended correction.
- Teacher-free exploration (TFE): The agent explores the environment autonomously. When an unexecutable action occurs, a high-capacity "teacher" model (e.g., GPT-4o) provides a textual correction based on the environmental state.
3. Training and Speculative Inference
The agent is fine-tuned on a multi-task objective: predicting the next action (Planning), describing the cause of failures (Feedback Generation), and producing the correct action given an error (Correction).
During deployment, the agent utilizes Speculative Inference. Instead of blindly executing a plan, it "hallucinates" potential failures by asking if a predicted action will work. If its internal model predicts a failure, it generates self-feedback and corrects the plan before sending commands to the physical actuators.
Experimental Setup
We evaluated E²CL using VirtualHome, a 3D simulator featuring 285 unique household tasks across 6,201 environmental settings. The environment supports 42 atomic actions and provides textual error messages (e.g., "Missing Object," "Agent Proximity") when actions violate physical constraints. We measured performance using Executability, Affordance Rate (percentage of valid steps), and Longest Common Subsequence (LCS) relative to ground truth.
Results and Discussion
E²CL consistently outperformed baselines, including PPO and specialized agent-tuning methods. A key finding was the framework's efficiency: a 77M parameter model trained with E²CL outperformed a 783M parameter model trained only on expert data, suggesting that the quality and diversity of error-correction data are more critical than raw model scale for embodied tasks.
As shown in the analysis of error types, E²CL achieved dramatic reductions in common physical failures. Notably, "Over occupied" errors (trying to grab an object when hands are full) were reduced by 94.4%, while "Agent proximity" errors dropped by 37.4%. Furthermore, the agents demonstrated strong generalization to "unseen" tasks, indicating they had learned the underlying rules of the environment rather than just memorizing specific scripts.
Conclusion
E²CL provides a scalable way to align language-based agents with physical environments by leveraging the educational value of failure. By internalizing environmental feedback, agents develop a "look-before-you-leap" capability that significantly enhances reliability. Future work will focus on extending this framework to visual modalities and more complex, continuous physical simulators to further bridge the gap between simulation and the real world.
Summary updated