Requirement Formalisation using Natural Language Processing and Machine Learning: A Systematic Review

Shekoufeh Kolahdouz-Rahimi, Kevin Lano, Chenghua Lin

TL;DR

This paper provides a systematic review of how Natural Language Processing (NLP) and Machine Learning (ML) are being used to turn messy, ambiguous software requirements into precise formal models. While the field is growing, the authors reveal a heavy reliance on manual "heuristic" rules and a surprising lack of Deep Learning and standardized benchmarks, making it difficult to compare different approaches.

What Problem Does This Paper Address?

In software development, "Requirement Engineering" is the critical first step where stakeholders describe what they want. Usually, these requirements are written in plain English, which is notoriously ambiguous and prone to misunderstanding. "Requirement Formalisation" (RF) is the process of translating these natural language descriptions into structured, formal notations (like UML diagrams) that can be used for automated validation and verification.

Doing this manually is slow and error-prone. While many researchers have proposed automated or semi-automated tools using NLP and ML, there is no clear consensus on which techniques are most effective. This paper conducts a systematic mapping study of 47 key papers from 2012 to 2022 to identify the current state-of-the-art, existing gaps, and a roadmap for future research.

Methods

The authors followed established guidelines for systematic literature reviews (Kitchenham and Petersen). They started with an initial pool of 257 papers from major libraries like IEEE Xplore and ACM Digital Library, eventually filtering them down to 47 primary studies based on specific inclusion/exclusion criteria.

They analyzed these studies across several dimensions:

  • NLP Techniques: Common tasks like tokenization, Part-of-Speech (POS) tagging, and dependency parsing.
  • ML/DL Algorithms: The use of classical classifiers (SVM, Decision Trees) versus modern Deep Learning (DL) models.
  • Input/Output: What kind of text goes in (e.g., User Stories) and what formal model comes out (e.g., Class Diagrams).
  • Evaluation: How researchers measure success (e.g., Precision, Recall).

Datasets

The review identifies several datasets used in the community, including:

  • Mendeley User Story Dataset: A common source for agile requirements.
  • PROMISE Dataset: A long-standing repository for empirical software engineering data.
  • Pure: A dataset of public requirements documents.
  • New Contribution: As part of the MDENet project, the authors introduced their own RF Repository (RFr, 2022), which includes 25 real-world user story cases designed to serve as a much-needed benchmark for the community.

Key Insights and Ideas

  • Heuristics Rule the Roost: Most current tools rely on "heuristic rules"—manually defined "if-then" logic to map text to models. While effective for specific formats, these rules often fail when faced with the diverse linguistic styles of real-world requirements.
  • The Deep Learning Gap: Despite the explosion of Large Language Models (LLMs) and Deep Learning in other fields, RF is lagging. The authors attribute this to a lack of large, labeled datasets specifically for requirement formalization.
  • The Reproducibility Crisis: A major "aha moment" in the paper is the identification of a lack of standard benchmarks. Because researchers use different datasets and non-standardized evaluation metrics, it is currently almost impossible to say which tool is actually "the best."
  • UML is the Standard Target: The vast majority of formalization efforts aim to produce UML Class Diagrams or Use Case Diagrams, highlighting these as the industry-standard "formal" language for requirements.

Key Results

  • Research Trends: Interest in this field peaked in 2021, showing that the community is actively looking for automation solutions.
  • Tooling: Stanford CoreNLP emerged as the most frequently used library for processing requirement text.
  • Input Structure: 71% of the surveyed studies deal with unstructured English text, while the rest focus on semi-structured formats like User Stories.
  • Performance Metrics: Precision, Recall, and F-measure are the standard quantitative metrics, but their values vary wildly across studies due to the lack of a common testing ground.

Limitations and Future Work

The primary limitation identified is the lack of completeness in rule-based systems; they simply cannot account for every way a human might write a requirement. Additionally, the under-utilization of Deep Learning means the field isn't yet benefiting from the latest leaps in AI.

Future Directions suggested by the authors include: 1. Developing a "Benchmark Framework": Creating a standardized set of cases and evaluation tools (which the authors have started with their GitHub repository). 2. A Guidance Platform: Building a tool to help developers choose the right NLP/ML technique based on their specific type of requirements. 3. Improving Replicability: Encouraging researchers to share their tools and data to ensure experiments can be verified by others.

Summary updated

BibTeX
@inproceedings{kolahdouzrahimi2022requirement,
  author = {Shekoufeh Kolahdouz-Rahimi and Kevin Lano and Chenghua Lin},
  title = {{Requirement Formalisation using Natural Language Processing and Machine Learning: A Systematic Review}},
  booktitle = {Zenodo},
  year = {2022},
  doi = {10.5281/zenodo.7337229},
}
Figure