LLM-Enhanced Symbolic Control for Safety-Critical Applications

Amir Bayat, Alessandro Abate, Necmiye Ozay, Raphaël M. JungersarXiv 2025 · DOI · arXiv

Introduction

In safety-critical domains such as autonomous driving, robotics, and smart manufacturing, control systems must operate with rigorous mathematical guarantees. A single failure to adhere to physical boundaries or safety constraints can lead to catastrophic outcomes. To address this, researchers often employ Abstraction-Based Controller Design (ABCD), also known as symbolic control. This methodology provides "correct-by-design" guarantees, ensuring that a synthesized controller will always satisfy its formal specifications.

Despite its mathematical rigor, ABCD remains inaccessible to many practitioners. The process requires deep domain expertise to manually translate high-level human requirements into the formal mathematical specifications required by symbolic control toolboxes. Conversely, while Large Language Models (LLMs) excel at interpreting natural language, they struggle with physical reasoning and cannot provide formal safety proofs. This paper proposes a dual-agent LLM framework designed to bridge this gap, acting as an intuitive interface that translates natural language instructions into verifiable symbolic control code.

The Dual-Agent Framework

The proposed system utilizes a pipeline centered around OpenAI’s GPT-4o and the Dionysos toolbox, an open-source Julia library for symbolic control. Rather than asking the LLM to solve the control problem directly—a task at which LLMs frequently fail—the framework uses the model as a sophisticated translator. The architecture consists of two specialized agents:

  1. Code Generator Agent: This agent receives natural language descriptions of "reach-avoid" tasks (e.g., "Navigate to the loading zone while avoiding the two central pillars"). Using few-shot prompting, it extracts spatial coordinates, obstacle boundaries, and goal regions to generate executable Dionysos code.
  2. Checker Agent: Serving as a critical safety layer, the Checker reviews the generated code against the original natural language specification. It identifies semantic discrepancies, such as misaligned obstacle dimensions or incorrect target coordinates.

If the Checker detects an error, it provides targeted feedback to the Code Generator for correction. This iterative loop is capped at two attempts to prevent the model from generating increasingly complex but ultimately incorrect logic. If a valid specification cannot be verified within these iterations, the system halts and alerts the user, prioritizing safety over autonomous execution.

Experimental Methodology

To evaluate the framework, the authors developed a benchmark consisting of 20 distinct environments representing common reach-avoid scenarios, such as warehouse navigation. To test the system's robustness against linguistic variability, each environment was described using three different natural language paraphrases, totaling 60 test cases. These variations included different ways of defining geometry, such as specifying a rectangle by its four vertices versus its center point and side lengths.

Results and Analysis

The study compared three distinct approaches to solving these control problems:

  • Direct LLM Solving: The LLM was asked to provide a trajectory directly. This approach failed entirely, producing zero robust solutions and resulting in 53 safety violations across the test set.
  • Code Agent Only: Using the LLM to generate Dionysos code without a verification step significantly improved performance, robustly solving 64.3% of the problems. However, it allowed 26 incorrect code implementations to proceed to execution.
  • Full Pipeline (Code + Checker): The dual-agent system maintained a high success rate (62.5% robustly solved) while drastically increasing reliability. The Checker agent successfully blocked 39 incorrect code segments, reducing the number of unsafe executions to just 12.

These results underscore a vital insight: LLMs are most effective in safety-critical contexts when used as translators for formal solvers rather than as end-to-end solvers themselves. The "halt over fail" design philosophy proved essential in preventing the deployment of flawed controllers.

Conclusion and Future Work

While the framework successfully simplifies the use of symbolic control tools, it is not without limitations. The upstream translation from natural language to code remains non-deterministic, and the Checker agent occasionally misses subtle semantic errors.

Future research will focus on fine-tuning LLMs specifically for safety-critical code generation and expanding the framework to support more complex specifications, such as Linear Temporal Logic (LTL). By refining the interface between intuitive human language and rigorous mathematical synthesis, this approach paves the way for more accessible and reliable autonomous systems.

Summary updated

BibTeX
@misc{bayat2025llm,
  author = {Amir Bayat and Alessandro Abate and Necmiye Ozay and Raphaël M. Jungers},
  title = {{LLM-Enhanced Symbolic Control for Safety-Critical Applications}},
  year = {2025},
  eprint = {2505.11077},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.11077},
}
Figure