Submitted:
25 October 2024
Posted:
28 October 2024
You are already at the latest version
Abstract
In the domain of software engineering, the accurate and effective classification of requirements is of paramount importance. Proper classifications of these requirements enable developers to create robust and error-free software solution. Traditional methods of user requirements classification face the issue of the reliance on manual processes, which are time-consuming, labor-intensive, and prone to human error. The limitations of traditional methods underscore the need for more automated, scalable, and robust approaches to user requirements classification in order to meet the demands of modern software development practices. To improve the classification process, we employed a Deep Learning (DL) methodology termed the Bidirectional Long Short-Term Memory (Bi-LSTM) model to conduct feature extraction, after which we merged these feature vectors into ML classifiers. Our research methodology is structured around a five-step process. Initially, the textual input is tokenized and converted to lowercase. Subsequently, we eliminate all punctuation. The pre-processed text is then subjected to a Bi-LSTM (Bidirectional Long Short-Term Memory) model for feature vector extraction. After that, this feature vector is fed into different classifiers such as Medium KNN, Cubic KNN, Linear SVM, Quadratic SVM, and Cubic SVM and obtained an accuracy of around 99.60% to 99.80% on a publicly available dataset of requirements.
Keywords:
1. Introduction
2. Literature Review
3. Proposed Framework
A. Data Pre-processing
B. Extraction of Features Vector by employing Bi-LSTM Model
4. Experimental Results




