Customizing Large Language Models for Reliable and Interpretable Traffic Crash Prediction and Safety Interventions | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Article Customizing Large Language Models for Reliable and Interpretable Traffic Crash Prediction and Safety Interventions Hao Frank Yang, Yang Zhao, Pu Wang, Yibo Zhao, Hongru Du This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-5947574/v1 This work is licensed under a CC BY 4.0 License Status: Published Journal Publication published 07 Oct, 2025 Read the published version in Nature Communications → Version 1 posted You are reading this latest preprint version Abstract Predicting crash events is crucial for understanding crash distributions and their contributing factors, thereby enabling the design of proactive traffic safety policy interventions. However, existing methods struggle to interpret the complex interplay among various sources of traffic crash data, including numeric characteristics, textual reports, crash imagery, environmental conditions, and driver behavior records. As a result, they often fail to capture the rich semantic information and intricate interrelationships embedded in these diverse data sources, limiting their ability to identify critical crash risk factors. In this research, we propose TrafficSafe, a framework that adapts Large Language Models (LLMs) to reframe crash prediction and feature attribution as text-based reasoning. A multi-modal crash dataset including 58,903 real-world reports together with belonged infrastructure, environmental, driver, and vehicle information is collected and textualized into TrafficSafe Event dataset (totaling 12.74 million words). By customizing and fine-tuning state-of-the-art LLMs on this dataset, the proposed TrafficSafe LLM achieves a 42% average improvement in F1-score over baselines across multiple crash prediction tasks, particularly for severe crashes. To interpret these predictions and uncover contributing factors, we introduce TrafficSafe Attribution, a sentence-level feature attribution framework enabling conditional risk analysis. Findings show that alcohol-impaired driving is the leading factor in severe crashes, with aggressive and impairment-related behaviors having nearly twice the contribution for severe crashes compared to other driver behaviors. In addition, the co-occurrence of crash-contributing factors, such as alcohol-impaired driving, work zones, improper driving behaviors and others can significantly elevate risk levels. Furthermore, TrafficSafe Attribution highlights pivotal features during model training, guiding strategic crash data collection for iterative performance improvements. The proposed TrafficSafe offers a transformative leap in traffic safety research based on foundation models, providing a blueprint for translating advanced artificial intelligence technologies into responsible, actionable, and life-saving outcomes. It is now reshaping how traffic researchers and policymakers approach the road safety. Physical sciences/Mathematics and computing/Computational science Physical sciences/Engineering/Civil engineering Scientific community and society/Social sciences/Decision making Physical sciences/Mathematics and computing/Information technology Full Text Additional Declarations There is NO Competing Interest. Supplementary Files Supplementary.pdf TrafficSafe_Supplementary_ Materials Cite Share Download PDF Status: Published Journal Publication published 07 Oct, 2025 Read the published version in Nature Communications → Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-5947574","acceptedTermsAndConditions":true,"allowDirectSubmit":false,"archivedVersions":[],"articleType":"Article","associatedPublications":[],"authors":[{"id":429876830,"identity":"e5be5058-5834-41c9-9c75-b04777c82167","order_by":0,"name":"Hao Frank Yang","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA70lEQVRIiWNgGAWjYBACAyD+AKWBLJ4DDHAOHi2MM2CqGGeQrIWZh4EILebshw82V9TcMTY4fvbwaxuZO4kN7M3bJPBpsexJS2w8c+yZmcGZvDTrHJ5niQ08x8rwajE4kGP+sIHtsA2QYWacw3M4sUEixwy/lvNvDBsb/gG1nH9jZmwB0iL/hoCWGzmGjY1th82ADOPHDGBbeAhpeZbY2Nh32Fjyxhszxh6ew8ZtPGnFFvgdlnywseHbYcO+8znGH372HJbtZz+88QY+LXCgcICBTYKxh4GBjSjlICDfwMD8geEH0epHwSgYBaNgBAEAqThU8iDDVTEAAAAASUVORK5CYII=","orcid":"https://orcid.org/0000-0001-6431-8956","institution":"Johns Hopkins University","correspondingAuthor":true,"prefix":"","firstName":"Hao","middleName":"Frank","lastName":"Yang","suffix":""},{"id":429876831,"identity":"0bc9e7ab-235f-47f6-bd89-2ad62156b7bb","order_by":1,"name":"Yang Zhao","email":"","orcid":"","institution":"Johns Hopkins University","correspondingAuthor":false,"prefix":"","firstName":"Yang","middleName":"","lastName":"Zhao","suffix":""},{"id":429876832,"identity":"f1a67f9d-9526-4b5a-a73b-a168017a3cd1","order_by":2,"name":"Pu Wang","email":"","orcid":"","institution":"Johns Hopkins University","correspondingAuthor":false,"prefix":"","firstName":"Pu","middleName":"","lastName":"Wang","suffix":""},{"id":429876833,"identity":"54f0546e-7d41-42f9-adcd-1029f837af5f","order_by":3,"name":"Yibo Zhao","email":"","orcid":"","institution":"Johns Hopkins University","correspondingAuthor":false,"prefix":"","firstName":"Yibo","middleName":"","lastName":"Zhao","suffix":""},{"id":429876834,"identity":"bbd4c88d-3e00-4718-86fd-57d869e141a2","order_by":4,"name":"Hongru Du","email":"","orcid":"","institution":"Johns hopkins university","correspondingAuthor":false,"prefix":"","firstName":"Hongru","middleName":"","lastName":"Du","suffix":""}],"badges":[],"createdAt":"2025-02-02 22:55:25","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-5947574/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-5947574/v1","draftVersion":[],"editorialEvents":[{"content":"https://doi.org/10.1038/s41467-025-64574-w","type":"published","date":"2025-10-07T04:00:00+00:00"}],"editorialNote":"","failedWorkflow":false,"files":[{"id":93009021,"identity":"2e5e3326-0dc1-4221-88c6-2201a58b1ce7","added_by":"auto","created_at":"2025-10-08 07:06:23","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":3903438,"visible":true,"origin":"","legend":"Article File","description":"","filename":"CrashLLMTRBNMI.pdf","url":"https://assets-eu.researchsquare.com/files/rs-5947574/v1_covered_b2b57b5e-b895-4cb7-9dbe-4c62589676b9.pdf"},{"id":81597951,"identity":"1f6789eb-127c-4f5b-bb68-fd8af019dfd7","added_by":"auto","created_at":"2025-04-29 03:11:29","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"supplement","size":2267190,"visible":true,"origin":"","legend":"TrafficSafe_Supplementary_ Materials","description":"","filename":"Supplementary.pdf","url":"https://assets-eu.researchsquare.com/files/rs-5947574/v1/bdb712fbef933d356b0d54be.pdf"}],"financialInterests":"There is \u003cb\u003eNO\u003c/b\u003e Competing Interest.","formattedTitle":"Customizing Large Language Models for Reliable and Interpretable Traffic Crash Prediction and Safety Interventions","fulltext":[],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":false,"highlight":"","institution":"","isAcceptedByJournal":true,"isAuthorSuppliedPdf":true,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":true,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"nature-portfolio","isNatureJournal":true,"hasQc":false,"allowDirectSubmit":false,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"","title":"Nature Portfolio","twitterHandle":"","acdcEnabled":false,"dfaEnabled":false,"editorialSystem":"ejp","reportingPortfolio":"","inReviewEnabled":true,"inReviewRevisionsEnabled":false},"keywords":"","lastPublishedDoi":"10.21203/rs.3.rs-5947574/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-5947574/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"Predicting crash events is crucial for understanding crash distributions and their contributing factors, thereby enabling the design of proactive traffic safety policy interventions. However, existing methods struggle to interpret the complex interplay among various sources of traffic crash data, including numeric characteristics, textual reports, crash imagery, environmental conditions, and driver behavior records. As a result, they often fail to capture the rich semantic information and intricate interrelationships embedded in these diverse data sources, limiting their ability to identify critical crash risk factors. In this research, we propose TrafficSafe, a framework that adapts Large Language Models (LLMs) to reframe crash prediction and feature attribution as text-based reasoning. A multi-modal crash dataset including 58,903 real-world reports together with belonged infrastructure, environmental, driver, and vehicle information is collected and textualized into TrafficSafe Event dataset (totaling 12.74 million words). By customizing and fine-tuning state-of-the-art LLMs on this dataset, the proposed TrafficSafe LLM achieves a 42% average improvement in F1-score over baselines across multiple crash prediction tasks, particularly for severe crashes. To interpret these predictions and uncover contributing factors, we introduce TrafficSafe Attribution, a sentence-level feature attribution framework enabling conditional risk analysis. Findings show that alcohol-impaired driving is the leading factor in severe crashes, with aggressive and impairment-related behaviors having nearly twice the contribution for severe crashes compared to other driver behaviors. In addition, the co-occurrence of crash-contributing factors, such as alcohol-impaired driving, work zones, improper driving behaviors and others can significantly elevate risk levels. Furthermore, TrafficSafe Attribution highlights pivotal features during model training, guiding strategic crash data collection for iterative performance improvements. The proposed TrafficSafe offers a transformative leap in traffic safety research based on foundation models, providing a blueprint for translating advanced artificial intelligence technologies into responsible, actionable, and life-saving outcomes. It is now reshaping how traffic researchers and policymakers approach the road safety.","manuscriptTitle":"Customizing Large Language Models for Reliable and Interpretable Traffic Crash Prediction and Safety Interventions","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2025-04-29 03:11:24","doi":"10.21203/rs.3.rs-5947574/v1","editorialEvents":[],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"nature-communications","isNatureJournal":true,"hasQc":false,"allowDirectSubmit":false,"externalIdentity":"NCOMMS","sideBox":"Learn more about [Nature Communications](http://www.nature.com/ncomms/)","snPcode":"","submissionUrl":"https://mts-ncomms.nature.com/","title":"Nature Communications","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"ejp","reportingPortfolio":"Nature Communications","inReviewEnabled":true,"inReviewRevisionsEnabled":false}}],"origin":"","ownerIdentity":"38c19832-6181-4788-acd6-05ea842816d0","owner":[],"postedDate":"April 29th, 2025","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"published-in-journal","subjectAreas":[{"id":45783160,"name":"Physical sciences/Mathematics and computing/Computational science"},{"id":45783161,"name":"Physical sciences/Engineering/Civil engineering"},{"id":45783162,"name":"Scientific community and society/Social sciences/Decision making"},{"id":45783163,"name":"Physical sciences/Mathematics and computing/Information technology"}],"tags":[],"updatedAt":"2025-10-08T07:06:14+00:00","versionOfRecord":{"articleIdentity":"rs-5947574","link":"https://doi.org/10.1038/s41467-025-64574-w","journal":{"identity":"nature-communications","isVorOnly":false,"title":"Nature Communications"},"publishedOn":"2025-10-07 04:00:00","publishedOnDateReadable":"October 7th, 2025"},"versionCreatedAt":"2025-04-29 03:11:24","video":"","vorDoi":"10.1038/s41467-025-64574-w","vorDoiUrl":"https://doi.org/10.1038/s41467-025-64574-w","workflowStages":[]},"version":"v1","identity":"rs-5947574","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-5947574","identity":"rs-5947574","version":["v1"]},"buildId":"8U1c8b4HqxoKbykW_rLl7","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.