Source-linked AI summary

TrafficSafetyGPT: Tuning a Pre-trained Large Language Model to a Domain-Specific Expert in Transportation Safety

Ou Zheng, Mohamed Abdel-Aty, Dongdong Wang, Chenzhu Wang, Shengxuan Ding

arXiv:2307.15311v1cs.CL

TL;DR

Generic LLMs may underperform on transportation-safety tasks because they lack specialized domain expertise. The paper fine-tunes LLaMA with TrafficSafety-2K, combining government-labeled guidance with ChatGPT-generated instruction-output pairs, and reports stronger transportation-safety performance than LLaMA. The resulting model and dataset are intended as publicly available resources, but generated responses are not guaranteed accurate and should not replace professional engineer advice.

  • Problem

    Generic pre-trained LLMs may be constrained on transportation-safety tasks because accurate responses require specialized transportation-safety expertise.

    Source: §1 · p. 3
  • Method

    TrafficSafetyGPT is a LLaMA-based model supervised-fine-tuned on TrafficSafety-2K, which combines government-guideline labels with ChatGPT-generated instruction-output pairs.

    Source: §1 · p. 3, §3.2 · pp. 6–7
  • Results

    TrafficSafetyGPT consistently outperforms nonspecialized LLaMA across transportation-safety tasks, with significantly higher information coverage and briefer guidance responses.

    Source: §4.3 · pp. 10–11
  • Takeaways & Limitations

    The model and curated dataset provide resources for improving language-model capabilities in specialized transportation-safety applications.

    Source: §5 · p. 14

    Response accuracy is not guaranteed, and the model’s safety knowledge should not replace professional engineer advice.

    Source: §7 · p. 14

Abstract

from arXiv · show

Large Language Models (LLMs) have shown remarkable effectiveness in various general-domain natural language processing (NLP) tasks. However, their performance in transportation safety domain tasks has been suboptimal, primarily attributed to the requirement for specialized transportation safety expertise in generating accurate responses [1]. To address this challenge, we introduce TrafficSafetyGPT, a novel LLAMA-based model, which has undergone supervised fine-tuning using TrafficSafety-2K dataset which has human labels from government produced guiding books and ChatGPT-generated instruction-output pairs. Our proposed TrafficSafetyGPT model and TrafficSafety-2K train dataset are accessible at https://github.com/ozheng1993/TrafficSafetyGPT.

1. Introduction

Generic LLMs can be constrained in transportation safety because specialized expertise is needed for accurate responses. TrafficSafetyGPT addresses this gap by fine-tuning Meta AI’s LLaMA with transportation safety data from government guidelines and ChatGPT-generated instruction-output pairs.

  • Transportation safety is a niche application where generic pre-trained models may lack the specialized expertise needed for accurate responses.Training an LLM from scratch would require vast heterogeneous data, powerful hardware, and days to weeks of training.Source: §1 · p. 3
  • TrafficSafetyGPT fine-tunes Meta AI’s pre-trained LLaMA rather than building a language model from scratch.The approach combines LLaMA’s existing linguistic capabilities with a transportation safety dataset derived from government guidelines and ChatGPT-generated instruction-output pairs.Source: §1 · p. 3
  • The proposed model targets precise, context-sensitive, and safety-conscious responses aligned with ratified traffic safety standards and guidelines.Source: §1 · p. 3

2. Related Works

Prior work established broad LLM capabilities while highlighting limited transportation-safety research. It also showed that domain-specific fine-tuning and specialized datasets can adapt pre-trained models to expert applications.

2.1 Large Language Models

  • LLMs such as GPT-4, PaLM2 [3], Claude [4], Cohere, Falcon, and LLaMA [7] support language understanding, generation, reasoning, and text processing.LLaMA is selected as the foundation model because it is effective and available for research analysis.Source: §2.1 · pp. 3–4
  • Existing transportation-safety research has addressed trajectory prediction [15], safety planning and design [16], and safety rules [17], but the research body remains limited.Source: §2.1 · p. 4

2.2 Pre-trained Models with Domain Knowledge Fine-tuning

  • Domain-specific fine-tuning improves specialized LLM applications, including biomedical ChatDoctor [18] and Chinese medical LLaMA adaptation [19].Related techniques include soft fine-tuning, fine-grained categorization, domain-specific transfer learning, and LLaMA-adapter methods [21] [22].Source: §2.2 · p. 4
  • Specialized instruction datasets support adaptation through real and synthetic examples, including Alpaca’s 52k instruction-following points and medical conversation datasets.Examples include HealthCareMagic-100k and GenMedGPT-5k [18] [23].Source: §2.2 · p. 5

3 TrafficSafetyGPT

