Large Language Model for Requirements Classification: An Ensemble Approach
Requirements engineering (RE) plays a vital role in the software development process, determining the software’s requirements. These requirements are usually classified into functional (FNs) and non-functional (NFRs) requirements. Proper classification of requirements is essential for ensuring the successful development of high-quality software. However, few studies have investigated the adoption of large language models (LLMs) for RE classification tasks. Most previous research applied machine learning or deep learning approaches, which often lacked generalization. In this study, we evaluated the performance of seven LLMs, including BERT, DistilBERT, DistilRoBERTa, ELECTRA, DeBERTaV3, RoBERTa, and XLNet for binary requirements classification, using a newly collected dataset. We then applied ensemble learning strategies on and evaluated its performance in the same dataset. The results showed that the ensemble model outperformed all individual models, achieving an F1-score of 92.48%, demonstrating the effectiveness of combining multiple models. DistilBERT achieved the highest individual model with an F1-score of 91.11%. This research contributes to advancing the use of LLMs for requirement classification in RE, offering a novel approach that combines several LLMs to enhance generalization and performance.
Authors
- Tawfeeq Alsanoosy (ORCID: https://orcid.org/0000-0003-2630-5972)
Institutions
- Taibah University (SA)
Publication Details
- Journal
- Procedia Computer Science
- Published
- 2025-01-01
- DOI
- https://doi.org/10.1016/j.procs.2025.09.490
- Primary Topic
- Software Engineering Techniques and Practices
- Type
- article
- Field-Weighted Citation Impact
- 0.00