Skip to main navigation Skip to search Skip to main content

Cross-Level Requirements Tracing Based on Large Language Models

  • Chuyan Ge
  • , Tiantian Wang*
  • , Xiaotian Yang
  • , Christoph Treude
  • *Corresponding author for this work
  • Faculty of Computing, Harbin Institute of Technology
  • Singapore Management University

Research output: Contribution to journalArticlepeer-review

Abstract

Cross-level requirements traceability, linking high-level requirements (HLRs) and low-level requirements (LLRs), is essential for maintaining relationships and consistency in software development. However, the manual creation of requirements links necessitates a profound understanding of the project and entails a complex and laborious process. Existing machine learning and deep learning methods often fail to fully understand semantic information, leading to low accuracy and unstable performance. This paper presents the first approach for cross-level requirements tracing based on large language models (LLMs) and introduces a data augmentation strategy (such as synonym replacement, machine translation, and noise introduction) to enhance model robustness. We compare three fine-tuning strategies—LoRA, P-Tuning, and Prompt-Tuning—on different scales of LLaMA models (1.1B, 7B, and 13B). The fine-tuned LLMs exhibit superior performance across various datasets, including six single-project datasets, three cross-project datasets within the same domain, and one cross-domain dataset. Experimental results show that fine-tuned LLMs outperform traditional information retrieval, machine learning, and deep learning methods on various datasets. Furthermore, we compare the performance of GPT and DeepSeek LLMs under different prompt templates, revealing their high sensitivity to prompt design and relatively poor result stability. Our approach achieves superior performance, outperforming GPT-4o and DeepSeek-r1 by 16.27% and 16.8% in F-measure on cross-domain datasets. Compared to the baseline method that relies on prompt engineering, it achieves a maximum improvement of 13.8%.

Original languageEnglish
Pages (from-to)2044-2066
Number of pages23
JournalIEEE Transactions on Software Engineering
Volume51
Issue number7
DOIs
StatePublished - 2025
Externally publishedYes

Keywords

  • Requirements tracing
  • data augmentation
  • fine-tuning
  • large language models
  • software requirements

Fingerprint

Dive into the research topics of 'Cross-Level Requirements Tracing Based on Large Language Models'. Together they form a unique fingerprint.

Cite this