An LLM-Integrated Framework for Completion, Management, and Tracing of STPA

Ali Raeisdanaei 1 , Juho Kim 1,2 , Michael Liao 1,2 , and Sparsh Kochhar 1,2 · 2025

Read An LLM-Integrated Framework for Completion, Management, and Tracing of STPA by Ali Raeisdanaei 1 , Juho Kim 1,2 , Michael Liao 1,2 , and Sparsh Kochhar 1,2 (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2503-12043.txt.

Introduction

Ali Raeisdanaei, Juho Kim, and co-authors give a free tool that uses tongue models to run a risk read way, in a 2025 paper. The STPA way maps how safe acts can fail in hard kits. Its full runs eat much staff time in most firms that use it.

Tongue steps fill, sort, and trace STPA sheets in the tool flows. Past real risk sheets built by staff test the tool for truth. Scores show high truth on most STPA tasks in those tests. Staff time saved is the main gain claimed for the tool. Code is shared free for firms to take up.

Catalog record

CREATORAli Raeisdanaei 1 , Juho Kim 1,2 , Michael Liao 1,2 , and Sparsh Kochhar 1,2
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE42 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2503-12043

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

An LLM-Integrated Framework for Completion, Management, and Tracing of STPA Ali Raeisdanaei 1 , Juho Kim 1,2 , Michael Liao 1,2 , and Sparsh Kochhar 1,2 Abstract In many safety-critical engineering domains, hazard analysis techniques are an essential part of requirement elicitation. Of the methods proposed for this task, STPA (System-Theoretic Process Analysis) represents a relatively recent development in the field. The completion, management, and traceability of this hazard analysis technique present a time-consuming challenge to the requirements and safety engineers involved. In this paper, we introduce a free, open-source software framework to build STPA models with several automated workflows powered by large language models (LLMs). In past works, LLMs have been successfully integrated into a myriad of workflows across various fields. Here, we demonstrate that LLMs can be used to complete tasks associated with STPA with a high degree of accuracy, saving the time and effort of the human engineers involved. We experimentally validate our method on real-world STPA models built by requirement engineers and researchers. The source code of our software framework is available at the following link: https://github.com/blueskysolarracing/stpa . I Introduction Historically, the growing complexity of safety-critical systems drove the development of more nuanced theories and applications for their safety analysis [ 1 ] . Systematic safety analyses are required by safety compliance standards to elicit requirements [ 2 ] . Among the methods proposed, System-Theoretic Process Analysis (STPA) is a relatively new hazard analysis technique, developed at the Massachusetts Institute of Technology (MIT), founded on System-Theoretic Accident Model and Processes (STAMP). Leveson and Thomas [ 3 ] note that STPA is not only more time and resource-efficient than the traditional offerings, but is also capable of finding more causal scenarios than those found by legacy methods [ 4 ] . The STPA Handbook [ 3 ] , a comprehensive text on the technique authored by the pioneers of the framework, outlines the four steps involved in the hazard analysis process: 1. Losses and hazards are defined, with the process aimed at minimizing their occurrence. 2. A model of controllers in the system is created to show the controlled actions (and feedback loops) of a system. 3. Unsafe Control Actions (UCAs) are elicited from the control structure (from the Step 2 ) that lead to hazards in the first step. 4. Loss scenarios are considered as the causal factors that could lead a UCA to a hazard. The STPA artifacts generated through these steps can then be used to derive system requirements, each justifying their need by a concrete trace to a hazard and loss. According to Leveson and Thomas [ 3 ] , STPA is notable for its ability to identify software-related scenarios that traditional methods tend not to find. In our first contribution , we seek to amplify this ability by creating a pure Python framework for constructing STPA artifacts that can be explicitly traced to requirements and design, as well as being tightly integrated within an existing software system. To the best of our knowledge, this framework is the first of its kind where artifacts are programmatically integrated within the software system. With that said, the use of our software is not limited exclusively to software-centric systems, as other systems can still benefit from several features offered by our library. Gotel et al. [ 5 ] define requirement traceability as “the ability to describe and follow the life of a requirement (i.e., from its origins, through its development and specification, to its subsequent deployment and use” [ 5 ] . Managing the traceability between the origins of the requirements from STPA then to the software can be quite challenging and often missing [ 6 , 7 , 8 ] . This truism is especially more apparent in the commonly used tools for STPA management such as Microsoft Word or Excel [ 9 ] . Our framework forces the users to express each artifact (losses, hazards, UCAs, etc.) while also defining its parts (source, type, links, and more) in Python. Thus, the modeled system’s STPA artifacts can reliably be accessed and analyzed as a concrete, traceable package with scripts in Python or other programming languages that support Python interoperability (it is also worth mentioning that Python is a widely popular scripting language). This approach of defining STPA in a Pythonic idiom, also allows requirement engineers to benefit from standard software engineering practices and principles such as version control, type/style checks, and more. One drawback of STPA is that the number of artifacts has the potential to grow exponentially. UCAs are generated by considering each control action against four failure types – while not always the case, very often all four types of UCAs are created for each control action. Similarly, in turn, each UCA is considered for four different loss scenario types. For example, in a small system of only 5 components and 20 control actions, 80 UCAs as well as 320 loss scenarios can potentially be generated, which can be very costly to produce and maintain for a team creating a small system of 5 components. This scaling of the number of artifacts places a major limitation and challenge in the completion of STPA. We believe (and past works [ 10 , 11 ] have shown) that the generation of UCAs and loss scenarios (Steps 3 and 4 ) can be augmented with large language models (LLMs) to help human engineers speed up their workflow. LLMs are advanced machine learning models trained on large amounts of data, enabling them to intake and generate human-like text. They have shown extensive capability when applied in various fields such as social science [ 12 ] , psychology [ 13 ] , and game-theory [ 14 ] . As LLMs are often characterized by their strengths in pattern recognition, contextual reasoning, and structured text generation, we hypothesize they may be well suited for systematic, rule-based analyses such as STPA. Furthermore, LLMs can process and structure large amounts of information at scale, making them particularly useful for handling the extensive artifact generation inherent in STPA. By automating repetitive, yet critical, parts of the analysis, LLMs may reduce the cognitive load on safety engineers and help ensure consistency in hazard identification. Our second contribution is the enhancement of our STPA framework with LLM integration to generate UCAs, loss scenarios, and links. This could be especially effective because the domain of STPA is closed – the model of the system being analyzed can be given as input (the control structure diagram, artifacts, etc.), and each generation is paired with a systematic prompt from the STPA Handbook. In addition, the use of LLMs can be effective in bypassing the confirmation bias of the requirement engineer, which has been shown to miss many failures in system safety [ 15 ] . LLMs have already been used in the space of requirement engineering, and they have been shown to be effective when answering questions such as “What can go wrong?” [ 16 ] . With that said, a requirement engineer in the loop can then judge the validity of the generated UCAs and loss scenarios. We evaluate our LLM enhancement of STPA against a case study from the STPA Handbook [ 3 ] with

Read the complete text