Grounded Decoding: Guiding Text Generation with Grounded Models for Embodied Agents

Wenlong Huang, Fei Xia, Dhruv Shah, Danny Driess, Andy Zeng, Yao Lu, Pete Florence, Igor Mordatch, Sergey Levine, Karol Hausman, brian ichter

Introduction

Large Language Models (LLMs) possess an incredible amount of "common sense" and semantic knowledge, but they operate essentially as "brains in a vat." They lack physical bodies, cannot perceive their immediate environment, and do not inherently know if a specific action—like "pick up the red bowl"—is physically possible given a robot's current state.

Conversely, traditional robotic policies are "grounded." They know exactly how to move a gripper or navigate a room, but they lack high-level reasoning and semantic understanding. They struggle to deduce that a user saying "I'm hungry" implies the robot should go find a snack.

Previous attempts to bridge this gap, such as the SayCan system, required the robot to choose from a pre-defined, fixed list of skills. This approach is inherently limiting: if a skill isn't on the list, the robot cannot execute it. Grounded Decoding (GD) introduces an open-vocabulary system where a robot can generate free-form text plans that are automatically constrained by what is physically achievable in its environment.

The Grounded Decoding Approach

The core innovation of this paper is intervening in the LLM's generation process at the token level (word by word), rather than letting the LLM generate a complete sentence and checking its validity afterward.

Grounded Decoding combines LLM and Grounded Model probabilities at the token level to select physically viable actions.

Grounded Decoding formulates this as a probabilistic filtering problem. At each step of generating a word, the system calculates a combined score:

$$p_{GD} \propto p_{LLM} \times p_{G}$$

  • $p_{LLM}$: The probability of the next word according to the LLM (representing semantic likelihood).
  • $p_{G}$: The probability according to a Grounded Model (GM) (representing physical likelihood or safety).

This architecture allows researchers to "plug and play" different types of Grounded Models:

  1. Affordance Models: Value functions predicting if a robot can successfully execute a specific command in its current state.
  2. Safety/Preference Models: Rule-based functions that penalize dangerous tokens or prioritize specific user preferences.
  3. Multimodal Models: Vision-language models (like CLIP or OWL-ViT) that confirm if an object mentioned by the LLM is actually visible in the camera feed.

By utilizing search algorithms like Beam Search, the robot can look a few words ahead to ensure the plan it is constructing remains grounded in reality.

Key Insights and Performance

The researchers evaluated Grounded Decoding across three distinct domains: a simulated tabletop rearrangement task, a 2D maze navigation environment requiring long-horizon reasoning, and a real-world kitchen using a mobile manipulator robot.

Open Vocabulary and Efficiency

Because GD operates at the token level, it is not restricted to a fixed menu of skills. It can generate any command, provided the grounded model can score it. Furthermore, compared to systems like SayCan—which must score every possible skill string at every step—GD is roughly 113x more efficient in token processing, as it only evaluates the most likely tokens proposed by the LLM.

Compositionality

Grounded Decoding naturally supports compositionality. To create a robot that is both safe and follows user preferences, the system simply multiplies the LLM's output by both a Safety GM and a Preference GM.

Real-World Performance and Chain-of-Thought

In tabletop tasks, GD significantly outperformed ungrounded LLMs and pure robotic policies, achieving a 50% success rate on "unseen" tasks where baselines struggled. In the 2D Maze, GD solved "Hard" tasks (requiring 100+ steps) with an 88% success rate, avoiding the infinite loops that trapped ungrounded models.

A mobile manipulator uses visually-grounded chain-of-thought to resolve ambiguous requests like 'a drink and a snack' into specific available items.

In the real-world kitchen environment, GD matched previous state-of-the-art systems on simple tasks but outperformed them by 25% on ambiguous tasks. This was largely due to a technique the authors call Visually-Grounded Chain-of-Thought. By allowing the LLM to "think" before acting—using brackets to signal when it needs to consult the grounded vision model—the robot could disambiguate vague human requests based on its actual surroundings (e.g., translating "bring me a snack" to "I will find the [apple]").

Limitations and Future Work

While powerful, Grounded Decoding is fundamentally bottlenecked by the quality of its Grounded Models; if an affordance model incorrectly assumes an object is reachable, the LLM will generate a failing plan. Additionally, the system still requires careful prompt engineering to keep the LLM within the robot's actionable vocabulary.

Currently, GD relies on "late fusion," where grounding occurs after the LLM has processed its internal state. The authors suggest that exploring "early fusion"—baking physical constraints directly into the LLM's attention layers—could represent a highly promising direction for future embodied AI research.

Summary updated

BibTeX
@inproceedings{huang2023grounded,
  author = {Wenlong Huang and Fei Xia and Dhruv Shah and Danny Driess and Andy Zeng and Yao Lu and Pete Florence and Igor Mordatch and Sergey Levine and Karol Hausman and brian ichter},
  title = {{Grounded Decoding: Guiding Text Generation with Grounded Models for Embodied Agents}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=JCCi58IUsh},
}
Figure