- TP (True Positives): Instances correctly identified as positive.
- TN (True Negatives): Instances correctly identified as negative.
- FP (False Positives): Instances incorrectly identified as positive.
- FN (False Negatives): Instances incorrectly identified as negative.
Discussion
V. Threats to Validity
6. Conclusion
Future Work
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Ahmed, H.; Traore, I.; Saad, S. Detecting opinion spams and fake news using text classification. Secur. Priv. 2018, 1, e9. [Google Scholar] [CrossRef]
- Mallick, P.K.; Mishra, S.; Chae, G.S. Digital media news categorization using Bernoulli document model for web content convergence. Pers. Ubiquit. Comput. 2023, 27, 1087–1102. [Google Scholar] [CrossRef]
- Dias Canedo, E.; Cordeiro Mendes, B. Software Requirements Classification Using Machine Learning Algorithms. Entropy 2020, 22, 1057. [Google Scholar] [CrossRef] [PubMed]
- Tunali, V.; Tüysüz, M.A.A.J.P.Ü.M.B.D. Analysis of Function-Call Graphs of Open-Source Software Systems Using Complex Network Analysis. Pamukkale Univ. J. Eng. Sci. 2020, 26, 352–358. [Google Scholar] [CrossRef]
- Tunali, V.J.I.A. Improved Prioritization of Software Development Demands in Turkish with Deep Learning-Based NLP. IEEE Access 2022, 10, 40249–40263. [Google Scholar] [CrossRef]
- Khan, F.M.; Khan, J.A.; Assam, M.; Almasoud, A.S.; Abdelmaboud, A.; Hamza, M.A.M. A Comparative Systematic Analysis of Stakeholder’s Identification Methods in Requirements Elicitation. IEEE Access 2022, 10, 30982–31011. [Google Scholar] [CrossRef]
- Abad, Z.S.H.; Karras, O.; Ghazi, P.; Glinz, M.; Ruhe, G.; Schneider, K. What Works Better? A Study of Classifying Requirements. In Proceedings of the 2017 IEEE 25th International Requirements Engineering Conference (RE), Sep. 2017, pp. 496–501. IEEE. [CrossRef]
- Kanwal, J.; Maqbool, O. Bug Prioritization to Facilitate Bug Report Triage. J. Comput. Sci. Technol. 2012, 27, 397–412. [Google Scholar] [CrossRef]
- Sepahvand, R.; Akbari, R.; Hashemi, S.; Boushehrian, O. An Effective Model to Predict the Extension of Code Changes in Bug Fixing Process Using Text Classifiers. Iran. J. Sci. Technol. Trans. Electr. Eng. 2022, 1–18. [Google Scholar] [CrossRef]
- Javidi, Z.; Akbari, R.; Bushehrian, O. A New Method Based on Formal Concept Analysis and Metaheuristics to Solve Class Responsibility Assignment Problem. Iran J. Comput. Sci. 2021, 4, 221–240. [Google Scholar] [CrossRef]
- Etemadi, V.; Bushehrian, O.; Akbari, R.; Robles, G. A Scheduling-Driven Approach to Efficiently Assign Bug Fixing Tasks to Developers. J. Syst. Softw. 2021, 178, 110967. [Google Scholar] [CrossRef]
- Yousefi, M.; Akbari, R.; Moosavi, S.M.R. Using Machine Learning Methods for Automatic Bug Assignment to Developers. J. Electr. Comput. Eng. Innov. 2020, 8, 263–272. [Google Scholar] [CrossRef]
- Lima, M.; Valle, V.; Costa, E.; Lira, F.; Gadelha, B. Software Engineering Repositories: Expanding the Promise Database. In Proceedings of the XXXIII Brazilian Symposium on Software Engineering, Sep. 2019, pp. 427–436.
- Rahman, M.A.; Haque, M.A.; Tawhid, M.N.A.; Siddik, M.S. Classifying Non-Functional Requirements Using RNN Variants for Quality Software Development. In Proceedings of the 3rd ACM SIGSOFT International Workshop on Machine Learning Techniques for Software Quality Evaluation, Aug. 2019, pp. 25–30.
- Habibullah, K.M.; Gay, G.; Horkoff, J. Non-Functional Requirements for Machine Learning: Understanding Current Use and Challenges Among Practitioners. Req. Eng. 2023, 28, 283–316. [Google Scholar] [CrossRef]
- Hassan, S. , et al. A systematic mapping to investigate the application of machine learning techniques in requirement engineering activities. CAAI Transactions on Intelligence Technology 2024, 1–23. [Google Scholar] [CrossRef]
- Haque, M.A.; Rahman, M.A.; Siddik, M.S. Non-Functional Requirements Classification with Feature Extraction and Machine Learning: An Empirical Study. In Proceedings of the 2019 1st International Conference on Advances in Science, Engineering and Robotics Technology (ICASERT), May 2019, pp. 1–5. IEEE. [CrossRef]
- Ivanov, V.; Sadovykh, A.; Naumchev, A.; Bagnato, A.; Yakovlev, K. Extracting software requirements from unstructured documents. In Proceedings of the International Conference on Analysis of Images, Social Networks and Texts, Cham, Switzerland, December 2021; Springer International Publishing, pp. 17–29.
- Khayashi, F.; Jamasb, B.; Akbari, R.; Shamsinejadbabaki, P. Deep learning methods for software requirement classification: A performance study on the pure dataset. arXiv 2022, arXiv:2211.05286. [Google Scholar]
- Rahimi, N.; Eassa, F.; Elrefaei, L. An Ensemble Machine Learning Technique for Functional Requirement Classification. Symmetry 2020, 12, 1601. [Google Scholar] [CrossRef]
- Baker, C.; Deng, L.; Chakraborty, S.; Dehlinger, J. Automatic Multi-Class Non-Functional Software Requirements Classification Using Neural Networks. Proceedings of the 2019 IEEE 43rd Annual Computer Software and Applications Conference (COMPSAC) 2019, 2, 610–615. [Google Scholar] [CrossRef]
- Tiun, S.; Mokhtar, U.A.; Bakar, S.H.; Saad, S. Classification of Functional and Non-Functional Requirements in Software Requirement Using Word2vec and FastText. J. Phys. Conf. Ser. 2020, 1529, 042077. [Google Scholar] [CrossRef]
- Kadebu, P.; Sikka, S.; Tyagi, R.K.; Chiurunge, P. A Classification Approach for Software Requirements Towards Maintainable Security. Sci. Afr. 2023, 19, e01496. [Google Scholar] [CrossRef]
- Ahmed, M.; Khan, S.U.R.; Alam, K.A. An NLP-Based Quality Attributes Extraction and Prioritization Framework in Agile-Driven Software Development. Autom. Softw. Eng. 2023, 30, 7. [Google Scholar] [CrossRef]
- Yildirim, S.; Cevik, M.; Parikh, D.; Basar, A. Adaptive Fine-Tuning for Multiclass Classification Over Software Requirement Data. arXiv 2023, arXiv:2301.00495. [Google Scholar]
- Jang, B.; Kim, M.; Harerimana, G.; Kang, S.U.; Kim, J.W. Bi-LSTM Model to Increase Accuracy in Text Classification: Combining Word2vec CNN and Attention Mechanism. Appl. Sci. 2020, 10, 5841. [Google Scholar] [CrossRef]
- Software Requirements Dataset. Kaggle, 2022. Available online: https://www.kaggle.com/datasets/iamsouvik/software-requirements-dataset. (accessed on 18 September 2024).
- Peters, M.E.; Neumann, M.; Zettlemoyer, L.; Yih, W.T. Dissecting Contextual Word Embeddings: Architecture and Representation. arXiv 2018, arXiv:1808.08949. [Google Scholar]
- Kwon, B.S.; Park, R.J.; Song, K.B. Short-Term Load Forecasting Based on Deep Neural Networks Using LSTM Layer. J. Electr. Eng. Technol. 2020, 15, 1501–1509. [Google Scholar] [CrossRef]
- Basha, S.; Dubey, S.R.; Pulabaigari, V.; Mukherjee, S. Impact of Fully Connected Layers on Performance of Convolutional Neural Networks for Image Classification. Neurocomputing 2020, 378, 112–119. [Google Scholar] [CrossRef]
- Hu, R.; Tian, B.; Yin, S.; Wei, S. Efficient Hardware Architecture of Softmax Layer in Deep Neural Network. In Proceedings of the 2018 IEEE 23rd International Conference on Digital Signal Processing (DSP), Shanghai, China, November 2018; IEEE, pp. 1–5. [CrossRef]
- Ali, A.; Alrubei, M.A.; Hassan, L.F.M.; Al-Ja'afari, M.A.; Abdulwahed, S.H. Diabetes Diagnosis Based on KNN. IIUM Eng. J. 2020, 21, 175–181. [Google Scholar] [CrossRef]
- Maghari, A. Prediction of Student's Performance Using Modified KNN Classifiers. In Proceedings of the First International Conference on Engineering and Future Technology (ICEFT 2018), Cairo, Egypt; 2018; pp. 143–150. [Google Scholar]
- Chauhan, V.K.; Dahiya, K.; Sharma, A. Problem Formulations and Solvers in Linear SVM: A Review. Artif. Intell. Rev. 2019, 52, 803–855. [Google Scholar] [CrossRef]
- Altay, O.; Ulas, M.; Alyamac, K.E. Prediction of the Fresh Performance of Steel Fiber Reinforced Self-Compacting Concrete Using Quadratic SVM and Weighted KNN Models. IEEE Access 2020, 8, 92647–92658. [Google Scholar] [CrossRef]
- Jain, U.; Nathani, K.; Ruban, N.; Raj, A.N.J.; Zhuang, Z.; Mahesh, V.G. Cubic SVM Classifier Based Feature Extraction and Emotion Detection from Speech Signals. In Proceedings of the 2018 International Conference on Sensor Networks and Signal Processing (SNSP), Xi'an, China, October 2018; IEEE, pp. 386–391. [CrossRef]
- Vedaldi, A.; Lenc, K. MatConvNet: Convolutional Neural Networks for MATLAB. In Proceedings of the 23rd ACM International Conference on Multimedia, Brisbane, Australia, October 2015; pp. 689–692. [CrossRef]








