Automaton-based representations of task knowledge play an important role in control and planning for sequential decision-making problems. However, obtaining the high-level task knowledge required to build such automata is often difficult. Meanwhile, large-scale generative language models (GLMs) can automatically generate relevant task knowledge. However, the textual outputs from GLMs cannot be formally verified or used for sequential decision-making. We propose a novel algorithm named GLM2FSA, which constructs a finite state automaton (FSA) encoding high-level task knowledge from a brief natural-language description of the task goal. GLM2FSA first sends queries to a GLM to extract task knowledge in textual form, and then it builds an FSA to represent this text-based knowledge. The proposed algorithm thus fills the gap between natural-language task descriptions and automaton-based representations, and the constructed FSA can be formally verified against user-defined specifications. We accordingly propose a method to iteratively refine the queries to the GLM based on the outcomes, e.g., counter-examples, from verification. We demonstrate GLM2FSA's ability to build and refine automaton-based representations of everyday tasks (e.g., crossing a road or making a phone call), and also of tasks that require highly-specialized knowledge (e.g., executing secure multi-party computation).
翻译:机器人基于生成式语言模型的任务知识表示在序列决策问题的控制和规划中起着重要作用。然而,获取构建这种自动机所需的高级任务知识通常很困难。与此同时,大规模生成式语言模型(GLM)可以自动生成相关的任务知识。然而,GLM的文本输出无法正式验证或用于序列决策制定。我们提出了一种名为GLM2FSA的新算法,它从任务目标的简短自然语言描述中构建编码高级任务知识的有限状态自动机(FSA)。GLM2FSA首先向GLM发送查询以提取文本形式的任务知识,然后构建一个FSA来表示这种文本基础的知识。因此,所提出的算法填补了自然语言任务描述与自动机表示之间的差距,并且可以根据用户定义的规范正式验证构建的FSA。我们因此提出了一种根据验证结果(例如反例)迭代改进GLM查询的方法。我们演示了GLM2FSA构建和改进日常任务(例如过马路或打电话)以及需要高度专业化知识的任务(例如执行安全的多方计算)的自动化表示的能力。