LEMON: Language-Based Environment Manipulation via Execution-Guided Pre-training

Qi Shi, Qian Liu, Bei Chen, Yu Zhang, Ting Liu, Jian-Guang Lou

Introduction

Language-Based Environment Manipulation (LEM) involves developing agents capable of interpreting human instructions—such as "Pour the third beaker into the first one"—and correctly updating the environment state. Historically, this has required specialized, bespoke architectures tailored to specific simulations. While effective, these models lack generalizability; a model trained for chemical mixing cannot easily adapt to tracking cooking recipes. Conversely, general-purpose Generative Language Models (GLMs) like BART excel at language processing but lack an inherent understanding of environment dynamics or "physics."

To bridge this gap, we introduce LEMON (Language-based Environment Manipulation via Execution-guided Pre-training). LEMON injects "environmental common sense" into a standard BART model by pre-training it on synthetic programs and their execution results, enabling state-of-the-art performance across diverse manipulation tasks.

Methods

LEMON utilizes a task-agnostic architecture that treats environment manipulation as a sequence-to-sequence problem. The model receives a concatenated string representing the initial environment state and the instruction history, and it is tasked with predicting the resulting goal state.

The core innovation is Execution-Guided Pre-training. Before exposure to natural language, the model is taught environment dynamics using synthetic data. This process involves generating initial states and valid symbolic programs (e.g., POUR(beaker_1, beaker_2)), using an automated executor to calculate the ground-truth final state, and pre-training the model to predict that state.

LEMON framework: Pre-training on synthetic programs vs. fine-tuning on natural language instructions.

By using symbolic programs for pre-training, LEMON leverages massive amounts of perfectly labeled data without human intervention, learning the underlying logic of state transitions before tackling the ambiguity of human language.

Datasets and Evaluation

LEMON was evaluated on five diverse benchmarks:

  • SCONE Corpus: Comprising ALCHEMY (chemical mixing), SCENE (moving people/swapping hats), and TANGRAMS (geometric shape arrangement).
  • PROPARA: Tracking entity states in scientific processes like photosynthesis.
  • RECIPES: Tracking ingredient states and locations through cooking instructions.

Results and Discussion

LEMON achieved new state-of-the-art (SOTA) results on four of the five tasks. In the ALCHEMY benchmark, 5-utterance denotation accuracy improved from 62.7% to 75.4%. Similarly, SCENE performance rose from 62.0% to 72.3%.

Performance comparison of LEMON against existing fully and weakly supervised approaches across Alchemy, Scene, and Tangrams.

Ablation studies confirmed that execution-guided pre-training was the primary driver of success; removing this phase led to significant performance degradation (e.g., a 4.1% drop in ALCHEMY). Furthermore, leakage analysis demonstrated that the model learns underlying rules rather than memorizing transitions, maintaining high performance even on novel test states.

Conclusion and Future Work

LEMON demonstrates that complex environment states can be effectively serialized into text, allowing GLMs to perform sophisticated reasoning. While currently limited to symbolic, text-based environments, future work will explore scaling this approach to "raw" environments (e.g., pixels or 3D point clouds) and improving context modeling for tasks requiring long-term memory, such as TANGRAMS.

Summary updated

BibTeX
@inproceedings{shi2022lemon,
  author = {Qi Shi and Qian Liu and Bei Chen and Yu Zhang and Ting Liu and Jian-Guang Lou},
  title = {{LEMON: Language-Based Environment Manipulation via Execution-Guided Pre-training}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.findings-emnlp.33},
}
Figure