Program synthesis aims to automatically generate an executable program that conforms to the given specification. Recent advancements have demonstrated that deep neural methodologies and large-scale pretrained language models are highly proficient in capturing program semantics. For robot programming, prior works have facilitated program synthesis by incorporating global environments. However, the assumption of acquiring a comprehensive understanding of the entire environment is often excessively challenging to achieve. In this work, we present a framework that learns to synthesize a program by rectifying potentially erroneous code segments, with the aid of partially observed environments. To tackle the issue of inadequate attention to partial observations, we propose to first learn an environment embedding space that can implicitly evaluate the impacts of each program token based on the precondition. Furthermore, by employing a graph structure, the model can aggregate both environmental and syntactic information flow and furnish smooth program rectification guidance. Extensive experimental evaluations and ablation studies on the partially observed VizDoom domain authenticate that our method offers superior generalization capability across various tasks and greater robustness when encountering noises.
翻译:程序合成旨在根据给定规范自动生成可执行程序。近年来的研究表明,深度神经网络方法和大规模预训练语言模型在捕捉程序语义方面表现出极高的能力。在机器人编程领域,已有研究通过整合全局环境来促进程序合成。然而,获取对整个环境的全面理解这一假设往往难以实现。在本工作中,我们提出一个框架,借助部分可观测环境,通过纠正可能错误的代码段来学习合成程序。为解决对部分观测关注不足的问题,我们首先学习一个环境嵌入空间,该空间能够基于前置条件隐式评估每个程序标记的影响。此外,通过采用图结构,模型可以聚合环境和语法信息流,并提供平滑的程序纠正指导。在部分可观测的VizDoom领域进行的广泛实验评估和消融研究证实,我们的方法在跨任务泛化能力及面对噪声时的鲁棒性方面均具有优越性。