Automating the Detection of Requirement Dependencies Using Large Language Models

Ikram Darif, Feifei Niu, Manel Abdellatif, Lionel C. Briand, S. Ramesh, Arun AdiththanarXiv 2026

TL;DR

This paper introduces LEREDD, a novel approach that uses Large Language Models (LLMs) to automatically detect dependencies between software requirements. By combining Retrieval-Augmented Generation (RAG) with In-Context Learning (ICL), LEREDD significantly outperforms existing methods, especially in identifying non-dependent requirements, which can drastically reduce manual effort in large projects.

What Problem Does This Paper Address?

In modern software development, requirements are rarely isolated; they are interconnected through various dependencies. Identifying these dependencies is crucial for impact analysis, ensuring consistency, and preventing costly rework. However, this task is challenging due to the inherent ambiguity of natural language requirements and the sheer volume of complex systems. Traditional methods are often manual, time-consuming, and prone to errors, especially with the ever-changing nature of requirements. Existing automated approaches have limitations, such as relying on fixed representations or requiring extensive manual effort for setup and maintenance. This paper aims to bridge this gap by leveraging the advanced natural language understanding capabilities of LLMs to automate this critical, yet often overlooked, task.

Methods

LEREDD employs a two-phase pipeline:

  1. Knowledge Retrieval: This phase aims to provide the LLM with relevant context.
  2. Contextual Retrieval (RAG): It uses Retrieval-Augmented Generation to extract domain-specific information from the Software Requirements Specification (SRS) document. This helps ground the LLM in the specific project context.
  3. Dynamic Examples Retrieval (ICL): It dynamically retrieves similar requirement pairs (along with their dependency types) from an annotated dataset. These examples are crucial for guiding the LLM's learning process without requiring extensive fine-tuning. The retrieval uses SBERT for embeddings and a "max similarity" aggregation strategy.
  4. Dependency Inference: The LLM (specifically GPT-4.1) then uses the augmented prompt, which includes the requirements, formal dependency definitions, retrieved context, and examples, to predict the dependency type. The LLM is also prompted to provide a rationale for its prediction and a confidence score, promoting transparency and reducing hallucinations.

Datasets

The authors constructed a new annotated dataset comprising 813 requirement pairs across three distinct automotive systems: Traffic Jam Assist (TJA), Automated Parking Assist (APA), and Adaptive Driving Beam (ADB). This dataset was created by two experienced requirements engineers who independently annotated requirement pairs, with disagreements resolved by consensus. The dataset is made publicly available for research purposes.

Key Insights and Ideas

  • LLMs are powerful, but zero-shot is insufficient: While LLMs like GPT-4.1 can identify non-dependent requirements in a zero-shot setting, they struggle with fine-grained dependencies, indicating that task-specific guidance is essential.
  • Few-shot learning is highly effective: Even a small number of carefully selected examples (3-5 per dependency type) significantly improves LLM performance, demonstrating that "precision over quantity" is key.
  • RAG enhances context: Integrating RAG to provide domain-specific context further boosts performance, especially when combined with few-shot examples, confirming that context is vital for accurate dependency detection.
  • LEREDD offers robustness: The proposed approach shows stable performance across different systems and even in cross-dataset evaluations, highlighting its generalization capabilities, which is a significant advantage over traditional ML models that are heavily reliant on training data distributions.
  • Filtering non-dependencies is a major win: LEREDD achieves exceptionally high accuracy (average F1 score of 96%) in identifying non-dependent requirements. This is crucial because these pairs constitute the majority of requirements, and effectively filtering them can drastically reduce manual analysis effort.

Key Results

  • LEREDD achieves an average accuracy of 92.66% and an F1 score of 84.33% across all dependency types and systems.
  • For the "No Dependency" class, LEREDD achieves an impressive average F1 score of 96%.
  • LEREDD significantly outperforms baselines (TF-IDF & LSA, and fine-tuned BERT) in both intra-dataset and cross-dataset evaluations.
  • For the "Requires" dependency, LEREDD yields average relative gains of 94.87% and 105.41% in F1 scores over the baselines in intra-dataset evaluation.
  • In cross-dataset evaluations, LEREDD's accuracy decreased by only 1.61%, demonstrating strong robustness.

Limitations and Future Work

  • Dataset Bias: The current dataset is limited to the automotive domain, which might affect the generalizability of the findings to other application areas.
  • Fine-grained Dependencies: While LEREDD shows substantial improvements, further refinement is still needed to achieve optimal performance on all fine-grained dependency types.
  • Future Work: The authors plan to extend LEREDD to capture indirect and implicit requirement dependencies and investigate the utility of predicted dependencies for impact analysis as requirements evolve over time.

Summary updated

BibTeX
@misc{darif2026automating,
  author = {Ikram Darif and Feifei Niu and Manel Abdellatif and Lionel C. Briand and S. Ramesh and Arun Adiththan},
  title = {{Automating the Detection of Requirement Dependencies Using Large Language Models}},
  year = {2026},
  eprint = {2602.22456},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.22456},
}
Figure