Learning Automata-Based Task Knowledge Representation from Large-Scale
Generative Language Models
Automata-based representations play an important role in control and planning in sequential decision-making, but obtaining high-level task knowledge for building automata is often difficult. Although large-scale generative language models (GLMs) can help automatically distill task knowledge, the textual outputs from GLMs are not amenable for formal verification or use in sequential decision-making. We propose a novel algorithm named GLM2FSA, which obtains high-level task knowledge represented in a finite state automaton (FSA) from a given brief description of the task goal. GLM2FSA sends queries to a GLM for task knowledge in textual form and then builds an FSA to represent the textual knowledge. It fills the gap between text and automata-based representations, and the constructed FSA can be directly utilized in formal verification. We provide an algorithm for iteratively refining the queries to the GLM based on the outcomes, e.g., counter-examples, from verification. We demonstrate the algorithm on examples that range from everyday tasks, e.g., crossing a road and making coffee, to security applications to laboratory safety protocols.
View on arXiv