← 论文海报合集← Paper Notes|
ICML 2022 · 具身智能Embodied AI · LLM Planning

Language Models as Zero-Shot Planners: Extracting Actionable Knowledge for Embodied Agents

无需训练,直接从大型语言模型中提取可执行的具身行动知识Extracting executable embodied action knowledge directly from large language models, with no training required
Wenlong Huang · Pieter Abbeel · Deepak Pathak · Igor Mordatch  |  UC Berkeley · CMU · Google

大型语言模型(LLMs)在预训练阶段积累了丰富的世界知识。本文探究:这些知识能否直接用于将自然语言高层任务(如 "make breakfast")分解为可在仿真家庭环境中执行的动作序列,且无需任何额外训练?研究发现,足够大的 GPT-3 (175B) 和 Codex (12B) 可生成语义上堪比人类的计划,但计划的可执行率仅约 8–18%。通过三项推理时技术(语义动作翻译、自回归轨迹修正、动态示例选取),可执行率提升至约 73–79%,展示了从 LLMs 中萃取可操作知识的可行路径。Large language models (LLMs) accumulate rich world knowledge during pre-training. This paper asks: can that knowledge be used directly to decompose a high-level natural-language task (such as "make breakfast") into an action sequence executable in a simulated household environment, without any additional training? The authors find that sufficiently large models, GPT-3 (175B) and Codex (12B), produce plans whose semantics rival those written by humans, yet only about 8-18% of these plans are executable. Three inference-time techniques (semantic action translation, autoregressive trajectory correction, and dynamic example selection) raise executability to roughly 73-79%, demonstrating a viable path for extracting actionable knowledge from LLMs.

arXiv: 2022-01 VirtualHome 环境Environment GPT-3 175B · Codex 12B 📄 arXiv:2201.07207 Project Page
zero-shot planning large language models embodied agents action grounding semantic translation VirtualHome GPT-3 具身智能embodied AI 任务规划task planning in-context learning

01 动机Motivation

LLMs 通过海量文本预训练,内化了大量关于人类日常活动的世界知识。然而,先前研究大多将 LLMs 局限于语言生成与理解任务。本文提出核心问题:LLMs 中隐含的行动知识能否在无额外训练的情况下,直接驱动具身智能体执行家庭任务?LLMs internalize a great deal of world knowledge about everyday human activities through pre-training on massive text corpora. Prior work, however, has largely confined LLMs to language generation and understanding tasks. This paper poses the central question: can the action knowledge implicit in LLMs drive an embodied agent to carry out household tasks directly, without any additional training?

"We ask whether we can use such knowledge contained in LLMs not just for linguistic tasks, but to make goal-driven decisions that can be enacted in interactive, embodied environments."

挑战在于双重困境:LLMs 生成的自然语言计划语义上合理,却难以直接映射到环境支持的原子动作(如 [WALK] <bedroom>);而严格约束输出格式又会丢失 LLMs 的世界知识。本文在 VirtualHome 仿真环境中评估,该环境支持 42 种原子动作,覆盖 292 类日常家庭活动。The challenge is a two-sided dilemma: the natural-language plans generated by LLMs are semantically plausible yet hard to map onto the atomic actions the environment supports (such as [WALK] <bedroom>), whereas tightly constraining the output format discards the world knowledge held by LLMs. Evaluation is carried out in the VirtualHome simulator, which supports 42 atomic actions covering 292 kinds of everyday household activity.

teaser figure
Figure 1:左侧散点图对比不同模型的可执行率(Executability,x 轴)与语义正确性(Correctness,y 轴)。大型 LLMs(GPT-3 175B、Codex 12B)生成的计划正确性超越人类基准,但可执行率极低(约 8–18%)。经本文方法翻译后(Translated),可执行率大幅提升至约 73–79%,同时正确性小幅下降。右侧展示不同模型对同一任务生成计划的对比样本。Figure 1: The scatter plot on the left contrasts executability (x-axis) with semantic correctness (y-axis) across models. Plans from large LLMs (GPT-3 175B, Codex 12B) surpass the human baseline in correctness but are rarely executable (about 8-18%). After translation by the proposed method (Translated), executability rises sharply to roughly 73-79% while correctness drops slightly. The right side shows sample plans generated by different models for the same task.
18% → 79%Codex 12B 可执行率提升(Translated vs. Vanilla)Executability gain of Codex 12B (Translated vs. Vanilla)
7.79% → 73%GPT-3 175B 可执行率提升Executability gain of GPT-3 175B
77.86%Vanilla GPT-3 175B 人类评估正确性(超越人类基准 70.05%)Human-rated correctness of Vanilla GPT-3 175B (above the human baseline of 70.05%)
35.23%Translated Codex 12B 同时正确且可执行的比例Share of Translated Codex 12B plans that are both correct and executable

