Adaptive Language-Guided Abstraction from Contrastive Explanations

Andi Peng, Belinda Z. Li, Ilia Sucholutsky, Nishanth Kumar, Julie A. Shah, Jacob Andreas, Andreea Bobu · DOI

Abstract

Defining reward functions for robotic tasks is a persistent challenge, often resulting in either tedious manual specification or data-intensive end-to-end learning. We present ALGAE (Adaptive Language-Guided Abstraction from Contrastive Explanations), a framework that enables robots to autonomously discover missing reward features. By using Large Language Models (LLMs) to compare their own failures against human demonstrations, ALGAE iteratively identifies semantic features and generates the corresponding code to compute them. Our results across 2D navigation, simulated manipulation, and real-world mobile manipulation demonstrate that ALGAE learns robust, interpretable reward functions with significantly less data than traditional approaches.

Introduction

In robot learning, the reward function serves as the critical signal guiding behavior. However, researchers face a "Goldilocks" problem: manual feature specification is prone to under-specification, while end-to-end learning is brittle and data-hungry. ALGAE bridges this gap by leveraging the "common sense" reasoning of LLMs to identify missing task nuances from contrastive comparisons between robot failures and human successes.

Methodology

The ALGAE framework operates through an iterative loop of feature specification and reward validation.

The ALGAE framework iteratively refines reward functions by comparing robot trajectories to human demonstrations using LLMs.
  1. Inverse Reinforcement Learning (IRL): The robot learns feature weights from human demonstrations using its current feature set.
  2. Contrastive Explanations: The robot generates its best trajectory and asks an LLM (e.g., GPT-4o) to explain why the human demonstration is superior.
  3. Language-Guided Abstraction: The LLM identifies a missing semantic feature based on world knowledge.
  4. Feature Coding: The LLM generates Python code to compute this new feature from raw state data.
  5. Validation: The feature is added to the library, and the process repeats until performance matches the demonstration.

Experimental Evaluation

We evaluated ALGAE across three distinct domains to test its versatility and robustness.

ALGAE was evaluated across 2D navigation, simulated JACO manipulation, and real-world Spot mobile manipulation tasks.
  • 2D Navigation: Gridworld environments requiring navigation to goals while interacting with specific objects.
  • 7DoF JACO Tabletop Manipulation: Simulated tasks involving complex preferences, such as keeping a mug upright.
  • Real-World Spot Mobile Manipulation: A Boston Dynamics Spot robot performing household tasks like watering plants in cluttered environments.

Key Results and Insights

ALGAE demonstrates several advantages over traditional reward learning methods:

  • Efficiency and Interpretability: By adding features only when necessary, ALGAE maintains a "lean" and interpretable reward function.
  • Superior Generalization: In 2D navigation, ALGAE achieved perfect performance (1.00 normalized reward), outperforming full-state baselines that failed under environmental changes.
  • Real-World Robustness: On the Spot robot, the iterative process allowed the system to ignore irrelevant environmental clutter that typically confuses non-iterative LLM baselines.
  • LLMs as Reasoning Engines: The system treats LLMs as feature designers rather than numerical scorers, leveraging their strengths in reasoning and code generation.

Limitations and Future Directions

While effective, ALGAE currently assumes a linear combination of reward features, which may not suffice for highly non-linear or hierarchical tasks. Additionally, the validation step currently relies on ground-truth feature vectors, suggesting a need for more interactive human-in-the-loop validation in future iterations. Future work will explore non-linear reward structures and deeper integration with human feedback.

Summary updated

BibTeX
@inproceedings{peng2024adaptive,
  author = {Andi Peng and Belinda Z. Li and Ilia Sucholutsky and Nishanth Kumar and Julie A. Shah and Jacob Andreas and Andreea Bobu},
  title = {{Adaptive Language-Guided Abstraction from Contrastive Explanations}},
  booktitle = {Conference on Robot Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=OGjGtN6hoo},
}
Figure