Interactive Hierarchical Guidance using Language

Bharat Prakash, Nicholas R. Waytowich, Tim Oates, Tinoosh MohseninarXiv 2021

Abstract

Reinforcement learning has been successful in many tasks ranging from robotic control, games, energy management etc. In complex real world environments with sparse rewards and long task horizons, sample efficiency is still a major challenge. Most complex tasks can be easily decomposed into high-level planning and low level control. Therefore, it is important to enable agents to leverage the hierarchical structure and decompose bigger tasks into multiple smaller sub-tasks. We introduce an approach where we use language to specify sub-tasks and a high-level planner issues language commands to a low level controller. The low-level controller executes the sub-tasks based on the language commands. Our experiments show that this method is able to solve complex long horizon planning tasks with limited human supervision. Using language has added benefit of interpretability and ability for expert humans to take over the high-level planning task and provide language commands if necessary.

Introduction

Standard Reinforcement Learning (RL) often struggles with "long-horizon" tasks—complex missions that require many steps to complete. In these scenarios, rewards are usually "sparse," meaning the agent only receives feedback at the very end of a long sequence of actions. This makes it incredibly difficult for an agent to learn through trial and error.

Furthermore, many RL models operate as "black boxes," where it is difficult for a human observer to understand the agent's immediate goals or reasoning. This lack of interpretability hinders effective human-agent collaboration. This paper addresses these gaps by leveraging the compositional and abstract nature of natural language to structure an agent's hierarchy, providing both a mechanism for task decomposition and a human-readable interface for guidance.

Methods

The proposed framework utilizes a two-tier hierarchical architecture where natural language serves as the communication bridge between high-level planning and low-level execution.

Overview of the interactive hierarchical framework

1. High-Level Sub-goal Instruction Generator

This module acts as the "brain" of the system. It observes the environment state and generates a textual command, such as "open the yellow door." The architecture consists of a CNN to process visual state information and an LSTM to generate the language instruction. This module is trained via supervised learning using a small set of expert demonstrations.

2. Low-Level Controller

The low-level controller is a language-conditioned policy trained via RL. It takes the current state and the language command as input, outputting primitive actions like moving or picking up objects. It is designed to operate over a short, fixed horizon (10 steps) to achieve the specific sub-goal defined by the high-level command.

Neural architectures for the sub-goal generator and low-level controller

Human-in-the-Loop Interaction

A key feature of this system is its interactivity. The high-level planner is replaceable: if the automated generator fails or is uncertain, a human expert can intervene and provide a direct language command. This allows for seamless guidance through complex parts of a task that the agent might not yet have mastered.

Experimental Setup

The approach was evaluated using the MiniGrid environment, specifically the "4 Rooms" and "6 Rooms" configurations. In these tasks, the agent must navigate multiple rooms, find specific colored keys, unlock doors, and reach a final goal. These environments are challenging due to the required sequence of actions and the lack of intermediate rewards.

Key Results

The hierarchical language approach significantly outperformed standard RL baselines in terms of success rates and sample efficiency:

  • Task Completion: In the 4-room task, the proposed method achieved a 95% success rate (with 1000 demonstrations), compared to only 30% for a standard sparse RL agent.
  • Scalability: In the more complex 6-room task, the method maintained a 90% success rate, while the sparse RL baseline's performance dropped to 15%.
  • Human Intervention: The system demonstrates a clear learning curve. With only 50 expert demonstrations, the agent required approximately 5.9 human interventions per episode. This dropped to just 0.5 interventions with 1000 demonstrations, indicating that the model effectively learned the high-level logic.

Discussion and Future Work

The use of language as an abstraction layer provides significant benefits for interpretability and sample efficiency. By breaking down massive tasks into language-defined sub-tasks, the agent learns faster and its "intent" remains clear to human observers.

However, some limitations remain. The low-level controller currently operates on a fixed 10-step horizon; future work will explore dynamic termination conditions where the agent can signal sub-goal completion regardless of the step count. Additionally, while MiniGrid is a robust benchmark, the authors plan to extend this method to high-dimensional, continuous state spaces and more complex real-world simulators. Finally, moving beyond fixed grammars toward more diverse, unconstrained natural language remains a key objective for future research.

Summary updated

BibTeX
@misc{prakash2021interactive,
  author = {Bharat Prakash and Nicholas R. Waytowich and Tim Oates and Tinoosh Mohsenin},
  title = {{Interactive Hierarchical Guidance using Language}},
  year = {2021},
  eprint = {2110.04649},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2110.04649},
}
Figure