NL2TL:使用大型语言模型将自然语言转换为时序逻辑
NL2TL: Transforming Natural Languages to Temporal Logics using Large Language Models
AI总结:
本文提出NL2TL框架,利用LLM构建NL-TL对数据集并微调T5模型,通过提升版本隐藏特定原子命题以增强跨领域泛化能力,在五个领域测试中仅用不到10%数据即达超95%准确率。
摘要:
时序逻辑(TL)可用于在许多工程应用中严格指定系统的高层规范。由于缺乏数据集和跨不同应用领域的可泛化模型,自然语言(NL)与TL之间的转换一直未被充分研究。在本文中,我们提出了一个准确且可泛化的框架,将英语指令从NL转换为TL,并探索了在多个阶段使用大型语言模型(LLM)。我们的贡献有两方面。首先,我们开发了一个结合LLM和人工标注来创建NL-TL对数据集的框架,并发布了一个包含28K个NL-TL对的数据集。然后,我们在NL和TL的提升版本(即隐藏了特定的原子命题(AP))上微调T5模型。增强的泛化能力源于两方面:1)使用提升的NL-TL刻画了常见的逻辑结构,不受特定领域的约束;2)在数据集创建中应用LLM大幅提升了语料的丰富性。我们在五个不同领域测试了训练模型的泛化能力。为实现完整的NL-TL转换,我们将提升模型与AP识别任务结合,或对每个特定领域进行进一步微调。在进一步微调中,与基线序列到序列(Seq2Seq)模型相比,我们的模型仅使用不到10%的训练数据便实现了更高的准确率(>95%)。
英文摘要:
Temporal Logic (TL) can be used to rigorously specify complex high-level specification for systems in many engineering applications. The translation between natural language (NL) and TL has been under-explored due to the lack of dataset and generalizable model across different application domains. In this paper, we propose an accurate and generalizable transformation framework of English instructions from NL to TL, exploring the use of Large Language Models (LLMs) at multiple stages. Our contributions are twofold. First, we develop a framework to create a dataset of NL-TL pairs combining LLMs and human annotation. We publish a dataset with 28K NL-TL pairs. Then, we finetune T5 models on the lifted versions (i.e., the specific Atomic Propositions (AP) are hidden) of the NL and TL. The enhanced generalizability originates from two aspects: 1) Usage of lifted NL-TL characterizes common logical structures, without constraints of specific domains. 2) Application of LLMs in dataset creation largely enhances corpus richness. We test the generalization of trained models on five varied domains. To achieve full NL-TL transformation, we either combine the lifted model with AP recognition task or do the further finetuning on each specific domain. During the further finetuning, our model achieves higher accuracy (>95%) using only <10% training data, compared with the baseline sequence to sequence (Seq2Seq) model.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。