Propositional Linear Temporal Logic (LTL) is a popular formalism for specifying desirable requirements and security and privacy policies for software, networks, and systems. Yet expressing such requirements and policies in LTL remains challenging because of its intricate semantics. Since many security and privacy analysis tools require LTL formulas as input, this difficulty places them out of reach for many developers and analysts. Large Language Models (LLMs) could broaden access to such tools by translating natural language fragments into LTL formulas. This paper evaluates that premise by assessing how effectively several representative LLMs translate assertive English sentences into LTL formulas. Using both human-generated and synthetic ground-truth data, we evaluate effectiveness along syntactic and semantic dimensions. The results reveal three findings: (1) in line with prior findings, LLMs perform better on syntactic aspects of LTL than on semantic ones; (2) they generally benefit from more detailed prompts; and (3) reformulating the task as a Python code-completion problem substantially improves overall performance. We also discuss challenges in conducting a fair evaluation on this task and conclude with recommendations for future work.
Figures & tables
RQ
Task
Input
Output
Metric
Dataset
Size
Interfaces
Oracle
RQ syn1
Atomic proposition extraction
NL
AP set
Levenshtein, Jaccard
DS5prop
144
Minimal, Detailed
Manual
RQ syn2
Well-formedness
LTL
Yes/No
Accuracy, F1
DS6syntax
299
Minimal, Detailed
Grammar
RQ sem1
NL → Future LTL
NL + AP
LTL
Equiv., Entail.
DS1tricky , DS3book
306, 141
Minimal, Detailed, Python
NuSMV
RQ sem2
Trace classification
LTL + trace
Yes/No
Accuracy, F1
DS4trace
306
Minimal, Detailed, Python
NuSMV
RQ sem3
Trace generation
LTL
(τ+/τ−)
Trace satisfaction
DS4trace
306
Minimal, Detailed, Python
NuSMV
RQ sem4
NL → Past LTL
NL + AP
Past-LTL
Equiv., Entail.
DS2pastltl
294
Minimal, Detailed, Python
NuSMV
Table 1. Task–evaluation mapping across experiments, research questions, datasets, and interfaces.
Figure 1. Performance per model and interface (precision, recall, F1-score, Jaccard similarity, Levenshtein similarity) for Atomic Proposition Extraction. Line chart comparing Detailed vs. Minimal interface performance across F1, precision, recall, Jaccardi, and Levenshtein metrics.
Figure 2. Detailed vs. Minimal Interface performance. Accuracy represents the fraction of correctly classified formulas. Precision and Recall measure soundness and completeness, respectively. FPR and FNR denote the rates of incorrectly accepted malformed formulas and incorrectly rejected well-formed formulas. Heatmap of Detailed vs. Minimal Interface performance.
Figure 3. Semantic performance of NL → LTL translation evaluated via bidirectional entailment. Equiv. denotes semantic equivalence ( φGT⇔φPred ), Sound. denotes ground-truth-to-prediction entailment ( φGT⇒φPred ), Compl. denotes prediction-to-ground-truth entailment ( φPred⇒φGT ), and Syntax reports well-formed LTL outputs. Heatmap of Detailed vs. Minimal vs. Python Interface performance of NL→LTL translation.
Dataset
Equiv.
Sound.
Compl.
Syntax
Little Tricky Logic
23.9%
33.7%
31.8%
48.7%
Textbook
24.8%
35.2%
31.3%
50.0%
Table 2. Semantic and syntactic correctness of predicted LTL formulas by dataset. ( Equiv. ) is the logical equivalence between the predicted and ground truth formulas ( φpred≡φgt ). ( Sound. ) holds when the ground truth formula entails the generated formula ( φgt⊨φpred ), while ( Compl. ) holds when the predicted formula entails the predicted formula ( φpred⊨φgt ). Syntax is the percentage of syntactically valid LTL formulas.
Interface
True Sat.
False Sat.
True Viol.
False Viol.
Sound.
Compl.
Minimal
56.1%
43.9%
59.0%
41.0%
56.1%
59.0%
Detailed
64.3%
35.7%
71.2%
28.8%
64.3%
71.2%
Python
78.0%
22.0%
81.3%
18.7%
78.0%
81.3%
Table 3. Classification outcomes for satisfying and violating traces. ( True Sat. ) denotes correctly accepted satisfying traces, while ( False Sat. ) denotes satisfying traces incorrectly rejected. ( True Viol. ) denotes correctly rejected violating traces, while ( False Viol. ) denotes violating traces incorrectly accepted. ( Sound. ) corresponds to acceptance accuracy on satisfying traces, and ( Compl. ) corresponds to rejection accuracy on violating traces. Results are aggregated by interface type.
Figure 4. Trace generation results on Little Tricky Logic dataset ( Greenman et al., 2022 ) for different interfaces. Line Chart of Detailed vs. Minimal vs. Python Interface performance of Trace generation.
Effectively translating between natural language (NL) and formal logics like Linear Temporal Logic (LTL) requires expertise that limits formal verification's reach in safety-critical development. Template-based approaches sacrifice expressiveness for reliability; neural methods achieve fluency but provide no correctness guarantees. We present NeuroNL2LTL, a neurosymbolic architecture unifying learned translation with formal verification. NeuroNL2LTL routes translation through an intermediate representation whose mapping to LTL is structure-preserving by construction. Generated specifications undergo satisfiability and non-triviality checking; a minimal-edit repair mechanism corrects near-miss outputs before they reach downstream tools. The central innovation is verifier-in-the-loop training: verification outcomes serve as reward signals for reinforcement learning, producing neural components that optimize directly for formal correctness. On 200,000+ requirements spanning aerospace, robotics, autonomous vehicles, and ten additional domains, NeuroNL2LTL achieves 28% semantic equivalence with reference specifications while ensuring 86% of outputs are verified satisfiable. The system also generates contextually grounded explanations from LTL, enabling domain experts to validate specifications without specialized training. This work demonstrates that formal verification can function as both training objective and runtime filter for neural specification systems, allowing us to build neural-based tools whose reliability derives from logical guarantees rather than statistical confidence.
Linear Temporal Logic (LTL) is one of the most widely adopted languages for specifying temporal extended objectives in AI, with applications ranging from reactive synthesis to stochastic planning in Markov decision processes and reinforcement learning. Traditionally, solving any of these problems requires translating the LTL specification to a nondeterministic automata on infinite words and then determinizing it, a step that is notoriously difficult in theory and in practice. Recent work has introduced LTLf+, which lifts the finite-trace logic LTLf to infinite traces. LTLf+ has the same expressive power as LTL, yet it retains most of the crucial advantages of its base logic LTLf. Most reasoning in LTLf+ rests on finite automata on finite words, for which we have not only a canonical minimal representation but also an efficient determinization procedure. In this work we present the first translation from LTL to LTLf+. We first normalize an LTL formula into the syntactic reactivity fragment of the Manna-Pnueli hierarchy, to create the general fragment-based shape of LTLf+. We then present linear translations for each individual component of that fragment. As a consequence of this translation, the expanding body of techniques developed for LTLf+ now becomes available to many AI problems currently formulated in LTL. We further show that this comes at no asymptotic cost, as the pipeline from LTL to automaton via LTLf+ remains doubly exponential.
Christoph Weinhuber, Maximilian Prokop, Giuseppe De Giacomo +1
University of Oxford · 2Technical University of Munich · 3Masaryk University Brno +1
Translating informal requirements into formal specifications is challenging due to the ambiguity and variability of natural language (NL). This challenge is particularly pronounced when relying on compact (small and medium) language models, which may lack robust knowledge of temporal logic and thus struggle to produce syntactically valid and consistent formal specifications. In this work, we focus on enabling resource-efficient open-weight models (4B--14B parameters) to generate correct linear temporal logic (LTL) specifications from informal requirements. We present LTLGuard, a modular toolchain that combines constrained generation with formal consistency checking to generate conflict-free LTL specifications from informal input. Our method integrates the generative capabilities of model languages with lightweight automated reasoning tools to iteratively refine candidate specifications, understand the origin of the conflicts and thus help in eliminating inconsistencies. We demonstrate the usability and the effectiveness of our approach and perform quantitative evaluation of the resulting framework.
AIT Austrian Institute of Technology, Vienna, Austria · Aristotle University of Thessaloniki, Thessaloniki, Greece · Northeatern University, Boston, MA, USA