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.


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

0
下载
关闭预览

相关内容

智能体技能综合综述:分类、技术与应用
专知会员服务
33+阅读 · 5月11日
AI智能体编程:技术、挑战与机遇综述
专知会员服务
48+阅读 · 2025年8月18日
《大型语言模型代码生成》综述
专知会员服务
70+阅读 · 2024年6月4日
变分自编码器VAE:一步到位的聚类方案
PaperWeekly
25+阅读 · 2018年9月18日
超全总结:神经网络加速之量化模型 | 附带代码
【干货】深入理解自编码器(附代码实现)
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 5月18日
VIP会员
最新内容
综述 | 世界动作模型:少做梦,多行动
专知会员服务
4+阅读 · 6月23日
美以伊冲突:无人机与人工智能的运用
专知会员服务
7+阅读 · 6月23日
《特种部队在透明战场中的生存力》最新报告
专知会员服务
4+阅读 · 6月23日
综述 | 3D场景图:开放挑战与未来方向
专知会员服务
8+阅读 · 6月22日
21世纪的无人机战争
专知会员服务
4+阅读 · 6月22日
《量子技术的军事任务技术适配与利用》
专知会员服务
5+阅读 · 6月22日
相关基金
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员