NeurIPS 2026Coming to NeurIPS in Sydney?Explore papers, orals & directions

Guiding Reinforcement Learning Exploration Using Natural Language

Brent Harrison, Upol Ehsan, Mark O. RiedlarXiv 2017

Abstract

Reinforcement learning (RL) agents often struggle to generalize their learned policies to novel environments. This paper introduces a method that leverages natural language as an abstraction tool to bridge this generalization gap. By training an encoder-decoder network to map human-like descriptions to state-action pairs, we create a language-based critique policy that guides an agent's exploration. Evaluated on the game Frogger, our approach demonstrates significantly faster convergence in unseen maps and superior performance in stochastic environments compared to traditional methods.

Introduction

While reinforcement learning has achieved remarkable success in complex tasks, it remains notoriously "brittle." An agent trained to navigate a specific environment often fails when faced with even minor variations in layout, necessitating a complete retraining process. Interactive Machine Learning (IML) attempts to mitigate this by incorporating human feedback, but such methods are typically burdensome, requiring extensive, state-specific demonstrations that do not easily transfer.

This research addresses the "generalization gap" by proposing natural language as a medium for high-level conceptual transfer. Unlike coordinate-based feedback, language describes abstract concepts—such as "dodging an obstacle from the right"—that remain relevant across diverse environmental configurations.

Methodology

The proposed system integrates three primary components to facilitate language-guided exploration:

  1. Encoder-Decoder Networks: Drawing from Neural Machine Translation (NMT), these networks are trained to translate natural language descriptions into machine-readable state and action representations. This allows the model to learn the semantic grounding of phrases like "moving up to avoid a car."
  2. Policy Shaping Framework: The agent's decision-making process is influenced by a combination of its own experience (Q-values) and an external "critique policy" derived from human advice.
  3. Language-Based Critique Policy: Instead of requiring live human intervention, the agent utilizes the pre-trained encoder-decoder model. Upon encountering a new state, the agent identifies the most relevant human description from its training set and uses the associated action to bias its exploration.
System architecture for language-guided reinforcement learning.

To manage the transition from guided exploration to autonomous learning, a temperature parameter ($\tau$) is employed. Early in the training phase, the agent relies heavily on linguistic advice; as it accumulates experience, it gradually shifts its reliance toward its own learned reward signals.

Experimental Setup

The methodology was empirically validated using the classic arcade game Frogger.

Training and Synthetic Oracles: The system was trained using 1,000 behavior traces from a single Frogger map. To simulate human trainers efficiently, synthetic oracles generated natural language based on a grammar system. To test robustness, two datasets were created: one with 80% accuracy and another with 60% accuracy (containing 40% random or incorrect advice).

Evaluation Environments: The agents were tested on three previously unseen maps with varying obstacle densities: 25%, 50%, and 75% coverage.

Evaluation maps for Frogger with varying obstacle densities.

Results and Discussion

The experimental results highlight several key advantages of language-guided RL:

  • Accelerated Convergence: In deterministic environments, language-guided agents reached optimal behavior significantly faster than standard Q-learning or observation-based policy shaping (which lacks linguistic abstraction).
  • Robustness in Stochastic Settings: In versions of the game where actions failed 20% of the time, language-based agents were frequently the only ones to successfully converge on high-density maps.
  • Zero-Shot Generalization: The encoder-decoder model provided effective guidance for states never encountered during training, demonstrating that it successfully captured generalizable concepts rather than memorizing specific states.
  • The Regularization Effect of Noise: Interestingly, the 60% accurate model occasionally outperformed the 80% model. This suggests that the noise in the advice acted as a form of regularization, preventing the network from overfitting to the specific features of the training map.

Conclusion and Future Work

This work demonstrates that natural language is a powerful tool for helping RL agents generalize to new environments. By abstracting state-action pairs into linguistic concepts, agents can leverage human-like reasoning to navigate novel challenges.

Future research will focus on several areas: handling the diversity and idiosyncrasies of real human speech, extending the framework to continuous control environments (e.g., robotics), and moving from single-action advice to higher-level "goal-based" language. Additionally, exploring cross-domain transfer—where advice from one game assists in learning another—remains a promising avenue for further study.

Summary updated

BibTeX
@misc{harrison2017guiding,
  author = {Brent Harrison and Upol Ehsan and Mark O. Riedl},
  title = {{Guiding Reinforcement Learning Exploration Using Natural Language}},
  year = {2017},
  eprint = {1707.08616},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1707.08616},
}

Loading related content...

Figure