Requirement Classification using Transfer Learning Models
摘要
Requirement engineering (RE) is the initial and crucial phase of software development to identify software requirements. These requirements are categorised as functional requirements (FRs) or non-functional requirements (NFRs). Classifying requirements is a critical task in ensuring the successful development of high-quality software. Automated classification can reduce ambiguity and development costs. Recent studies applied ML and DL techniques to automate requirement classification. However, these methods often lacked generalisation. Furthermore, training DL models from scratch required substantial time due to the limited availability of labelled data in RE. Transfer learning provided a solution by offering pre-trained models adaptable to domain-specific data. This study evaluates the performance of pre-trained transformer models, specifically BERT, RoBERTa and DeBERTa, for both binary and multi-class NFR classification using a newly collected dataset. The dataset comprised 4908 requirements, with 2595 FRs and 2313 NFRs. For binary requirement classification, BERT combined with LSTM achieved F1-score of 86.93%, followed by DeBERTa with 86.85%. For multi-class NFR classification, BERT combined with LSTM attained F1-scores ranging from 95.00 to 77.93%, with a weighted average F1-score of 89.45%. This research contributed to the understanding of transformer models for FR and NFR classification, thereby establishing a foundation for improved software development and quality. The findings also indicated promising results when applied to unseen software projects, yielding satisfactory outcomes. Additionally, the use of explainable artificial intelligence will support RE practitioners, as it provides transparency in the model’s decision-making, enabling practitioners to understand why certain classifications are made. This increases the model’s trustworthiness across projects.