| Study | Techniques/Models | Key Findings | Research Gaps |
|---|---|---|---|
| Haque, and Rehman [15] | Combination of ML attributes computation and classification methods | Achieved precision 66%, F1-score 61%, recall 61%, ,accuracy 76% | Limited precision and recall rates |
| Dias and Cordeiro [3] | Comparison of ML algorithms for feature extraction | F1-score 74% for general classification using PROMISE_exp dataset | Challenges with preprocessing and feature extraction |
| Ivanov et al.[16] | Fine-tuned BERT compared with ELMo and fastText | F1-score 86% on PURE dataset, 80% on RFI dataset | Need for better generalization across datasets |
| Khayashi et al,[17] | DL methods with voting algorithm | Promising results with PURE dataset having 2617 FRs and 2044 NFRs | Complexity in managing multiple DL methods |
| Baker et al, [19] | CNN and ANN models | Maximum precision 94%, recall 97%, F1-score 92% | Handling of imbalanced data |
| Tiun et al, [20] | Combination of LR, NB, SVM with Doc2Vec and Word2Vec | FastText technique showed best outcomes | Complexity in integrating various techniques |
| Tunali and Volkan [5] | DL method for demand prioritization | DL method performed better than other ML methods | Scalability and generalization to different domains |
| Kadebu et al,[21] | Classification using SVM, LR, MNB | Accuracy 86% for both binary and multiclass classification | Requirement for larger and diverse datasets |
| Ahmed et al,[22] | Automated method for quality attributes prioritization and extraction | Assessed using F-score, recall, and precision | Improvement in context-aware classification |
| Yildirim et al,[23] | Fine-tuning method for software requirement prediction | Fine-tuned model outperformed other techniques | Need for robust evaluation metrics |
| Jang et al,[24] | Hybrid model Bi-LSTM+CNN with attention mechanism | Improved accuracy with larger training data sizes and epochs | Addressing long-term dependency and data loss issues |
| LSTM Layer | Role | Formula |
|---|---|---|
| Input gate (it) | Determines which parts of the current input x(t) are relevant to be added to the cell state. | it = σ (Wi [ht−1 , xt] +bi) |
| Forget gate (ft) | Decides which parts of the previous cell state C(t−1) should be forgotten. | ft = σ (Wf [ht−1 , xt] + bf) |
| Output gate (Ot) | Determines which parts of the cell state will be outputted in the LSTM output ht | Ot = σ (Wo [ht−1 , xt] + bo) |
| Cell candidate gate (ct) | Generates a candidate vector of values that could be added to the cell state. The tanh function helps to keep these values normalized. | ct = tanh (Wc [ht−1 , xt] + bc) |
| Cell State( st) | Updates the cell state by combining the old state (modulated by the forget gate) and the new candidate values (modulated by the input gate). | + |
| LSTM Output (ht) | Determines the final output of the LSTM unit at time t. The output gate controls which parts of the cell state are outputted. | ht = Ot tanh(ct) |
| Class Name | Class Symbol | Class Name | Class Symbol |
|---|---|---|---|
| Functional | F | Operational | O |
| Availability | A | Performance | PE |
| Fault Tolerance | FT | Portability | PO |
| Legal | L | Scalability | SC |
| Look & Feel | LF | Security | SE |
| Maintainability | MN | Usability | US |
| Exper. | Batch Size | Learning Rate | Epochs | Accuracy (%) | Figure |
|---|---|---|---|---|---|
| 1 | 16 | 0.001 | 50 | 61.26 | 4 |
| 2 | 16 | 0.001 | 100 | 66.67 | 5 |
| 3 | 16 | 0.001 | 150 | 72.97 | 6 |
| 4 | 16 | 0.001 | 200 | 66.67 | 7 |
| Metric | Formula | Role |
|---|---|---|
| Recall (Rec) | TP / (TP + FN) | Measures the classifier's ability to identify all relevant instances. |
| Precision (Pr) | TP / (TP + FP) | Assesses the accuracy of the classifier when it predicts a positive class. |
| Accuracy (Acc) | (TP + TN) / (TP + TN + FP + FN) | Gives an overall idea of how often the classifier is correct. |
| Classifier | Recall | Precision | Accuracy | Time (Sec) |
|---|---|---|---|---|
| MKNN | 91.48 | 91.56 | 99.60 | 1.5199 |
| CKNN | 91.48 | 91.43 | 99.60 | 2.3769 |
| LSVM | 91.43 | 91.38 | 99.60 | 10.3560 |
| QSVM | 91.43 | 91.38 | 99.80 | 9.5692 |
| CSVM | 91.26 | 90.56 | 99.80 | 7.3273 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).