GhostShell: Streaming LLM Function Calls for Concurrent Embodied Programming

📄 arXiv: 2508.05298v2 📥 PDF

作者: Jian Gong, Youwei Huang, Bo Yuan, Ming Zhu, Zhou Liao, Jianhang Liang, Juncheng Zhan, Jinke Wang, Hang Shu, Mingyue Xiong, Yanjun Ye, Yufan Zu, Yang Zhou, Yihan Ding, Xuannian Chen, Xingyu Lu, Runjie Ban, Bingchao Huang, Fusen Liu

分类: cs.RO

发布日期: 2025-08-07 (更新: 2025-08-08)

备注: 17 pages, 5 figures, conference


💡 一句话要点

GhostShell:用于并发具身编程的流式LLM函数调用方法

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 具身智能 大型语言模型 函数调用 流式处理 机器人控制 行为编程 实时交互

📋 核心要点

  1. 现有具身系统行为编程依赖预设动作序列或行为树,缺乏灵活性和实时性。
  2. GhostShell通过流式LLM函数调用,驱动具身系统即时行动,实现并发行为编程。
  3. 实验表明,GhostShell在行为正确性和响应速度上均优于传统方法,并具有良好的鲁棒性和泛化能力。

📝 摘要(中文)

我们提出了GhostShell,一种新颖的方法,它利用大型语言模型(LLM)来实现具身系统的流式和并发行为编程。与依赖于预先安排的动作序列或行为树的传统方法不同,GhostShell通过在LLM流式传输token时增量地发出函数调用,从而驱动具身系统即时行动。GhostShell具有流式XML函数token解析器、动态函数接口映射器和多通道调度器,该调度器协调通道内同步和通道间异步函数调用,从而在LLM指导下协调多个机器人组件之间的串行-并行具身动作。我们通过在我们的机器人原型COCO上进行的跨34个真实世界交互任务和多个LLM后端的全面基础实验来评估GhostShell。结果表明,我们的方法使用Claude-4-Sonnet实现了0.85的最先进的行为正确性指标,并且与原生LLM函数调用API相比,响应时间最多快66倍。GhostShell还证明了在长时程多模态任务中的有效性,表现出强大的鲁棒性和泛化能力。

🔬 方法详解

问题定义:现有具身系统通常依赖预先定义的动作序列或行为树,这些方法难以适应复杂和动态的环境。它们缺乏实时性和灵活性,无法根据LLM的实时推理结果进行动态调整。原生LLM函数调用API虽然可以实现一定的动态性,但响应速度较慢,难以满足实时交互的需求。

核心思路:GhostShell的核心思路是利用LLM的流式输出特性,将LLM生成的token流实时解析为函数调用指令,从而驱动具身系统执行动作。通过这种方式,系统可以根据LLM的实时推理结果,动态地调整行为,实现更灵活和智能的交互。

技术框架:GhostShell包含三个主要模块:流式XML函数token解析器、动态函数接口映射器和多通道调度器。首先,流式XML函数token解析器负责将LLM输出的token流解析为XML格式的函数调用指令。然后,动态函数接口映射器将这些指令映射到具体的机器人动作函数。最后,多通道调度器负责协调不同机器人组件之间的动作,实现同步和异步的并行执行。

关键创新:GhostShell的关键创新在于其流式处理架构,它允许系统在LLM生成token的同时就开始执行动作,从而显著降低了响应时间。此外,多通道调度器能够协调多个机器人组件的动作,实现更复杂的行为。与传统的预定义动作序列或行为树相比,GhostShell具有更高的灵活性和适应性。

关键设计:GhostShell使用XML作为函数调用的格式,便于LLM生成和解析。动态函数接口映射器允许系统灵活地添加和修改机器人动作函数。多通道调度器采用优先级队列来管理不同通道的动作,并支持同步和异步两种执行模式。具体的参数设置和损失函数(如果存在)在论文中未明确提及,属于未知信息。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

GhostShell在34个真实世界交互任务中进行了评估,结果表明,使用Claude-4-Sonnet时,行为正确性指标达到了0.85,显著优于其他方法。与原生LLM函数调用API相比,GhostShell的响应时间最多快66倍,极大地提升了系统的实时性。此外,GhostShell在长时程多模态任务中表现出强大的鲁棒性和泛化能力。

🎯 应用场景

GhostShell可应用于各种需要实时交互的具身智能系统,例如家庭服务机器人、工业自动化机器人、医疗辅助机器人等。它能够使这些系统更智能、更灵活地与环境和人类交互,从而提高工作效率和服务质量。未来,GhostShell有望成为构建下一代具身智能系统的关键技术。

📄 摘要(原文)

We present GhostShell, a novel approach that leverages Large Language Models (LLMs) to enable streaming and concurrent behavioral programming for embodied systems. In contrast to conventional methods that rely on pre-scheduled action sequences or behavior trees, GhostShell drives embodied systems to act on-the-fly by issuing function calls incrementally as tokens are streamed from the LLM. GhostShell features a streaming XML function token parser, a dynamic function interface mapper, and a multi-channel scheduler that orchestrates intra-channel synchronous and inter-channel asynchronous function calls, thereby coordinating serial-parallel embodied actions across multiple robotic components under LLM guidance. We evaluate GhostShell on our robotic prototype COCO through comprehensive grounded experiments across 34 real-world interaction tasks and multiple LLM backends. The results demonstrate that our approach achieves a state-of-the-art Behavioral Correctness Metric of 0.85 with Claude-4-Sonnet, and up to 66X faster response times compared to native LLM function calling APIs. GhostShell also proves effective in long-horizon multimodal tasks, exhibiting strong robustness and generalization capabilities.