# Safety Analysis in the Era of Large Language Models: A Case Study of STPA using ChatGPT

대규모 언어 모델 시대의 안전성 분석: ChatGPT를 이용한 STPA 사례 연구

Yi Qi, Xingyu Zhao, Siddartha Khastgir, Xiaowei Huang · arXiv · 2023년 4월 3일

- **연구 문제** ChatGPT 같은 대규모 언어 모델이 복잡하고 주관적인 STPA 안전 분석, 특히 UCA 식별을 전문가와 함께 얼마나 도울 수 있는지 AEB와 DSM 사례로 검토합니다.
- **연구 방법** 전문가와 ChatGPT의 세 가지 협업 방식, 제어 루프 복잡도, 프롬프트 유형을 비교하고 기존 전문가 결과를 기준선으로 삼아 정답 UCA 수와 비율을 측정합니다.
- **주요 결과** 반복 이중 협업은 위험과 원인을 포괄적으로 식별했다고 보고되며, 제어 루프 복잡도 변화는 유의한 차이를 보이지 않았습니다. STPA 전용 프롬프트는 정답 비율을 유의하게 높였지만 식별 개수는 도메인 독립 프롬프트보다 적었습니다.

## STPA의 어려움과 LLM 도입 질문

STPA는 STAMP에 기반한 안전 분석 기법으로, 제어 루프와 프로세스 분석을 통해 안전하지 않은 제어 행위(UCA)를 찾습니다. 그러나 현대 시스템은 하드웨어, 소프트웨어, 인간 운영자, AI/ML 모델이 얽혀 복잡하며, 분석 결과는 전문가의 주관에 따라 일관성이 떨어질 수 있습니다. 이 논문은 ChatGPT 같은 대규모 언어 모델이 이 두 문제, 즉 복잡성과 주관성을 완화할 수 있는지 사례 연구로 묻습니다.

원문은 STPA의 5단계 중 특히 UCA 식별 단계가 전문가 지식에 크게 의존한다고 설명합니다. 이 연구는 이 단계를 중심으로 ChatGPT의 활용 방식을 평가합니다. 분석 대상은 자동 긴급 제동(AEB) 시스템과 전력 수요측 관리(DSM) 시스템이며, 기준선은 기존에 전문가가 수행한 STPA 결과입니다.

## 세 가지 협업 방식

연구는 ChatGPT를 STPA 워크플로에 넣는 세 가지 방식을 비교합니다. 일회성 단순 협업(one-off simplex)에서는 전문가가 'AEB System'과 'STPA Method' 키워드만 한 번 제공하고, ChatGPT가 STPA를 자동으로 수행합니다. 반복 단순 협업(recurring simplex)에서는 전문가가 각 단계마다 질문을 보내지만 이전 답변을 검토하거나 재질의하지 않습니다. 반복 이중 협업(recurring duplex)에서는 전문가가 각 출력을 수집하고 도메인 지식으로 분석한 뒤 다시 질의합니다.

