An LLM-Integrated Framework for Completion, Management, and Tracing of STPA
Ali Raeisdanaei, Juho Kim, Michael Liao, Sparsh Kochhar
TL;DR
The paper addresses the time-consuming nature of conducting STPA hazard analyses by introducing a free, open-source Python framework that couples STPA artifact management with LLM-powered generation of UCAs and loss scenarios, all within a human-in-the-loop workflow. It leverages vision-enabled LLM prompts (including control-structure diagrams) to synthesize numerous artifacts, while providing automated linking to support traceability to software and requirements. Empirical results on handbook-based case studies show high accuracy and usefulness for UCAs and loss scenarios, and strong performance for artifact linking, albeit with limitations such as data leakage risk and the need for broader validation. The framework aims to enhance efficiency and consistency in safety analyses and to facilitate integration with safety standards like ISO 26262, while preserving safety engineer oversight and extensibility for future features.
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.
