Traffic rules formalization is crucial for verifying the compliance and safety of autonomous vehicles (AVs). However, manual translation of natural language traffic rules as formal specification requires domain knowledge and logic expertise, which limits its adaptation. This paper introduces TR2MTL, a framework that employs large language models (LLMs) to automatically translate traffic rules (TR) into metric temporal logic (MTL). It is envisioned as a human-in-loop system for AV rule formalization. It utilizes a chain-of-thought in-context learning approach to guide the LLM in step-by-step translation and generating valid and grammatically correct MTL formulas. It can be extended to various forms of temporal logic and rules. We evaluated the framework on a challenging dataset of traffic rules we created from various sources and compared it against LLMs using different in-context learning methods. Results show that TR2MTL is domain-agnostic, achieving high accuracy and generalization capability even with a small dataset. Moreover, the method effectively predicts formulas with varying degrees of logical and semantic structure in unstructured traffic rules.


    Access

    Check access

    Check availability in my library

    Order at Subito €


    Export, share and cite



    Title :

    TR2MTL: LLM based framework for Metric Temporal Logic Formalization of Traffic Rules


    Contributors:


    Publication date :

    2024-06-02


    Size :

    1218416 byte





    Type of media :

    Conference paper


    Type of material :

    Electronic Resource


    Language :

    English



    Temporal Logic Formalization of Marine Traffic Rules

    Krasowski, Hanna / Althoff, Matthias | IEEE | 2021


    TEMPORAL LOGIC FORMALIZATION OF MARINE TRAFFIC RULES

    Krasowski, Hanna / Althoff, Matthias | British Library Conference Proceedings | 2021


    Formalization of Intersection Traffic Rules in Temporal Logic

    Maierhofer, Sebastian / Moosbrugger, Paul / Althoff, Matthias | IEEE | 2022


    Formalization of Interstate Traffic Rules in Temporal Logic

    Maierhofer, Sebastian / Rettinger, Anna-Katharina / Mayer, Eva Charlotte et al. | IEEE | 2020


    FORMALIZATION OF INTERSTATE TRAFFIC RULES IN TEMPORAL LOGIC

    Maierhofer, Sebastian / Rettinger, Anna-Katharina / Mayer, Eva Charlotte et al. | British Library Conference Proceedings | 2020