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

Temporal Logic (TL), especially Signal Temporal Logic (STL), enables precise formal specification, making it widely used in cyberphysical 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 a NL-STL dataset named STL-Diversity-Enhanced (STL-DivEn), comprising 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.

Authors

Publication Details

Published
2025-01-01
DOI
https://doi.org/10.18653/v1/2025.findings-acl.544
Primary Topic
Natural Language Processing Techniques
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

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

Naijun Zhan, Jie An, Zhi Jin, Xiaohong Chen et al.
Natural Language Processing Techniques
article

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

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

Abstract

Temporal Logic (TL), especially Signal Temporal Logic (STL), enables precise formal specification, making it widely used in cyberphysical 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 a NL-STL dataset named STL-Diversity-Enhanced (STL-DivEn), comprising 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.

National Natural Science Foundation of China
Quality Education
Openalex Percentile: Top 90%
Natural Language Processing Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.