![Figure 2: Three ways of incorporating ChatGPT in the workflow of how human safety experts perform STPA: (a) One-off simplex collaboration (b) Recurring simplex…](https://refivu.com/papers/5cb1555c-f8fe-4bae-a604-eb07013f797d/figures/figure-a21254e408410648cd41f5d180637bc2.png?thumb=512)

**Figure 2** : Three ways of incorporating ChatGPT in the workflow of how human safety experts perform STPA: (a) One-off simplex collaboration (b) Recurring simplex collaboration (c) Recurring duplex collaboration.

[원문](https://arxiv.org/abs/2304.01246v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yi Qi, Xingyu Zhao, Siddartha Khastgir, Xiaowei Huang · Safety Analysis in the Era of Large Language Models: A Case Study of STPA using ChatGPT · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.

이 세 방식의 차이는 소통의 빈도와 방향에 있습니다. 일회성 방식은 사람에서 ChatGPT로 한 방향으로만 정보가 전달되고, 반복 이중 방식은 양방향 상호작용을 포함합니다.

## 협업 방식별 결과

RQ1의 비교에서 반복 이중 협업은 위험(hazard)과 원인(cause)을 포괄적으로 식별한 것으로 보고되었습니다. 반면 일회성 단순 협업과 반복 단순 협업은 두 항목을 부분적으로만 식별했습니다. 원문의 Venn 다이어그램 설명에 따르면 두 반복 방식은 기준선의 UCA를 포함하는 상위 집합을 식별했고, 그중 반복 이중 협업이 가장 나았습니다.

다만 이 성과는 비용과 함께 나타납니다. 반복 이중 협업은 전문가의 기술 요구가 높고, 복잡도와 시간 비용이 다른 방식보다 큽니다. 시간 비용은 전문가와 ChatGPT 사이의 상호작용 횟수와 전문가 분석 시간을 함께 반영한 추정치입니다.

## 제어 루프 복잡도와 프롬프트 설계

RQ2는 반복 이중 협업의 2단계와 3단계를 사용하여, 제어 루프 구조의 복잡도(낮음, 중간, 높음)가 3단계의 UCA 결과에 미치는 영향을 봅니다. 각 복잡도 그룹의 표본 수는 5, 19, 30입니다. RQ3는 프롬프트가 없는 경우, 도메인 독립 프롬프트, STPA 전용 프롬프트를 비교합니다. STPA 전용 프롬프트는 UCA의 원소인 Source, Type, Control Action, Context, Link to Hazards를 반영해 설계되었습니다.

두 실험 모두 정답 UCA의 개수와 정답 비율을 지표로 삼고, 세 그룹 이상의 쌍별 비교에 Tukey-Kramer 검정을 적용했습니다. RQ3에서는 38개의 제어 행위에 대해 각 세 가지 조건으로 질의하여 총 114개의 UCA 집합을 얻었습니다.

## 통계 검정 결과와 프롬프트 효과

RQ2에서 제어 루프 복잡도 그룹 사이의 정답 UCA 개수와 정답 비율은 모든 쌍별 비교에서 유의하지 않은 것으로 보고되었습니다. 즉 이 실험 조건에서는 복잡도 변화가 포괄성과 정답 비율을 유의하게 바꾸지 않았다는 결과입니다.

![Table 5: RQ2: Tukey-Kramer test results based on the number of correct UCAs and the proportion of correct UCAs, when the system under analysis is modelled by c…](https://refivu.com/papers/5cb1555c-f8fe-4bae-a604-eb07013f797d/figures/figure-8b6a8a5c412b3f79b4be08aaf4369700.png?thumb=512)

**Table 5** : RQ2: Tukey-Kramer test results based on the number of correct UCAs and the proportion of correct UCAs, when the system under analysis is modelled by control loop of different complexity

[원문](https://arxiv.org/abs/2304.01246v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yi Qi, Xingyu Zhao, Siddartha Khastgir, Xiaowei Huang · Safety Analysis in the Era of Large Language Models: A Case Study of STPA using ChatGPT · 원문 그림 인용 · 원본 PDF 13쪽에서 그림 영역을 추출했습니다.

RQ3에서는 도메인 독립 프롬프트가 프롬프트를 쓰지 않은 경우와 STPA 전용 프롬프트보다 더 많은 정답 UCA를 식별한 것으로 보고되었습니다. 반면 STPA 전용 프롬프트는 정답 비율을 유의하게 높였습니다. 저자들은 이 결과를 STPA 전용 프롬프트의 제약이 ChatGPT를 더 보수적인 응답으로 이끌었다고 해석합니다.

![Table 6: RQ3: Tukey-Kramer test results based on the number of correct UCAs and the proportion of correct UCAs, when using different types of prompts (NB: “d.-…](https://refivu.com/papers/5cb1555c-f8fe-4bae-a604-eb07013f797d/figures/figure-6ac78b84b1e9dc26bc3db6178a6552f2.png?thumb=512)

**Table 6** : RQ3: Tukey-Kramer test results based on the number of correct UCAs and the proportion of correct UCAs, when using different types of prompts (NB: “d.-a.” refers to “domain-agnostic”, “STPA-s.” refers to “STPA-specific”).

[원문](https://arxiv.org/abs/2304.01246v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yi Qi, Xingyu Zhao, Siddartha Khastgir, Xiaowei Huang · Safety Analysis in the Era of Large Language Models: A Case Study of STPA using ChatGPT · 원문 그림 인용 · 원본 PDF 14쪽에서 그림 영역을 추출했습니다.

## 재현성과 타당성의 한계

ChatGPT의 응답은 같은 질문을 반복해도 달라질 수 있습니다. 원문은 GPT가 다음 토큰의 확률 분포에서 샘플링하므로 동일한 입력이 동일한 출력을 보장하지 않는다고 설명합니다. 이 점은 결과의 재현성을 제한합니다.

또한 STPA 전용 프롬프트는 하나만 사용되었고, 기준선 시스템은 두 개뿐이며, ChatGPT 버전도 하나만 검토되었습니다. 원문은 표본 크기가 RQ2와 RQ3에서 작다는 점도 외부 타당성의 위협으로 밝힙니다. 따라서 결과는 이 사례 연구의 조건 안에서 읽어야 합니다.

## 논문 정보

- **저자**: Yi Qi, Xingyu Zhao, Siddartha Khastgir, Xiaowei Huang
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2023년 4월 3일
- **등록일**: 2026년 11월 6일
- **수정일**: 2023년 12월 20일
- **버전**: v3
- **arXiv**: 2304.01246
- **DOI**: 10.1016/j.mlwa.2025.100622
- **분류**: cs.CL · cs.AI · cs.CY · cs.SE
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2304.01246v3) · [원문 PDF ↗](https://arxiv.org/pdf/2304.01246v3)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

Can safety analysis make use of Large Language Models (LLMs)? A case study explores Systems Theoretic Process Analysis (STPA) applied to Automatic Emergency Brake (AEB) and Electricity Demand Side Management (DSM) systems using ChatGPT. We investigate how collaboration schemes, input semantic complexity, and prompt guidelines influence STPA results. Comparative results show that using ChatGPT without human intervention may be inadequate due to reliability related issues, but with careful design, it may outperform human experts. No statistically significant differences are found when varying the input semantic complexity or using common prompt guidelines, which suggests the necessity for developing domain-specific prompt engineering. We also highlight future challenges, including concerns about LLM trustworthiness and the necessity for standardisation and regulation in this domain.

## 원문 인용

Yi Qi, Xingyu Zhao, Siddartha Khastgir, Xiaowei Huang (2023). Safety Analysis in the Era of Large Language Models: A Case Study of STPA using ChatGPT. arXiv:2304.01246v3. https://doi.org/10.1016/j.mlwa.2025.100622

**BibTeX**

```
@article{qi2023safety,
  title = {{Safety Analysis in the Era of Large Language Models: A Case Study of STPA using ChatGPT}},
  author = {Yi Qi and Xingyu Zhao and Siddartha Khastgir and Xiaowei Huang},
  year = {2023},
  eprint = {2304.01246},
  archivePrefix = {arXiv},
  doi = {10.1016/j.mlwa.2025.100622},
  url = {https://arxiv.org/abs/2304.01246v3}
}
```

## 이 논문의 용어

- [ChatGPT](https://refivu.com/terms/96047648490a-chatgpt)
- [prompt engineering](https://refivu.com/terms/fd335dee5f48-prompt-engineering)
- [comprehensiveness](https://refivu.com/terms/3428ac6e14d4-comprehensiveness)

## 다른 논문 해설

- [Decision-Oriented Dialogue for Human-AI Collaboration](https://refivu.com/papers/1d9fad4b-76a3-40b2-b7c6-3b42b2a8ddc5-decision-oriented-dialogue-for-human-ai-collaboration.md)
- [Large Language Models Leverage External Knowledge to Extend Clinical Insight Beyond Language Boundaries](https://refivu.com/papers/1681bcb8-eaa3-4d90-af0d-f1d68b6f815a-large-language-models-leverage-external-knowledge-to-extend.md)
- [Hallucination to Truth: A Review of Fact-Checking and Factuality Evaluation in Large Language Models](https://refivu.com/papers/29ebff2e-1fee-4975-9682-038fb460afd5-hallucination-to-truth-a-review-of-fact-checking.md)
- [Language models align with human judgments on key grammatical constructions](https://refivu.com/papers/93c9c642-d7e0-46eb-9a74-eea100c098ad-language-models-align-with-human-judgments-on-key.md)
- [A Survey of Text Watermarking in the Era of Large Language Models](https://refivu.com/papers/002d7f5a-9912-4066-b5ed-87445aa6935d-a-survey-of-text-watermarking-in-the-era.md)
- [Generation of Asset Administration Shell with Large Language Model Agents: Toward Semantic Interoperability in Digital Twins in the Context of Industry 4.0](https://refivu.com/papers/ac36066d-cd3b-4dd8-8de7-e7ccd61ed42d-generation-of-asset-administration-shell-with-large-language.md)
- [AI-Driven Robotics for Optics](https://refivu.com/papers/1eea416b-970f-4345-8b65-464b1d31238c-ai-driven-robotics-for-optics.md)
- [Active learning for data streams: a survey](https://refivu.com/papers/a38e56c3-797c-45a4-bbe8-38722c825e80-active-learning-for-data-streams-a-survey.md)
- [Self-supervised Dynamic CT Perfusion Image Denoising with Deep Neural Networks](https://refivu.com/papers/e15e65ce-32bc-42d4-8cff-9b3727bbe0cf-self-supervised-dynamic-ct-perfusion-image-denoising-with.md)
- [Deep Learning for Wireless Networked Systems: a joint Estimation-Control-Scheduling Approach](https://refivu.com/papers/931995c3-5f9e-43cd-838d-2583c5379267-deep-learning-for-wireless-networked-systems-a-joint.md)
- [Handwritten Arabic Character Recognition for Children Writ-ing Using Convolutional Neural Network and Stroke Identification](https://refivu.com/papers/92f857b2-4ffd-4e92-ab59-6f78dfce886d-handwritten-arabic-character-recognition-for-children-writ.md)
- [Preference-Conditioned Gradient Variations for Multi-Objective Quality-Diversity](https://refivu.com/papers/76898f3d-ae64-42d3-876a-f8d01f3d2ecd-preference-conditioned-gradient-variations-for-multi.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/5cb1555c-f8fe-4bae-a604-eb07013f797d-safety-analysis-in-the-era-of-large-language)
