Manuscript Offprint

arXiv:2609.03161

NeuroSTAR: Automata-guided Neuro-symbolic Specification Formalization

Joy Saha, Trey Woodlief, Sebastian Elbaum, Matthew B. Dwyer

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Joy Saha

University of Virginia

Charlottesville, VA, USA

daa7mv@virginia.edu

Trey Woodlief

William & Mary

Williamsburg, VA, USA

woodlief@wm.edu

Sebastian Elbaum

University of Virginia

Charlottesville, VA, USA

selbaum@virginia.edu

Matthew B. Dwyer

University of Virginia

Charlottesville, VA, USA

matthewbdwyer@virginia.edu

Abstract—Automated translation of natural language (NL) descriptions into Linear Temporal Logic over finite traces (LTLf_{f}) is a prerequisite for automated formal verification of a system's dynamic behavior. Several LLM-based methods have recently shown potential for this task. However, they struggle with the nuance of natural language descriptions, which can lead LLMs to only partially capture the intended meaning. To address this limitation, we propose NEUROSTAR (Automata-guided Neuro-symbolic Specification Formalization), an NL-to-LTLf_{f} framework that builds on two insights. First, it leverages multiple generators to obtain diverse LTLf_{f} candidates. Second, it uses an automata-theoretic semantic comparison based on DFA traces to identify behavioral disagreements that guide formula refinement. We evaluate NEUROSTAR and show that it improves NL-to-LTLf_{f} translation performance by 8-18 percentage points relative to the prior state-of-the-art (SoTA) on unambiguous benchmarks. We further study its applicability to a body of driving law text, a complex, realistic, and reference-free domain critical for autonomous-vehicle specification. This study shows that NEUROSTAR can capture the necessary temporal semantics in 83.9% of the driving law sections, which demonstrates the effectiveness of automata-guided reference-free refinement in formalization.

Index Terms—Temporal logic, automated formalization, difference automata

I. INTRODUCTION

Temporal logics have been studied for nearly 5 decades [1]. Research into leveraging temporal logic specifications for system verification [2], monitoring [3], and synthesis [4] has moved from theory to application in domains like: planning [5], robotics [6], [7], automotive [8], [9], and aerospace [10].

Formal specifications in a suitable logic for such tasks are not always available; instead, behavior is typically described only in natural language [11], [12]. The software engineering community has put forth many efforts to support the development of formal temporal specifications, e.g.: documenting recurring specification patterns [13], mapping to them from structured natural language [14], mining them from system traces [15], and learning them from examples with side-constraints [16].

The advent of large language models (LLMs) has led to a surge of interest in exploring how they might facilitate the formalization of temporal requirements [17]–[26]. While these techniques have shown promise, none exploit the fact that the target temporal logic has a well-defined semantics that is amenable to symbolic encoding and algorithmic manipulation. Recent work [27] has shown that while LLMs can often produce syntactically correct formalizations, they are much less effective in capturing semantic constraints.

In this paper, we present NEUROSTAR, a neuro-symbolic approach that translates temporal requirements expressed in natural language (NL) into linear temporal logic over finite traces (LTLf_{f}). Like other approaches, NEUROSTAR leverages LLMs to translate natural language requirements to temporal logic specifications over a given set of atomic propositions (APs) that capture observations about the problem domain. Unlike prior work, NEUROSTAR converts temporal logic specifications to automata and uses them to generate symbolic representations of sets of traces on which alternative specifications disagree. We use those disagreements to drive an iterative refinement process where LLMs are tasked with minimizing those disagreements to converge on a final specification.

To evaluate NEUROSTAR, we began by replicating the prior SoTA, ADARULE [20]. During the replication process, we noticed inconsistencies and anomalies in the datasets used to train and evaluate both ADARULE and the baselines it compared with. In § III, we present a detailed analysis of ambiguity and other inconsistencies of those datasets. We also evaluate the extent to which these datasets capture the interpretive challenges present in real-world temporal requirements.

Our evaluation of NEUROSTAR demonstrates the value of the neuro-symbolic design, and we find that it establishes a new state of the art on benchmarks used in prior work [20]–[22], [28], [29]. Across six variants of four datasets from prior work [20], NEUROSTAR achieves the best or joint-best performance on five of them. We further explore the applicability of NEUROSTAR on a corpus of natural language requirements that codify the Virginia driving code [30], VALAW, which are challenging, semantically complex, layered natural language statements, with cross-references. On this corpus, NEUROSTAR produces formalizations that satisfy a necessary condition for correctness for 89 of 106 reviewed laws, correctly modeling obligations, exceptions, and interactions among multiple road users.

In summary, the primary contributions of this paper are:

(1) a comprehensive audit of widely used NL-to-LTL (f)_{(f)} 1^{1}

1^{1}LTL (f)_{(f)} refers to LTL and/or LTL f_{f} when interchangeable; see § II-A.

benchmarks, exposing their limitations; (2) identification of the gap between existing NL-to-LTL (f)_{(f)} benchmarks and real-world specifications; (3) presentation of NEUROSTAR, a training-free neuro-symbolic framework that combines neural generation with symbolic automata-guided reasoning for NL-to-LTL f_{f} formalization; (4) an evaluation demonstrating that NEUROSTAR improves on the prior state-of-the-art; and (5) a reference-free study on the Virginia driving code demonstrating NEUROSTAR's ability to handle complex real-world specifications.

References (54)