Pragmatically Learning from Pedagogical Demonstrations in Multi-Goal Environments

Hugo Caselles-Dupré, Olivier Sigaud, Mohamed Chetouani

Abstract: This paper introduces BGI-agents, a framework that uses Bayesian Goal Inference to enable "pedagogical" teaching and "pragmatic" learning in multi-goal environments. By rewarding teachers for being "legible" and learners for correctly inferring intent, the authors demonstrate significantly faster learning and a 7x reduction in goal ambiguity, especially when demonstrations are scarce.

The Challenge of Goal Ambiguity

In standard Learning from Demonstration (LfD), we usually assume the teacher provides "optimal" trajectories and the learner simply copies them. However, in environments with multiple possible goals, a single optimal action can be highly ambiguous. For example, if a robot moves a blue block toward a cluster containing both a red and a green block, is the goal to reach the red one, the green one, or just the cluster?

This "goal ambiguity" is a major bottleneck in the "few-demonstration regime," where a learner doesn't have enough data to statistically average out the noise. Human teachers solve this by being pedagogical—intentionally choosing actions that are perhaps less "efficient" but more "expressive" of their intent. Conversely, human learners are pragmatic, actively trying to infer the underlying intent rather than just mimicking the motion. This paper aims to replicate these human-centric communication mechanisms in artificial agents.

Methodology: Bayesian Goal Inference

The authors leverage Bayesian Goal Inference (BGI) as the core mechanism for both agents. BGI calculates the probability of a goal given a demonstration by using the agent's own policy as a model of how a goal is typically achieved.

Overview of the BGI-agents framework showing teacher pre-training and learner training phases.
  1. Pedagogical Teacher: During pre-training, the teacher is given an additional "pedagogical reward" if it can correctly infer its own intended goal from its own trajectory using BGI. This encourages the teacher to modify its policy to produce "legible" demonstrations that clearly disambiguate the target goal from others.
  2. Pragmatic Learner: While a "literal" learner simply tries to master goals from demonstrations, the pragmatic learner also trains itself to infer its own goals from its own experience. This "self-inference" training makes the learner more sensitive to the nuances of the teacher's demonstrations, improving its ability to decode the teacher's intent.
  3. The Pipeline: The system uses a goal-conditioned Reinforcement Learning algorithm (GANGSTR) combined with a modified version of Soft Q-Imitation Learning (SQIL) to allow the agent to learn from both its own exploration and the teacher's provided examples.

Experimental Setup

The approach was evaluated on two multi-goal environments:

  • Draw Two Balls (DTB): A simple 2D environment used for initial proof-of-concept and illustration.
  • Fetch Block Stacking (FBS): A complex 3D robotic simulation based on MuJoCo. It involves a Fetch robot arm and three blocks with 35 possible semantic goal configurations (e.g., stacking specific colors, forming pyramids). This environment is specifically designed to induce goal ambiguity.

Key Insights

  • The "Self-Mirror" Heuristic: A key insight is that an agent can become a better communicator by observing itself. By asking, "If I were the observer, would I know what I'm doing?", the teacher naturally discovers more legible strategies.
  • Ambiguity is Quantifiable: The authors introduce an Ambiguity Score to measure how often a demonstration for one goal could be mistaken for another. They found that pedagogical teachers are 7x less ambiguous than "naive" (purely optimal) teachers.
  • BGI vs. Neural Goal Predictors: The authors compared BGI to a standard LSTM-based Goal Prediction Neural Network (GPNN). BGI significantly outperformed the neural network in the few-demonstration regime because it leverages the agent's existing policy rather than requiring thousands of labeled examples to learn the "meaning" of a trajectory from scratch.

Results: Thriving in the Few-Demonstration Regime

The advantages of this pedagogical-pragmatic pairing become starkly apparent when data is limited.

Learning curves across 1000, 500, and 100 demonstrations per goal, showing the pedagogical-pragmatic pairing outperforming baselines as data becomes scarce.
  • Performance Boost: In the most challenging setup (only 100 demonstrations per goal), the combination of a pedagogical teacher and a pragmatic learner performed 4x better than the naive/literal baseline in terms of the "GIAxGRA" metric (a product of Goal Inference Accuracy and Goal Reaching Accuracy).
  • Learning Speed: Access to pedagogical demonstrations roughly doubled the learning speed of the pragmatic learner compared to learning via pure reinforcement learning.
  • Robustness: The pedagogical teacher achieved a 95.6% "Own Goal Inference Accuracy," meaning its actions were almost always clear to itself, compared to 83.4% for a naive teacher.

Limitations and Future Work

  • Generic Learner Assumption: The pedagogical teacher currently assumes a generic Bayesian learner. It does not yet adapt its teaching style to the specific current skill level or "misunderstandings" of a particular learner in real-time.
  • Discrete Goal Spaces: The BGI mechanism is computationally efficient for discrete goal sets (like the 35 configurations in FBS) but would require significant adaptation for continuous or infinite goal spaces.
  • Social Complexity: The authors suggest that future work could involve "pedagogy detection"—where the learner identifies if a teacher is being helpful—and integrating natural language to further resolve ambiguities.

Summary updated

BibTeX
@inproceedings{casellesdupre2022pragmatically,
  author = {Hugo Caselles-Dupré and Olivier Sigaud and Mohamed CHETOUANI},
  title = {{Pragmatically Learning from Pedagogical Demonstrations in Multi-Goal Environments}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=sGugMYr3Hdy},
}
Figure