TrafficSafetyGPT uses LLaMA as its foundation and builds TrafficSafety-2K from government transportation-safety guidance, manually labeled data, and ChatGPT-generated examples. The dataset combines authoritative knowledge with broader scenario coverage for domain-specific instruction tuning.

3.1 Foundation Model

  • TrafficSafetyGPT uses a lightweight LLaMA foundation model from Meta’s open-access family of 7B, 13B, and 70B parameter models.The paper notes that LLaMA is available under a non-commercial license, while LLaMA 2 includes a commercial license.Source: §3.1 · p. 5

3.2 Transportation Safety Knowledge

  • Government guidance supplies authoritative transportation-safety knowledge, including 665 manually labeled rows covering traffic management, traffic operation, and drivers.The training sources include the NSTHA MMUCC Guideline Fourth Edition and FHWA Highway Safety Manual.Source: §3.2 · p. 5
  • MMUCC contributes standardized crash-data definitions, classifications, and reporting guidance across 1689 rows, while HSM contributes 311 labeled rows on data-driven safety management.HSM focuses on identifying high-crash locations, analyzing contributing factors, and selecting countermeasures.Source: §3.2 · p. 6

3.3 Knowledge-based Instruction Data

  • The section includes a table presenting the number of data in TrafficSafety-2K and a separate table illustrating knowledge-based instruction data.Source: Table 1 · p. 6, Table 2 · p. 7

3.2 Transportation Safety Knowledge

  • ChatGPT-generated transportation-safety rows supplement the limited labeled data in government books with specialized conversations and simulated real-world scenarios.The generated data is intended to improve practical applicability while retaining government-source consistency and accuracy.Source: §3.2 · p. 6
  • TrafficSafety-2K combines generated and real data because the authors identify a balanced dataset and fine-tuning process as necessary for reliable domain-specific insights.Source: §3.2 · p. 7

4 Experiment

The experiment fine-tunes LLaMA-7B with transportation-safety instruction data and evaluates generated answers using coverage, fluency, and brevity metrics. TrafficSafetyGPT consistently outperforms LLaMA across transportation-safety tasks, with higher information coverage and briefer guidance responses.

4 Experiment

  • Fine-tuning updates only LLaMA-7B’s last two layers to reduce overfitting while preserving pretrained reasoning and fluency features.The strategy also reduces space and time costs for practical implementation.Source: §4 · p. 8

4.1 Base model

  • The instruction-following data begin with 1k human-labeled instruction-output pairs and use ChatGPT to generate additional pairs from in-context examples.Figures 1 and 2 illustrate the generation process and examples.Source: §4.1 · pp. 8–9, Figure 1 · p. 9, Figure 2 · p. 9

4.2 Metrics

  • Coverage is assessed with BLEU, ROUGE, and BERTScore, fluency with BLEURT, and brevity by generated word count.The metrics capture complementary properties of generated responses, while the word count directly measures expression length.Source: §4.2 · pp. 9–10

4.3 Results

  • TrafficSafetyGPT consistently outperforms LLaMA across transportation-safety tasks after domain-specific fine-tuning.The reported improvement is attributed to more structured presentation and professional expression.Source: §4.3 · p. 10
  • TrafficSafetyGPT has significantly higher information coverage than LLaMA, including on BLEU, and produces briefer guidance responses.Enumeration tasks remain challenging because they are sensitive to exact word matching; domain terminology supports gains on these tasks.Source: §4.3 · p. 11

5. CONCLUSIONS

The paper concludes that TrafficSafetyGPT is a LLaMA-based model for transportation-safety tasks, trained with supervised fine-tuning on the TrafficSafety-2K dataset.

5. CONCLUSIONS

  • TrafficSafetyGPT combines a LLaMA-based model with supervised fine-tuning on human-labeled government guidance and ChatGPT-generated instruction-output pairs.The paper reports reliable traffic-safety knowledge, efficient computational resource use, and saved training time.Source: §5 · p. 14

6. AUTHOR CONTRIBUTIONS

The authors report contributions spanning study design, data processing, analysis, interpretation, and manuscript preparation.

6. AUTHOR CONTRIBUTIONS

  • The listed authors contributed across study conception, data collection and processing, results analysis and interpretation, and manuscript preparation.All authors reviewed the results and approved the final manuscript.Source: §6 · p. 14

7. Availability

TrafficSafetyGPT and its curated training dataset are publicly available for research and non-commercial purposes, but the paper warns against treating generated safety knowledge as professional advice.

7. Availability

  • The model and curated training dataset are publicly accessible for research and non-commercial purposes, with no assurance that generated responses are accurate.The paper states that model-generated safety knowledge should not replace professional engineer advice.Source: §7 · p. 14
Loading 2307.15311v1…