Learning Rewards from Linguistic Feedback

Theodore R. Sumers, Mark K. Ho, Robert X. D. Hawkins, Karthik Narasimhan, Thomas L. Griffiths

Abstract: We explore unconstrained natural language feedback as a learning signal for artificial agents. Humans use rich and varied language to teach, yet most prior work on interactive learning from language assumes a particular form of input (e.g., commands). We propose a general framework which does not make this assumption, using aspect-based sentiment analysis to decompose feedback into sentiment about the features of a Markov decision process. We then perform an analogue of inverse reinforcement learning, regressing the sentiment on the features to infer the teacher's latent reward function. To evaluate our approach, we first collect a corpus of teaching behavior in a cooperative task where both teacher and learner are human. We implement three artificial learners: sentiment-based "literal" and "pragmatic" models, and an inference network trained end-to-end to predict latent rewards. We then repeat our initial experiment and pair them with human teachers. All three successfully learn from interactive human feedback. The sentiment models outperform the inference network, with the "pragmatic" model approaching human performance. Our work thus provides insight into the information structure of naturalistic linguistic feedback as well as methods to leverage it for reinforcement learning.

Introduction

In traditional Reinforcement Learning (RL), agents typically learn from scalar rewards or expert demonstrations. When language is introduced, it is often restricted to rigid, template-based commands like "Go to the kitchen." However, human teaching is far more nuanced, utilizing a flexible mix of praise ("Good job!"), counterfactuals ("You should have gone left"), and descriptive preferences ("I don't like the pink triangles").

The challenge lies in the fact that naturalistic feedback is often "off-policy" and ambiguous. A simple "Good job" does not merely validate the last action; it suggests the entire trajectory aligned with a teacher's hidden reward function. This research introduces a framework to interpret these diverse linguistic signals, effectively performing Inverse Reinforcement Learning (IRL) on arbitrary speech to infer underlying preferences.

Methodology

The proposed framework treats language as a noisy signal for Bayesian inference. The process follows three primary stages:

  1. Aspect-Based Sentiment Analysis: The agent decomposes an utterance ($u$) into a scalar sentiment ($ζ$) and a set of target features ($f$).
  2. Grounding: The agent maps linguistic elements to the Markov Decision Process (MDP). Feedback is categorized into three types: Evaluative (targeting recent trajectories), Imperative (targeting specific actions), and Descriptive (targeting object features directly).
  3. Bayesian Linear Regression: The agent treats the sentiment as a label and the features as predictors, updating internal weights ($w$) for each feature.
Overview of the learning framework: (A) The interaction loop, (B) Decomposing utterances into sentiment and features for reward inference.

Three learner models were evaluated:

  • Literal: Uses standard sentiment analysis (VADER) and basic keyword grounding.
  • Pragmatic: Incorporates "Gricean" inductive biases. For instance, if a teacher mentions "pink circles" without explicit sentiment, the agent assumes the sentiment is positive. Conversely, unmentioned features are assumed to be less valuable.
  • Inference Network: An end-to-end neural network trained on human-human interaction data to predict rewards directly from text and trajectories.

Experimental Setup and Results

The study utilized a human-human instruction dataset involving 208 participants in a collaborative grid-world game. One participant (the learner) moved a robot to collect objects, while the other (the teacher) provided chat feedback based on hidden object rewards. This was followed by a live evaluation where 148 new participants were paired with the artificial agents.

Experimental setup and feedback dynamics: (A) Grid world task, (B) Reward matrix, (C) Interaction sequence, (D) Evolution of feedback types over levels.

Key Findings

  • Scaffolding Curriculum: Human teachers naturally adapt their language as an agent improves. They initially provide descriptive feedback to establish value and shift toward evaluative feedback once the agent demonstrates proficiency.
  • The Power of Pragmatics: The Pragmatic model significantly outperformed the Literal model, achieving a normalized score of 42.8, nearly matching the human-human baseline of 44.3. This success stems from the model's ability to handle cases where humans omit explicit sentiment.
  • Structured vs. Neural Models: While the Inference Network is more scalable, it proved less data-efficient in live settings than the structured Pragmatic model. However, its performance improved when trained on larger, more diverse datasets.

Conclusion

This work demonstrates that artificial agents can effectively learn complex reward functions from unconstrained natural language. While the current structured models rely on manual grounding rules, they provide a strong baseline for future hybrid approaches that combine sentiment-based reasoning with end-to-end neural learning. Future research will focus on extending this framework to more complex environments and teaching agents about environment dynamics alongside rewards.

Summary updated

BibTeX
@inproceedings{sumers2021learning,
  author = {Theodore R. Sumers and Mark K. Ho and Robert X. D. Hawkins and Karthik Narasimhan and Thomas L. Griffiths},
  title = {{Learning Rewards from Linguistic Feedback}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i7.16749},
}
Figure