Abstract
Past studies have proposed machine learning-based solutions for classifying software requirements, helping analysts, software architects, and developers efficiently and effectively identify the types of requirements. A common step performed by these solutions is to represent requirements as meaningful vectors. These vectors are used to identify and classify software requirements. The quality of the vector representations of software requirements determines the effectiveness, efficiency, and performance of the proposed solution. This study introduced a domain-specific pretrained model, Req2Vec, that extracts a distributed representation of non-functional software requirements (NFRs). Req2Vec is an unsupervised, domain-specific pre-trained model trained on thirty million samples of functional and non-functional requirements (FR and NFR). Req2Vec is aware of various requirements, including both functional and non-functional requirements, and seamlessly integrates them to learn representations of requirements. Using a limited supervised dataset, Req2Vec was investigated for various requirement classification tasks, including binary classification, reduced sets of NFR classifications, and all NFR classifications. In binary classification, the Req2Vec model achieved precision, recall, and F1 scores of 0.91, 0.87, and 0.89, respectively. For the reduced set of NFR classification, the average scores are 0.89, 0.85, and 0.87. For all classes, the average scores are 0.83, 0.77, and 0.80. A comparative analysis revealed that Req2Vec yields promising results in advancing technologies, demonstrating its effectiveness in accurately classifying NFRs.