02 方法Method

本文提出一套推理时(inference-time)流程,将 Causal LM(Planning LM,如 GPT-3/Codex)与 Masked LM(Translation LM,如 Sentence-RoBERTa)配合使用,通过三个递进组件将自由文本计划翻译为环境可执行动作,全程不修改任何模型参数。The paper proposes an inference-time pipeline that pairs a Causal LM (the Planning LM, e.g. GPT-3/Codex) with a Masked LM (the Translation LM, e.g. Sentence-RoBERTa), translating free-form text plans into environment-executable actions through three progressive components, without modifying any model parameters.

method overview
Figure 2:方法概览。左:用 Causal LM 进行零样本规划,给定一个示例任务-动作对作为 prompt,让模型自动补全当前任务的动作步骤。中:用 Translation LM(Sentence-RoBERTa)将自由文本步骤通过余弦相似度映射到最近的合法环境动作。右:自回归轨迹修正,每步生成后立即翻译并追加到 prompt,使后续步骤基于合法动作续写。所有模型保持冻结。Figure 2: Method overview. Left: zero-shot planning with the Causal LM, where a single example task-action pair is given as the prompt and the model completes the action steps of the current task. Middle: the Translation LM (Sentence-RoBERTa) maps each free-form step to the nearest admissible environment action by cosine similarity. Right: autoregressive trajectory correction, where each generated step is translated immediately and appended to the prompt, so that later steps continue from admissible actions. All models remain frozen.

组件 1:通过语义翻译解析合法动作(Admissible Action Parsing by Semantic Translation)Component 1: Admissible Action Parsing by Semantic Translation

VirtualHome 支持 47,522 种合法动作步骤的组合。Planning LM 直接输出的自然语言步骤(如 "microwave the chocolate milk")可能在词汇上与合法动作不匹配。本文预计算所有合法动作的 Sentence-RoBERTa 嵌入,在推理时将模型输出 â 通过余弦相似度映射到最近邻合法动作 aₑ:VirtualHome supports 47,522 combinations of admissible action steps. A natural-language step emitted directly by the Planning LM (such as "microwave the chocolate milk") may not match any admissible action lexically. The paper pre-computes Sentence-RoBERTa embeddings for all admissible actions and, at inference time, maps a model output â to its nearest-neighbour admissible action aₑ by cosine similarity:
C(f(â), f(aₑ)) = f(â)·f(aₑ) / (||f(â)|| · ||f(aₑ)||)

组件 2:自回归轨迹修正(Autoregressive Trajectory Correction)Component 2: Autoregressive Trajectory Correction

若对整个计划序列一次性翻译,前步错误会累积到后步。本文改为逐步生成:每步先采样 k 个候选动作短语,为每对(候选短语,合法动作)计算综合打分:Translating the whole plan sequence at once lets errors in earlier steps accumulate into later ones. Generation therefore proceeds step by step: at each step k candidate action phrases are sampled, and a combined score is computed for every (candidate phrase, admissible action) pair:
argmax[aₑ] max[â] C(f(â), f(aₑ)) + β·P_θ(â)
其中 β 是平衡语义相似度与语言模型置信度的权重系数。选出最高分的合法动作后追加到 prompt,使后续步骤在合法动作基础上续写。若 50% 以上样本为空或打分低于阈值 ε,则提前终止程序。where β is a weight balancing semantic similarity against language-model confidence. The highest-scoring admissible action is appended to the prompt, so that later steps continue from admissible actions. If more than 50% of the samples are empty or the score falls below a threshold ε, the program terminates early.

组件 3:动态示例选取(Dynamic Example Selection)Component 3: Dynamic Example Selection

