arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.23564cs.AIcs.CLcs.LG
收藏

ReCode:统一计划与行动以实现通用粒度控制

ReCode: Unify Plan and Action for Universal Granularity Control

DeepWisdom;The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州));Renmin University of China(中国人民大学);Zhejiang University(浙江大学);Université de Montréal & Mila(蒙特利尔大学及Mila)

Zhaoyang Yu, Jiayi Zhang, Huixue Su, Yufan Zhao, Yifan Wu, Mingyi Deng, Jinyu Xiang, Yizhang Lin, Lingxiao Tang, Yuyu Luo, Bang Liu, Chenglin Wu

AI总结:

ReCode通过递归代码生成统一规划与行动,实现通用粒度控制,提升智能体在不同决策粒度上的灵活性和效率。

摘要:

现实世界任务需要在不同粒度上做出决策,而人类擅长于此,是因为他们利用了统一的认知表示,其中规划本质上被视为一种高层次的行动形式。然而,当前基于大型语言模型(LLM)的智能体缺乏这种关键能力,无法在决策粒度上流畅切换。这一限制源于现有范式中强制将高层次规划与低层次行动割裂开,这会损害动态适应性和限制泛化能力。我们提出ReCode(递归代码生成),这是一种新的范式,通过在单一代码表示中统一规划与行动来解决这一限制。在此表示中,ReCode将高层次计划视为抽象占位函数,然后将这些函数递归分解为更细粒度的子函数,直到达到基本动作。这种递归方法消除了规划与行动之间的刚性边界,使智能体能够动态控制其决策粒度。此外,递归结构本身会生成丰富的多粒度训练数据,使模型能够学习层次化决策过程。大量实验表明,ReCode在推理性能上显著优于先进基线,并在训练中表现出卓越的数据效率,验证了我们的核心见解:通过递归代码生成统一规划与行动是实现通用粒度控制的强大而有效的方法。代码可在https://github.com/FoundationAgents/ReCode获取。

英文摘要:

Real-world tasks require decisions at varying granularities, and humans excel at this by leveraging a unified cognitive representation where planning is fundamentally understood as a high-level form of action. However, current Large Language Model (LLM)-based agents lack this crucial capability to operate fluidly across decision granularities. This limitation stems from existing paradigms that enforce a rigid separation between high-level planning and low-level action, which impairs dynamic adaptability and limits generalization. We propose ReCode (Recursive Code Generation), a novel paradigm that addresses this limitation by unifying planning and action within a single code representation. In this representation, ReCode treats high-level plans as abstract placeholder functions, which the agent then recursively decomposes into finer-grained sub-functions until reaching primitive actions. This recursive approach dissolves the rigid boundary between plan and action, enabling the agent to dynamically control its decision granularity. Furthermore, the recursive structure inherently generates rich, multi-granularity training data, enabling models to learn hierarchical decision-making processes. Extensive experiments show ReCode significantly surpasses advanced baselines in inference performance and demonstrates exceptional data efficiency in training, validating our core insight that unifying planning and action through recursive code generation is a powerful and effective approach to achieving universal granularity control. The code is available at https://github.com/FoundationAgents/ReCode.

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

↑