NL2TL: Transforming Natural Languages to Temporal Logics using Large Language Models
Yongchao Chen, Rujul Gandhi, Yang Zhang, Chuchu Fan
Abstract
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. 12
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 9809b6e0-c215-482d-bad7-dc14262ae7edCited by top-tier papers13
- AlphaBench: Benchmarking Large Language Models in Formulaic Alpha Factor MiningHaochen Luo, Ho Tin Ko, Jiandong Chen, David Q. Sun et al.ICLR 2026 · 8 citations
- Ground-Compose-Reinforce: Grounding Language in Agentic Behaviours using Limited DataAndrew C. Li, Toryn Q. Klassen, Andrew Wang, Parand A. Alamdari et al.NeurIPS 2025 · 5 citations
- Bridging Natural Language and Formal Specification-Automated Translation of Software Requirements to LTL via Hierarchical Semantics Decomposition Using LLMsZhi Ma, Cheng Wen, Zhexin Su, Xiao Liang et al.ASE 2025 · 3 citations
- Progress Reward Model for Reinforcement Learning via Large Language ModelsXiuhui Zhang, Ning Gao, Xingyu Jiang, Yihui Chen et al.NeurIPS 2025 · 3 citations
- Towards Language Model Guided TLA+ Proof AutomationYuhao Zhou, Stavros TripakisFM 2026 · 1 citation
Builds on3
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Selection-Inference: Exploiting Large Language Models for Interpretable Logical ReasoningAntonia Creswell, Murray Shanahan, Irina HigginsICLR 2023 · 110 citations
- DeepSTL - From English Requirements to Signal Temporal LogicJie He, Ezio Bartocci, Dejan Nickovic, Haris Isakovic et al.ICSE 2022 · 35 citations
Related papers
- ADARULE: LLM-Driven Natural Language to LTL Conversion via Pattern-Adaptive Rule InductionJiayi Hu, Jingling Sun, Chong Wang, Yihao Huang et al.ICSE 2026
- Automating Requirements Formalization: Using LLMs and Low-Complexity Distinguishing Traces for Semantic ValidationDaniel Mendoza, Anastasia Mavridou, Andreas Katis, Caroline TrippelICSE 2026
- VERIFY: A Novel Multi-Domain Dataset Grounding LTL in Contextual Natural Language via Provable Intermediate LogicPaapa Quansah, Pablo Rivas, Ernest BonnahICLR 2026
- Do LLMs Really Struggle at NL-FOL Translation? Revealing Their Strengths via a Novel Benchmarking StrategyAndrea Brunello, Luca Geatti, Michele Mignani, Angelo Montanari et al.AAAI 2026
- RESTL: Reinforcement Learning Guided by Multi-Aspect Rewards for Signal Temporal Logic TransformationYue Fang, Zhi Jin, Jie An, Hongshen Chen et al.AAAI 2026 · 1 citation
