arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.13097cs.PLcs.AI

功能缓存嫁接:具身智能体的鲁棒且快速代码策略合成

Functional Cache Grafting: Robust and Rapid Code-Policy Synthesis for Embodied Agents

University of California, Berkeley(加州大学伯克利分校)

Saehun Chun, Wonje Choi, Sera Choi, Sanghyun Ahn, Honguk Woo

AI总结:

提出FCGraft框架,通过维护函数级验证代码骨架及其键值缓存,对新任务进行缓存嫁接(拼接和修补),减少预填充计算并复用验证结构,实现更鲁棒和快速的策略合成。

摘要:

编写代码的大型语言模型(CodeLLMs)通过将自然语言目标和环境约束转化为结构化控制程序,为具身智能体生成可执行的代码策略。然而,在开放域具身环境中,策略生成存在两个基本限制:(i) 由于长提示上的重复预填充计算导致的延迟解码,以及(ii) 由于完全生成式解码导致的鲁棒性有限,这常常产生API不匹配、缺少安全防护和不稳定的控制逻辑。为了解决这些限制,我们提出了FCGraft,一种功能缓存嫁接框架。FCGraft维护一个函数级验证代码骨架库及其相关的提示级Transformer键值(KV)缓存,并在提供新任务时通过检索相关函数并嫁接其KV缓存来合成新策略。给定检索到的函数缓存,FCGraft通过拼接(将缓存的函数片段组合成复合策略)和修补(仅局部调整必要的代码区域以满足任务特定参数和约束,且只需最少的额外解码)进行缓存嫁接。通过消除冗余的预填充计算,该方法减少了生成延迟,同时重用经过验证的控制结构提高了鲁棒性,相比提示级缓存方法RAGCache,任务成功率提高了18.31%,策略合成速度提高了2.3倍。

英文摘要:

Code-writing large language models (CodeLLMs) generate executable code policies for embodied agents by translating natural language goals and environmental constraints into structured control programs. However, policy generation in open-domain embodied environments suffers from two fundamental limitations: (i) delayed decoding caused by repetitive prefill computation over long prompts, and (ii) limited robustness due to fully generative decoding, which often produces API mismatches, missing safety guards, and unstable control logic. To address these limitations, we present FCGraft, a Functional Cache Grafting framework. FCGraft maintains a library of function-level validated code skeletons and their associated prompt-level Transformer key-value (KV) caches, and synthesizes new policies by retrieving relevant functions and grafting their KV caches when a new task is provided. Given retrieved function caches, FCGraft performs cache grafting via stitching, which composes cached function segments into a composite policy, and patching, which locally adapts only the necessary code regions to satisfy task-specific parameters and constraints with minimal additional decoding. By eliminating redundant prefill computation, this approach reduces generation latency, while reusing validated control structures improves robustness over prompt-level caching methods RAGCache, achieving 18.31% higher task success rate and 2.3x faster policy synthesis.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