固定 prompt 示例不能反映查询任务的具体环境约束。本文复用 Translation LM,从 204 个示例任务中选取与查询任务语义最相似的任务-计划对作为 prompt 示例:A fixed prompt example cannot reflect the specific environment constraints of the query task. The paper reuses the Translation LM to select, out of 204 example tasks, the task-plan pair that is semantically most similar to the query task as the prompt example:
(T*, E*) = argmax C(f(T), f(Q))
例如,查询任务 "Apply lotion" 会自动选取 "Shave" 作为最相似示例,因为两者共享刮胡/涂抹步骤的动作模式。For instance, the query task "Apply lotion" automatically selects "Shave" as its most similar example, because the two share the action pattern of shaving and applying steps.

03 实验Experiments

实验在 VirtualHome 环境中的 88 个 held-out 任务、7 个家庭场景上进行,评估两个维度:Executability(可执行率,程序能否正确解析并满足环境前后条件)和 Correctness(正确性,由 10 位 Amazon Mechanical Turk 人类标注员判断动作序列是否完成任务)。还报告 LCS(最长公共子序列)作为代理指标。Experiments run on 88 held-out tasks across 7 household scenes in VirtualHome and assess two dimensions: Executability (whether the program parses correctly and satisfies the environment's pre- and post-conditions) and Correctness (whether the action sequence completes the task, judged by 10 human annotators on Amazon Mechanical Turk). LCS (longest common subsequence) is also reported as a proxy metric.

results table and analysis
Table 1 & Figure 4(来自论文 p.9):主要结果。Vanilla LLMs(未经翻译)中,GPT-3 175B 正确性达 77.86%,超越人类基准(70.05%),但可执行率仅 7.79%。经三项技术翻译后,Translated Codex 12B 可执行率升至 78.57%,Translated GPT-3 175B 升至 73.05%。同时正确且可执行的比例:Translated Codex 35.23%,Translated GPT-3 27.27%(人类基准 65.91%,仍有较大差距)。Table 1 & Figure 4 (from p.9 of the paper): main results. Among Vanilla LLMs (untranslated), GPT-3 175B reaches 77.86% correctness, above the human baseline (70.05%), yet only 7.79% executability. After translation by the three techniques, Translated Codex 12B rises to 78.57% executability and Translated GPT-3 175B to 73.05%. Share of plans that are both correct and executable: 35.23% for Translated Codex and 27.27% for Translated GPT-3 (human baseline 65.91%, still a sizeable gap).
方法MethodExecutabilityLCSCorrectness(人类评估)Correctness (human eval)
Vanilla GPT-2 117M18.66%3.19%15.81% (±4.90%)
Vanilla GPT-2 1.5B39.40%7.78%29.25% (±5.28%)
Vanilla Codex 12B18.07%16.97%64.87% (±5.41%)
Vanilla GPT-3 175B7.79%17.82%77.86% (±6.42%)
Human100.00%N/A70.05% (±5.44%)
Fine-tuned GPT-3 13B66.07%34.08%64.92% (±5.96%)
Translated Codex 12B(本文)Translated Codex 12B (ours)78.57%24.72%54.88% (±5.90%)
Translated GPT-3 175B(本文)Translated GPT-3 175B (ours)73.05%24.09%66.13% (±8.38%)
qualitative results
Figure 3:VirtualHome 中生成程序的可视化执行示例。上排为任务 "Complete Amazon Turk Surveys"(依次执行:走到家庭办公室 → 坐在椅子上 → 开电脑 → 看电脑屏幕);下排为任务 "Get Glass of Milk"(走到厨房 → 开冰箱 → 拿牛奶 → 关冰箱)。说明 LLMs 不仅能生成合理计划,其行动知识也可在具身环境中落地。Figure 3: Visualized execution of generated programs in VirtualHome. Top row: the task "Complete Amazon Turk Surveys" (walk to the home office → sit on the chair → switch on the computer → look at the computer screen); bottom row: the task "Get Glass of Milk" (walk to the kitchen → open the fridge → grab the milk → close the fridge). This shows that LLMs not only generate plausible plans, but that their action knowledge can also be grounded in an embodied environment.

消融实验(Ablations)Ablations

对三个组件分别做消融(Table 2,论文 p.10):去掉任一组件均导致 Executability 和 LCS 下降。其中"去掉动作翻译"(w/o Action Translation)影响最大——Codex 12B 从 78.57% 降至 31.49%,GPT-3 175B 从 73.05% 降至 36.04%——证明语义翻译是提升可执行性的关键。"去掉轨迹修正"在 GPT-3 上出现 LCS 轻微提升(24.09% → 24.98%)但可执行率大幅下降(73.05% → 40.10%),表明轨迹修正在正确性和可执行性之间存在权衡。Translation LM 对比实验(Table 3)显示:使用预训练 Sentence-BERT 或 Sentence-RoBERTa 性能相近,而仅用 GloVe 均值向量性能显著下降(Executability: 46.92% vs. 78.57%)。The three components are ablated one at a time (Table 2, p.10 of the paper): removing any of them lowers both Executability and LCS. Dropping action translation (w/o Action Translation) hurts most, taking Codex 12B from 78.57% down to 31.49% and GPT-3 175B from 73.05% down to 36.04%, which shows that semantic translation is the key to executability. Dropping trajectory correction slightly raises LCS on GPT-3 (24.09% → 24.98%) but sharply lowers executability (73.05% → 40.10%), indicating a trade-off between correctness and executability. The Translation LM comparison (Table 3) shows that pre-trained Sentence-BERT and Sentence-RoBERTa perform comparably, whereas averaged GloVe vectors degrade markedly (Executability: 46.92% vs. 78.57%).

04 局限性Limitations

Note: 以下局限性均为论文作者在第 7 节(Conclusion, Limitations & Future Work)明确陈述。All the limitations below are stated explicitly by the authors in Section 7 (Conclusion, Limitations & Future Work).
正确性下降(Drop in Correctness)Drop in Correctness

本文方法可显著提升可执行率,但代价是正确性下降。动作翻译引入两类主要错误:(1)Translation LM 难以将复合指令(如 "brush teeth with toothbrush and toothpaste")准确映射到单一合法动作;(2)程序有时过早终止,因为部分必要动作或物体在 VirtualHome 中根本没有实现,Translation LM 无法找到足够相似的合法动作。这一问题也体现在人类编写程序仅有 70% 被认为完整。The method markedly improves executability, at the cost of correctness. Action translation introduces two main error types: (1) the Translation LM struggles to map a compound instruction (such as "brush teeth with toothbrush and toothpaste") onto a single admissible action; (2) the program sometimes terminates prematurely, because some necessary actions or objects are simply not implemented in VirtualHome and the Translation LM cannot find a sufficiently similar admissible action. The same issue shows up in human-written programs, only 70% of which are judged complete.

仅到中层粒度的落地(Mid-Level Grounding)Mid-Level Grounding

本文聚焦于高层任务到中层动作(如 "grab cup")的落地,假设存在一个低层控制器来执行这些中层动作,不涉及导航路径规划、操作轨迹等低层感知运动行为。要实现低层感知运动落地,仍需领域特定数据和微调。The work focuses on grounding high-level tasks into mid-level actions (such as "grab cup"), assuming a low-level controller exists to execute those mid-level actions; low-level sensorimotor behaviours such as navigation path planning and manipulation trajectories are out of scope. Low-level sensorimotor grounding would still require domain-specific data and fine-tuning.

不感知环境上下文(Ignorant of Environment Context)Ignorant of Environment Context

模型不接收环境观测或执行反馈,与 VirtualHome 人类标注者通过"想象"写程序的方式相同。因此,计划假设每类物体只有一个实例,无法处理需要区分多个物体的任务(如 "stack two plates on the right side of a cup")。The model receives neither environment observations nor execution feedback, mirroring the way VirtualHome's human annotators wrote programs "from imagination". Plans therefore assume a single instance of each object class and cannot handle tasks that require telling several objects apart (such as "stack two plates on the right side of a cup").

评估指标的局限性(Evaluation Protocol)Evaluation Protocol

用单一指标衡量开放式任务的计划质量本身就困难——可执行性和正确性存在内在权衡,两者需联合考量。LCS 只是语义正确性的代理指标(由于一个任务往往有多种完成方式,不同人写出的计划 LCS 上限约为 0.489),存在不完美之处。Measuring the plan quality of open-ended tasks with a single metric is inherently difficult: executability and correctness trade off against each other and must be considered jointly. LCS is merely a proxy for semantic correctness (because a task often admits many valid completions, plans written by different people reach an LCS ceiling of about 0.489), which makes it imperfect.