Prediction and Causal Analysis of Heavy Commercial Vehicle Crashes Powered by Large Language Models
-
摘要: 针对大型商用车交通事故致因复杂、深层组织管理因素难以从海量非结构化文本中量化提取的问题,构建了一套结合大语言模型(large language model,LLM)与可解释机器学习的事故分析框架。研究借鉴人因分析与分类系统(human factors analysis and classification system,HFACS),结合大型商用车道路运输领域特点进行了适配性优化,建立了包含组织影响、不安全监管、不安全行为的先决条件和不安全行为4个层级的大型商用车事故致因框架,并通过专家评估验证了其可靠性。基于该框架,利用大语言模型DeepSeek-V3/R1,从717份公开的事故调查报告中进行零样本信息抽取,自动化构建了结构化数据集,在准确率、一致性等多项评估指标上分数均超过84%,实现了对海量文本信息的高效、系统化处理。采用分类梯度提升(categorical boosting, CatBoost)算法构建事故严重程度(一般、较大、重特大事故)预测模型,取得了0.803的准确率与0.925的AUC值,性能优于对比模型。结果表明: 通过模型特征消融实验证实,LLM所提取的组织管理与监管类因素能为预测准确率带来2.71%的相对提升。在致因机制层面,沙普利加性解释(Shapley additive explanations, SHAP)分析量化了各因素贡献,揭示了不同事故等级的差异化风险模式。一般事故的主要致因与车辆照明系统故障、存在曲线路段等具体情境因素关联最强。较大事故则更显著地关联于另一方涉事车辆为小汽车及运输企业安全规章制度不完善等系统性缺陷。重特大事故SHAP贡献度排名前三的核心因素依次为涉及大客车(SHAP值0.846)、运输企业缺乏监管体系(SHAP值0.526),以及大型车超速驾驶(SHAP值0.309),且因素间存在显著的交互放大效应。本研究验证了所述框架在深度解析交通事故系统性致因方面的有效性,为从海量非结构化文本中生成精准安全决策提供了新的技术路径。
-
关键词:
- 交通安全 /
- 大型商用车道路交通事故 /
- 事故预测及致因分析 /
- 大语言模型
Abstract: To address the challenge of analyzing the complex causes of large commercial vehicle (LCV) accidents and quantifying deep organizational factors from vast amounts of unstructured text, an integrated analytical framework combining large language models (LLMs) with interpretable machine learning is proposed. An integrated analytical framework is proposed, combining large language models (LLMs) with interpretable machine learning. First, the Human Factors Analysis and Classification System (HFACS) is adapted and optimized for the LCV domain. This process establishes a dedicated accident causation framework called HFACS-LCV. It encompasses four hierarchical levels: organizational influences, unsafe supervision, preconditions for unsafe acts, and unsafe acts. Expert re-To address the challenge of analyzing the complex causes of large commercial vehicle (LCV) accidents and quantifying deep organizational factors from vast amounts of unstructured text, an integrated analytical framework combining large language models (LLMs) with interpretable machine learning is proposed. An integrated analytical framework is proposed, combining large language models (LLMs) with interpretable machine learning. First, the Human Factors Analysis and Classification System (HFACS) is adapted and optimized for the LCV domain. This process establishes a dedicated accident causation framework called HFACS-LCV. It encompasses four hierarchical levels: organizational influences, unsafe supervision, preconditions for unsafe acts, and unsafe acts. Expert review validated its reliability. Second, a large language model (DeepSeek-V3/R1) is employed for zero-shot information extraction. It processes 717 publicly available accident investigation reports to build a structured dataset automatically. The extraction achieves scores above 84% in metrics like accuracy and consistency, enabling efficient and systematic text processing. Subsequently, a CatBoost algorithm constructs a model for predicting accident severity. The categories are general, major, and serious accidents. The model achieves an accuracy of 0.803 and an AUC of 0.925, outperforming other compared models. The results provide several key findings. Model feature ablation experiments show that LLM-extracted organizational and supervisory factors contribute to a 2.71% relative gain in prediction accuracy. For causation mechanisms, Shapley additive explanations (SHAP) analysis quantifies each factor's contribution. It reveals differentiated risk patterns across severity levels. General accidents primarily link to situational factors like vehicle lighting system failures and curved road sections. Major accidents associate more with systemic deficiencies. These include collisions with passenger cars and imperfect corporate safety regulations. For serious and extraordinarily serious accidents, the top three contributing factors are involvement of a bus (SHAP value 0.846), the transport enterprise's deficient regulatory system (SHAP value 0.526), and speeding by the LCV (SHAP value 0.309). Significant interactive amplification effects also exist among these factors. This study validates the proposed framework's effectiveness for in-depth systemic accident causation analysis. It offers a novel technical pathway to generate precise safety insights from unstructured text data, which can ultimately guide and enhance data-driven safety interventions -
表 1 可靠性分析结果
Table 1. Reliability analysis results
案例 专家1 专家2 专家3 专家4 专家5 A 0.71** 0.62** 0.77** 0.77** 0.68** B 0.86** 0.61** 0.87** 0.88*** 0.80** 注:表中数值为Kappa系数,*** P < 0.001,** P < 0.01。 表 2 HFACS-LCV框架及事故因素变量
Table 2. HFACS-LCV framework and accident factor variables
层次 结构 编码 变量 解释 组织影响(A) 资源管理 A1 安全管理投入不足 运输企业没有投入足够的安全管理资金来维护与增强系统的安全性 A2 驾驶人资格管理不当 运输企业在驾驶人的认证、培训和监管方面存在问题 A3 运输设备管理不当 运输企业在车辆运营、维护和监管等方面存在问题 A4 安全管理落实不到位 运输企业安全管理措施执行不到位或不完善, 导致安全管理效果不佳 组织氛围 A5 安全规章制度不完善 运输企业安全管理相关法规制度不健全、缺乏针对性或存在漏洞, 不能有效指导与规范安全管理工作 不安全监管(B) 监管不足 B1 缺乏监管体系 运输企业缺乏内部监管体系, 导致监管工作不充分、无序、低效 B2 缺乏对监督管理的重视 运输企业对监管管理缺乏足够重视与投入, 导致监管不到位、监管措施不力、监管效果不理想 计划不当 B3 培训和教育不足 运输企业安全培训教育不够、不充分、不及时 B4 操作任务不合理 运输企业可能存在司机调度、轮班、工作安排不合理、不科学的情况 B5 货物缺陷 货物在装卸过程中是否存在不当操作影响车辆正常行驶 隐患整改 B6 隐患整改未追溯 运输企业发现安全隐患后, 未及时有效完成整改、排查和监督 监管违规 B7 未能执行规章制度 运输企业在实际操作中未能有效落实与执行这些规章制度, 包含人员故意不遵守或者违反运输企业内部管理制度、规章制度的情况 不安全行为的先决条件(C) 驾驶人因素 C1 身体状态不佳 驾驶人身体健康存在问题导致工作效率下降、注意力不集中、工作质量下降等情况 C2 驾驶资质不足 驾驶人缺乏必要的资格、能力或技能, 驾驶证无效 C3 过往违法记录 过往3年内存在交通违法行为记录 C4 酒精/毒品 酒驾/毒驾 C5 路段位置 单车道或双车道/交叉路口/匝道 C6 路段坡度 平坦/上坡/下坡 道路因素 C7 曲线路段 存在曲线/存在S形或连续弯道 C8 路面情况 干燥/潮湿/结冰 C9 道路隐患 事故多发路段/道路交通标识存在缺陷 环境因素 C10 昼/夜 白天/黑夜 C11 天气状况 晴天/多云或阴天/雨天或雪天/雾天 车辆情况 C12 制动系统故障 车辆的刹车/制动系统故障或不符合相关技术要求项 C13 照明系统故障 车辆的灯光/照明系统故障或不符合相关技术要求项 C14 行驶系统故障 存在发动机故障、轮胎状态不良等影响车辆动力系统或行驶系统 C15 非法改装 存在非法改装情况。 不安全行为(D) 基于技能的错误 D1 操作不当 驾驶人未按照交通法规与安全驾驶原则正确操作车辆 D2 紧急情况的错误反应 驾驶人在遇到意外或紧急情况时做出的错误判断或不适当的决定 感知错误 D3 疏于观察 没有及时发现道路情况、疏于观察等 D4 不安全的行驶距离 驾驶人在行驶过程中未与前车保持足够的安全距离 D5 疲劳驾驶 长时间连续驾驶后, 驾驶人的生理与心理疲劳导致驾驶技术下降 违规行为 D6 超速驾驶 驾驶人在道路上超速行驶的行为 D7 超载驾驶 驾驶时车辆超过其设计或法定的负载限制 D8 违规停车 在禁止、限制停车区域停放车辆, 属于违反交通管理规定的行为 D9 违反交通信号灯 存在闯红灯等违反交通信号灯的行为 D10 逆向行驶 存在逆向行驶的行为 D11 未按规定车道行驶 存在未按规定车道行驶的情况 分类因素(O) 事故严重程度 O1 事故等级 重特大事故/较大事故/一般事故 碰撞类型 O2 碰撞参与方 单车事故/双方事故/多方事故 涉事方类型 O3 其他涉事方类型 重型货车/大客车/中型汽车/小汽车/摩托车或电动自行车/自行车或行人 主要责任方 O4 主责或同责 大型商用车驾驶人是事故主要责任方或同等责任方 表 3 大型商用车事故因素信息提取结果统计
Table 3. Accident factor information results statistics
编码 变量 数量 A1 安全管理投入不足 121 A2 驾驶人资格管理不当 407 A3 运输设备管理不当 474 A4 安全管理落实不到位 622 A5 安全规章制度不完善 294 B1 缺乏监管体系 99 B2 缺乏对监督管理的重视 103 B3 培训和教育不足 138 B4 操作任务不合理 6 B5 货物缺陷 11 B6 隐患整改未追溯 554 B7 未能执行规章制度 464 C1 身体状态不佳 121 C2 驾驶资质不足 470 C3 过往违法记录 474 C4 酒精/毒品 622 车道: 475 C5 路段位置 交叉路口: 229
匝道: 13平坦: 606 C6 路段坡度 上坡: 16
下坡: 95C7 曲线路段 164 C8 路面情况 干燥: 607
潮湿: 110C9 道路隐患 事故多发路段: 32
道路交通标识存在缺陷: 540C10 昼/夜 白天: 406
夜间: 311晴天: 506 C11 天气状况 多云或阴天: 101
雨天或雪天: 86
雾天: 14C12 制动系统故障 240 C13 照明系统故障 201 C14 行驶系统故障 69 C15 非法改装 69 D1 操作不当 328 D2 紧急情况的错误反应 16 D3 疏于观察 231 D4 不安全的行驶距离 62 D5 疲劳驾驶 25 D6 超速驾驶 161 D7 超载驾驶 212 D8 违规停车 34 D9 违反交通信号灯 28 D10 逆向行驶 26 D11 未按规定车道行驶 14 表 4 大型商用车事故因素信息提取结果评价
Table 4. Evaluation of information extraction results for LCV accident factors
因素层次 DeepSeek-V3 DeepSeek-R1 一致性/% 准确率/% 精确率/% 召回率/% F1分数/% 一致性/% 准确率/% 精确率/% 召回率/% F1分数/% 组织影响(A) 87.09 84.35 84.24 86.78 85.49 88.13 83.37 85.18 85.37 85.27 不安全监管(B) 88.14 83.64 87.62 84.57 86.07 86.91 84.28 87.06 83.28 85.13 不安全行为的先决条件(C) 91.88 91.32 90.18 91.42 90.80 93.27 89.00 88.71 89.55 89.13 不安全行为(D) 81.66 83.18 85.33 83.83 84.57 82.00 82.54 85.75 86.23 85.99 事故分类因素(O) 96.31 94.24 94.28 94.07 94.17 96.42 94.52 93.44 94.11 93.77 表 5 超参数调优取值结果
Table 5. Values of hyperparameter tuning
超参数 说明 取值范围 最优值 learning_rate 学习率, 每次迭代更新权重的步长 [0.01, 0.3] 0.28 maximum_depth 决策树的深度 [3, 10] 3 reg_lambda 正则化的惩罚系数 [1, 5] 5 n_estimators 总共迭代的次数, 即决策树的个数 [50, 500] 230 colsample_bytree 每棵树随机采样使用的特征比例 (0.5, 1) 0.8 表 6 模型性能对比
Table 6. Model performance comparison
模型 准确率 精确率 召回率 $F_{1}$分数 AUC值 Random Forest 0.772 0.805 0.772 0.788 0.918 SVM 0.784 0.803 0.784 0.789 0.921 XGBoost 0.738 0.767 0.738 0.741 0.916 LightGBM 0.796 0.810 0.796 0.800 0.921 CatBoost 0.803 0.815 0.803 0.806 0.925 表 7 CatBoost模型的大型商用车事故预测结果
Table 7. Prediction results of CatBoost model
指标 一般事故 较大事故 重特大事故 精确率 0.783 0.704 0.931 召回率 0.830 0.710 0.810 $F_{1}$分数 0.806 0.706 0.866 AUC值 0.950 0.860 0.960 表 8 一般事故风险因素SHAP值统计(影响强度前10)
Table 8. Top 10 risk factors in general accidents by SHAP
风险因素 影响强度 平均边际效应 大客车 0.492 9 -0.008 3 小汽车 0.439 9 0.022 0 缺乏监管体系 0.439 8 -0.035 1 摩托车或电瓶车 0.353 1 0.004 2 另一方超速驾驶 0.337 1 0.001 6 存在曲线 0.246 0 0.026 3 大型车超速驾驶 0.228 3 -0.025 8 夜间 0.187 4 0.001 8 晴天 0.187 3 0.005 2 照明系统故障 0.181 0 0.035 6* 注:*表示p < 0.05,具有统计显著性。 表 9 较大事故风险因素SHAP值统计(影响强度前10)
Table 9. Top 10 risk factors in major accidents by SHAP
风险因素 影响强度 平均边际效应 小汽车 0.357 6 -0.022 5 大客车 0.353 0 0.005 0 安全规章制度不完善 0.260 5 -0.019 2 存在曲线 0.238 4 -0.017 1 道路交通标识缺陷 0.179 7 0.014 3 晴天 0.157 1 -0.001 7 摩托车或电瓶车 0.151 6 -0.013 6 照明系统故障 0.150 9 -0.030 2* 另一方未按规定车道 0.148 7 0.016 4 安全管理投入不足 0.067 5 -0.004 3 注:*表示p < 0.05,具有统计显著性。 表 10 重特大事故风险因素SHAP值统计(影响强度前10)
Table 10. Top 10 risk factors in severe accidents by SHAP
风险因素 影响强度 平均边际效应 大客车 0.845 9 0.003 3 缺乏监管体系 0.525 7 0.015 0 大型车超速驾驶 0.309 4 0.028 1* 另一方超速驾驶 0.196 8 0.013 3 安全规章制度不完善 0.192 2 0.004 9 大型车超载驾驶 0.184 6 -0.007 1 缺乏对监督管理的重视 0.158 8 0.017 3 摩托车或电瓶车 0.134 9 0.009 4 安全管理投入不足 0.134 1 0.004 9 夜间 0.129 8 0.001 7 注:*表示p < 0.05,具有统计显著性。 表 11 交互效应排名前10的风险因素组合
Table 11. Top 10 risk factor combinations by interaction effect
风险组合 一般事故 较大事故 重特大事故 大客车×另一方操作不当 0.019 7 0.025 4* 0.045 2 小汽车×另一方超速驾驶 0.018 4* 0.020 5* 0.038 9* 大型车操作不当×另一方操作不当 0.006 0* 0.031 8* 0.035 9* 大客车×缺乏监管体系 0.030 8* 0.008 2* 0.033 4* 小汽车×大型车超速驾驶 0.014 0 0.032 7 0.018 7 大型车操作不当×大型车超速驾驶 0.007 7* 0.022 4* 0.028 7* 大客车×缺乏对监督管理的重视 0.017 3* 0.012 3* 0.027 2* 大客车×下坡 0.026 6* 0.010 2* 0.018 0 摩托车或电瓶车×驾驶人资格管理不当 0.012 7* 0.012 8* 0.025 3* 安全规章制度不完善×大型车超速驾驶 0.004 2* 0.020 4 0.023 5 注:*表示p < 0.05,具有统计显著性。 -
[1] 柯星安, 赵丹, 王秋鸿, 等. 基于模型群的重型货车交通安全风险因素分析[J]. 交通信息与安全, 2024, 42(4): 72-80. doi: 10.3963/j.jssn.1674-4861.2024.04.008KE X A, ZHAO D, WANG Q H, et al. An analysis of risk factors of traffic safety for heavy trucks based on model group[J]. Journal of Transport Information and Safety, 2024, 42(4): 72-80. (in Chinese) doi: 10.3963/j.jssn.1674-4861.2024.04.008 [2] 刘智, 马社强. 高峰期城市道路交通事故严重程度影响因素分析[J]. 中国人民公安大学学报(自然科学版), 2023, 29 (2): 44-50.LIU Z, MA S Q. Analysis of factors influencing the severity of urban road traffic accidents during peak period[J]. Journal of People's Public Security University of China (Science and Technology), 2023, 29(2): 44-50. (in Chinese) [3] WANG X, ZHOU Y, FILTNESS A, et al. Applying human factors analysis and classification system for commercial vehicles crashes investigation and critical failure routes analysis[J]. Accident Analysis & Prevention, 2025, 217: 108047. [4] BATSON A, KAVIANI F, MCDONALD H, et al. Managerial insight towards enhancing road safety culture in the light commercial vehicle and gig economy transportation workforce in Australia[J]. Transportation Research Part F: Psychology and Behaviour, 2025, 114: 171-181. doi: 10.1016/j.trf.2025.05.018 [5] KHURANA D, KOLI A, KHATTER K, et al. Natural language processing: state of the art, current trends and challenges[J]. Multimedia Tools and Applications, 2023, 82(3): 3713-3744. doi: 10.1007/s11042-022-13428-4 [6] MIN B, ROSS H, SULEM E, et al. Recent advances in natural language processing via large pre-trained language models: a survey[J]. ACM Computing Surveys, 2024, 56(2): 1-40. [7] CHEN L, XU J, WU T, et al. Information extraction of aviation accident causation knowledge graph: an LLM-based approach[J]. Electronics, 2024, 13(19): 1-21. [8] JARADAT S, NAYAK R, PAZ A, et al. Multitask learning for crash analysis: a fine-tuned LLM framework using twitter data[J]. Smart Cities, 2024, 7(5): 2422-2465. doi: 10.3390/smartcities7050095 [9] ZHAO Y, WANG P, ZHAO Y, et al. Safe traffic copilot: adapting large language models for trustworthy traffic safety assessments and decision interventions[J]. Nature Communications, 2025, 16: 8846. doi: 10.1038/s41467-025-64574-w [10] DIVYA VENKATESH J, JAISWAL A, NANDA G. Comparing human text classification performance and explainability with large language and machine learning models using eye-tracking[J]. Scientific Reports, 2024, 14: 14295. doi: 10.1038/s41598-024-65080-7 [11] WIEGMANN D A, SHAPPELL S A. Human error analysis of commercial aviation accidents: application of the human factors analysis and classification system (HFACS)[J]. Aviation, Space, and Environmental Medicine, 2001, 72(11): 1006-1016. [12] 公安部. 道路交通事故信息调查: GA/T 1082-2021[S]. 北京: 中国标准出版社, 2021.Ministry of Public Security. Information investigation on road traffic accident: GA/T 1082-2021[S]. Beijing: Standards Press of China, 2021. (in Chinese) [13] 霍小森, 杜爽, 谭琪麟, 等. 基于数据驱动贝叶斯网络的地铁施工事故致因差异化分析[J]. 铁道科学与工程学报, 2025, 22(4): 1802-1814.HUO X S, DU S, TAN Q L, et al. Differential analysis of causes of subway construction accidents based on data-driven Bayesian networks[J]. Journal of Railway Science and Engineering, 2025, 22(4): 1802-1814. (in Chinese) [14] 李显, 焦宇, 陈文涛, 等. 船舶修造企业火灾事故特征挖掘与致因分析[J]. 中国安全科学学报, 2024, 34(3): 29-38.LI X, JIAO Y, CHEN W T, et al. Feature mining and causative analysis of fire accidents in ship repair and building enterprises[J]. China Safety Science Journal, 2024, 34(3): 29-38. (in Chinese) [15] ODOBESKU R, ROMANOVAK, MIRZAEVAS, et al. Agentbased multimodal information extraction for nanomaterials[J]. npj Computational Materials, 2025, 11(1): 1-11. [16] 黄峻, 林飞, 杨静, 等. 生成式AI的大模型提示工程: 方法、现状与展望[J]. 智能科学与技术学报, 2024, 6(2): 116-133.HUANG J, LIN F, YANG J, et al. From prompt engineering to generative artificial intelligence for large models: the state of the art and perspective[J]. Chinese Journal of Intelligent Science and Technology, 2024, 6(2): 116-133(. in Chinese [17] NISSA M, JAMWAL K, NESHAT M. CatBoost for big data: an interdisciplinary review[J]. Journal of Big Data, 2023, 10 (1): 1-28. doi: 10.1186/s40537-022-00674-4 [18] 王健宇, 陈献天, 焦朋朋, 等. 考虑建成环境的交通事故严重程度致因交互效应研究[J]. 交通运输系统工程与信息, 2024, 24(2): 272-280.WANG J Y, CHEN X T, JIAO P P, et al. Interactive effect on traffic accident severity considering built environment[J]. Journal of Transportation Systems Engineering and Information Technology, 2024, 24(2): 272-280. (in Chinese) [19] 马飞虎, 张玉玲, 宁玮, 等. 基于XGBoost改进模型的高速公路事故多发点鉴别及预测[J]. 交通运输研究, 2024, 10 (3): 66-74.MA F H, ZHANG Y L, NING W, et al. Identification and prediction of highway accident-prone spots based on improved XGBoost model[J]. Transport Research, 2024, 10 (3): 66-74. (in Chinese) [20] 戢晓峰, 乔新. 建成环境对行人交通事故严重程度的非线性影响[J]. 交通运输系统工程与信息, 2023, 23(1): 314-323.JI X F, QIAO X. Nonlinear influence of built environment on pedestrian traffic accident severity[J]. Journal of Transportation Systems Engineering and Information Technology, 2023, 23(1): 314-323. (in Chinese) [21] 王天硕, 高景伯, 童盛军, 等. 面向不平衡数据的SMOTE-LSTM车辆事故检测方法[J]. 交通信息与安全, 2025, 43(1): 52-60. doi: 10.3963/j.jssn.1674-4861.2025.01.005WANG T S, GAO J B, TONG S J, et al. SMOTE-LSTM vehicle accident detection method for imbalanced data[J]. Journal of Transport Information and Safety, 2025, 43(1): 52-60. (in Chinese) doi: 10.3963/j.jssn.1674-4861.2025.01.005 -
下载: