Automatic Generation of Safety-compliant Linear Temporal Logic via Large Language Model: A Self-supervised Framework
By: Junle Li, Meiqi Tian, Bingzhuo Zhong
Potential Business Impact:
Makes sure computer instructions are safe.
Converting high-level tasks described by natural language into formal specifications like Linear Temporal Logic (LTL) is a key step towards providing formal safety guarantees over cyber-physical systems (CPS). While the compliance of the formal specifications themselves against the safety restrictions imposed on CPS is crucial for ensuring safety, most existing works only focus on translation consistency between natural languages and formal specifications. In this paper, we introduce AutoSafeLTL, a self-supervised framework that utilizes large language models (LLMs) to automate the generation of LTL specifications complying with a set of safety restrictions while preserving their logical consistency and semantic accuracy. As a key insight, our framework integrates Language Inclusion check with an automated counterexample-guided modification mechanism to ensure the safety-compliance of the resulting LTL specifications. In particular, we develop 1) an LLM-as-an-Aligner, which performs atomic proposition matching between generated LTL specifications and safety restrictions to enforce semantic alignment; and 2) an LLM-as-a-Critic, which automates LTL specification refinement by interpreting counterexamples derived from Language Inclusion checks. Experimental results demonstrate that our architecture effectively guarantees safety-compliance for the generated LTL specifications, achieving a 0% violation rate against imposed safety restrictions. This shows the potential of our work in synergizing AI and formal verification techniques, enhancing safety-aware specification generation and automatic verification for both AI and critical CPS applications.
Similar Papers
Accelerated Learning with Linear Temporal Logic using Differentiable Simulation
Machine Learning (CS)
Teaches robots to follow rules safely and fast.
LTLCodeGen: Code Generation of Syntactically Correct Temporal Logic for Robot Task Planning
Robotics
Robots follow spoken directions to move around.
Generating Automotive Code: Large Language Models for Software Development and Verification in Safety-Critical Systems
Software Engineering
Makes car software safer and faster to build.