arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.20658cs.CL
收藏

利用具有多样外部知识的 LLM 增强从自然语言到信号时序逻辑的转换

Enhancing Transformation from Natural Language to Signal Temporal Logic Using LLMs with Diverse External Knowledge

School of Computer Science, Peking University(北京大学计算机学院);Key Laboratory of High Confidence Software Technologies (PKU), MOE(高可信软件技术重点实验室(PKU));National Key Laboratory of Space Integrated Information System, Institute of Software, Chinese Academy of Sciences(空间一体化信息系统国家重点实验室,软件研究所,中国科学院);East China Normal University(华东师范大学)

Yue Fang, Zhi Jin, Jie An, Hongshen Chen, Xiaohong Chen, Naijun Zhan

AI总结:

针对自然语言到 STL 自动转换数据不足的问题,本文构建含 16,000 样本的多样化 STL-DivEn 数据集,并提出基于外部知识、先生成后精炼的 KGST 框架,提升了转换准确率。

摘要:

时序逻辑(TL),尤其是信号时序逻辑(STL),能够实现精确的形式化规约,因此被广泛应用于自动驾驶和机器人等信息物理系统。将自然语言(NL)自动转换为 STL 是克服人工转换耗时且易出错这一局限的一种有吸引力的方法。然而,由于缺乏数据集,自动转换目前面临重大挑战,尚未得到充分研究。本文提出一个名为 STL-Diversity-Enhanced(STL-DivEn)的 NL-STL 数据集,其中包含 16,000 个富含多样模式的样本。为构建该数据集,我们首先人工创建一个小规模的 NL-STL 对种子集;接着,通过聚类识别具有代表性的示例,并用其指导大语言模型(LLM)生成额外的 NL-STL 对;最后,通过严格的基于规则的过滤器和人工验证确保多样性与准确性。此外,我们提出 Knowledge-Guided STL Transformation(KGST)框架,这是一种将自然语言转换为 STL 的新方法,包含基于外部知识的先生成后精炼过程。统计分析表明,STL-DivEn 数据集比现有 NL-STL 数据集表现出更高的多样性。而且,基于指标的评估和人工评估均表明,我们的 KGST 方法在 STL-DivEn 和 DeepSTL 数据集上的转换准确率优于基线模型。

英文摘要:

Temporal Logic (TL), especially Signal Temporal Logic (STL), enables precise formal specification, making it widely used in cyber-physical systems such as autonomous driving and robotics. Automatically transforming NL into STL is an attractive approach to overcome the limitations of manual transformation, which is time-consuming and error-prone. However, due to the lack of datasets, automatic transformation currently faces significant challenges and has not been fully explored. In this paper, we propose an NL-STL dataset named STL-Diversity-Enhanced (STL-DivEn), which comprises 16,000 samples enriched with diverse patterns. To develop the dataset, we first manually create a small-scale seed set of NL-STL pairs. Next, representative examples are identified through clustering and used to guide large language models (LLMs) in generating additional NL-STL pairs. Finally, diversity and accuracy are ensured through rigorous rule-based filters and human validation. Furthermore, we introduce the Knowledge-Guided STL Transformation (KGST) framework, a novel approach for transforming natural language into STL, involving a generate-then-refine process based on external knowledge. Statistical analysis shows that the STL-DivEn dataset exhibits more diversity than the existing NL-STL dataset. Moreover, both metric-based and human evaluations indicate that our KGST approach outperforms baseline models in transformation accuracy on STL-DivEn and DeepSTL datasets.

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

↑