Syntax Is Easy, Semantics Is Hard: Evaluating LLMs for LTL Translation
Priscilla Kyei Danso, Mohammad Saqib Hasan, Niranjan Balasubramanian, Omar Chowdhury

TL;DR
This paper assesses how well large language models translate natural language into Linear Temporal Logic (LTL), highlighting their strengths in syntax and challenges in semantic understanding, with improvements from detailed prompts and code reformulation.
Contribution
It provides a comprehensive evaluation of LLMs for LTL translation, revealing insights into their capabilities and proposing methods to enhance performance.
Findings
LLMs perform better on syntactic than semantic aspects of LTL.
More detailed prompts improve translation accuracy.
Reformulating as Python code completion significantly boosts performance.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
