Presentation
LLM-Enhanced Two-Stage Signal Temporal Logic Automatic Transformation with Structured Intermediate Representation
DescriptionSignal Temporal Logic (STL) is a formal specification language for describing real-time and real-valued properties of Cyber-Physical Systems (CPS).Accurate and automatic translation of CPS specifications in natural language (NL) into formal STL formulas is crucial. Traditional methods relying on manual templates or deep-learning models are limited and lack flexibility.Recently, large-language models (LLMs) based methods partially addressed these issues, but did not consider the usefulness of the inherent structure of STL both for the translation itself and the result evaluation.To address these issues, we propose STLGen, a novel LLM-enhanced automatic transformation framework from NL to STL, which introduces a two-stage generation process with a structured natural language, named NL2, as the intermediate representation.In Stage 1, NL is converted into well-defined NL2 through structured prompt engineering. In Stage 2, NL2 is converted into STL formulas using a converter.Leveraging LLM-aided generation and closed-loop verification with matching algorithms, as well as fine-tune models in two stages with instruction fine-tuning and LoRA.Additionally, we introduce two evaluation metrics: the structure accuracy to assess STL syntax impact on logic and the STL-SCOTES to evaluate semantic consistency via STL trajectories.Experimental results demonstrate that our method outperforms state-of-the-art methods across the classic evaluation metrics and our proposed metrics.
Event Type
Research Manuscript
TimeTuesday, July 2811:36am - 11:50am PDT
LocationMtg Room 202C
Similar Presentations
