Learning to reason over scene graphs: a case study of finetuning GPT-2 into a robot language model for grounded task planning

Georgia Chalvatzaki, Ali Younes, Daljeet Nandha, An T. Le, Leonardo F. R. Ribeiro, Iryna Gurevych

Abstract

Long-horizon task planning in robotics requires a synergy between high-level reasoning and low-level environmental grounding. This study investigates the potential of finetuning GPT-2, a relatively small language model, into a grounded task planner named RobLM. By linearizing 3D scene graphs into natural language tokens, RobLM bridges the semantic gap between human instructions and physical spatial relationships. Evaluated on the ALFRED benchmark, the model demonstrates that providing explicit environmental context allows a small-scale LLM to effectively decompose complex directives into executable subgoals, significantly outperforming ungrounded baselines in argument prediction.

Introduction

Long-horizon task planning remains a significant challenge in robotics, requiring models to translate complex human instructions (e.g., "put a washed slice of apple on the table") into a precise sequence of physical actions. Traditional symbolic planners offer mathematical rigor but lack flexibility and require manual domain specification. Conversely, Large Language Models (LLMs) possess extensive commonsense knowledge but are often "ungrounded," lacking awareness of the specific spatial and semantic context of a given environment. This research addresses the grounding problem by introducing a framework to provide LLMs with localized spatial context through linearized scene graphs.

Methodology

The proposed framework, RobLM (Robot Language Model), utilizes a two-stage approach to grounded reasoning:

  1. Graph2NL (Graph to Natural Language): To enable GPT-2 to process environmental data, 3D scene graphs—where objects are nodes and spatial relations are edges—are "linearized." Geometric data such as distance, yaw, and pitch are mapped into a vocabulary of natural language tokens (e.g., "close," "left," "above").
  2. Finetuning GPT-2: A base GPT-2 model is finetuned on the ALFRED dataset to map task goals and linearized scene graphs to a sequence of high-level PDDL-style actions. This allows the model to leverage its linguistic priors while adhering to the constraints of the specific environment.
  3. Task Grounding: The high-level action strings generated by the LLM are translated into low-level controller commands within the AI2-THOR simulator, which manages the physical execution of tasks like opening drawers or navigating obstacles.
Figure 1: An example of a multi-step task plan generated and executed by RobLM in the AI2-THOR environment, showing the sequence from navigating to a cabinet to placing a peppershaker on a sidetable.

Experimental Evaluation

The study utilizes the ALFRED (Action Learning From Realistic Environments and Directives) benchmark, which provides over 25,000 English directives across 8,000 expert demonstrations. Tasks are executed in AI2-THOR, a photo-realistic indoor simulator. The authors augmented the ALFRED scripts to extract precise object positions and rotations, facilitating the construction of the scene graphs required for the Graph2NL process.

Results and Discussion

Experimental results indicate that while GPT-2 fails at reasoning tasks without context, finetuning with grounded scene graphs transforms it into a competent planner.

  • Contextual Importance: RobLM achieved high accuracy in plan generation, with context-driven models significantly outperforming "no context" variants. The model proved adept at predicting action sequences (the logic of the task) but relied heavily on the scene graph for argument prediction (identifying specific objects and locations).
  • Performance Metrics: In simulation, RobLM reached a 49.9% success rate on navigation tasks (GotoLocation) and 74.9% on PickupObject tasks.
  • The "First Argument" Challenge: A key finding was that the model's performance is highly sensitive to the initial step of a plan. Providing a "refined context" that describes the first required action drastically improves the overall success rate.
  • Inference Trade-offs: The use of transformer-based models introduces computational overhead; RobLM processed approximately 1.0 iteration per second, compared to 2.9 iterations per second for classical symbolic baselines.

Conclusion

This research demonstrates that grounding is the essential link for making LLMs viable for physical robotics. By finetuning a smaller model like GPT-2 with linearized scene graphs, the authors achieved effective task planning that rivals or exceeds classical baselines in specific categories. Future work will focus on enabling dynamic re-planning during execution and exploring multi-modal inputs to integrate vision directly into the reasoning process, potentially bypassing the need for intermediate scene graph linearization.

Summary updated

BibTeX
@article{chalvatzaki2023learning,
  author = {Georgia Chalvatzaki and Ali Younes and Daljeet Nandha and An T. Le and Leonardo F. R. Ribeiro and Iryna Gurevych},
  title = {{Learning to reason over scene graphs: a case study of finetuning GPT-2 into a robot language model for grounded task planning}},
  journal = {Frontiers Robotics AI},
  year = {2023},
  doi = {10.3389/frobt.2023.1221739},
}
Figure