Inferring the Goals of Communicating Agents from Actions and Instructions

Lance Ying, Tan Zhi-Xuan, Vikash Mansinghka, Joshua B. Tenenbaum · DOI

TL;DR

Researchers from MIT and Harvard have developed a Bayesian framework that allows an observer to infer the shared goals of a cooperative team by watching their actions and listening to their verbal instructions. By modeling the team as a single "group agent" and using GPT-3 to evaluate the likelihood of their speech, the model achieves a remarkable 0.96 correlation with human goal-inference judgments, demonstrating that integrating language and action is key to building AI that truly understands cooperative intent.

What Problem Does This Paper Address?

When humans work together, we don't just watch what others do; we listen to what they say. If you see a teammate heading toward a kitchen cabinet while saying, "Can you grab the flour?", you immediately narrow down their goal to "baking" long before they reach for a bowl.

Current AI systems struggle with this multi-modal "Theory of Mind." Most models focus either on Bayesian Theory of Mind (BToM)—inferring goals from physical actions—or Rational Speech Act (RSA) theory—inferring intent from language. This paper bridges that gap. The challenge lies in the complexity: modeling two separate agents who are constantly reasoning about each other's beliefs and intentions (recursive reasoning) is computationally expensive and often intractable. The authors seek a simpler, more robust way to model how an observer understands a communicating team.

Methods

The authors introduce a unified Bayesian model based on the "Imagined We" (IW) framework. Instead of modeling two agents reasoning about each other, they treat the team as a single "group agent" with a shared goal ($g$) and a joint plan ($\pi$).

The framework consists of three main components:

  1. Joint Planning: The team is assumed to follow a "noisily optimal" Boltzmann policy. They use an incremental A* search to calculate the costs of reaching various goals, which serves as the basis for the action likelihood.
  2. Utterance Model (The "Pragmatic Speaker"): To model language, the system identifies "salient" actions in the plan (like unlocking a specific door). It then uses GPT-3 (Curie) as a likelihood function. Rather than generating text, the model asks: "Given these salient actions, how likely is it that a human would utter this specific instruction?"
  3. Bayesian Inverse Planning: A third-person observer uses these action and language models to perform exact Bayesian inference. As new actions or words are observed, the model updates a posterior distribution over the possible goals.

Datasets

The researchers evaluated their model using a multi-agent version of the "Doors, Keys, & Gems" gridworld.

  • The Environment: A 2D maze where a human "principal" and a robot "assistant" must collaborate to retrieve one of four colored gems. Agents must pick up colored keys to unlock matching doors and can pass items to one another.
  • The Stimuli: 20 unique scenarios involving different maze layouts, action trajectories, and natural language instructions (e.g., "Can you unlock the red and blue door for me?").
  • Human Baseline: 120 participants were recruited via Prolific to provide goal inferences at various "judgment points" throughout the trajectories, both with and without the accompanying instructions.

Key Insights and Ideas

  • Language as a "Shortcut" to Intent: Instructions provide a massive information gain at the very start of a task. While actions eventually reveal the goal, language resolves ambiguity much faster, acting as a powerful prior that "down-weights" irrelevant goals immediately.
  • The "Group Agent" Simplification Works: By bypassing the "he-thinks-that-I-think" recursive loop and treating the team as a single mind, the model remains computationally efficient while still capturing the core logic of human cooperation.
  • Pragmatic Salience: The model correctly assumes that rational speakers don't narrate every step (e.g., "I am moving left"). Instead, they only communicate "salient" actions that require coordination, which closely mirrors how humans actually give instructions.

Key Results

  • High Human Correlation: The model’s goal inferences were highly correlated with human judgments, achieving a Pearson’s $R = 0.965$ in the "with instructions" condition and $R = 0.925$ in the "actions only" condition.
  • Reduced Uncertainty: Both humans and the model showed significantly lower variance and faster convergence to the true goal when instructions were present.
  • Accuracy: On average, the model assigned a higher probability to the true goal than humans did ($p < 0.001$), suggesting it is an effective (and perhaps slightly more "optimal") observer of cooperative behavior.
  • Ablation Importance: A baseline model that ignored instructions performed significantly worse at explaining human behavior ($R = 0.87$), proving that you cannot understand human cooperation by looking at actions alone.

Limitations and Future Work

While successful, the authors note several areas for improvement:

  • Bounded Rationality: The current model assumes agents are "Boltzmann-rational." It struggles if a human stays idle for a few turns or takes a highly sub-optimal path, which happens often in the real world.
  • Heuristic Salience: The definition of what makes an action "salient" enough to mention was manually defined. Future versions could derive this automatically by calculating which actions are most "informative" to a listener.
  • Complexity of Scenarios: The gridworld is a "toy" environment. Scaling this to continuous 3D spaces or more complex social hierarchies (where agents might have conflicting goals) remains a major challenge.

Ultimately, this work provides a blueprint for AI assistants that don't just follow orders, but actually understand the broader cooperative context of the teams they are part of.

Summary updated

BibTeX
@inproceedings{ying2024inferring,
  author = {Lance Ying and Tan Zhi-Xuan and Vikash Mansinghka and Joshua B. Tenenbaum},
  title = {{Inferring the Goals of Communicating Agents from Actions and Instructions}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaaiss.v2i1.27645},
}
Figure