## 4 Proposed Fault-Prone Software Requirements Specification Detection Model
### Ambiguous Classification Model
#### 4.1.4 Phase 3: Ambiguity Classification  
ACM uses deep learning algorithms to ensure high accuracy in detecting and classifying different types of ambiguities or clean requirements. To develop the ACM, we started with a pre-processed Ambiguous Requirements Dataset containing 7061 software requirements, which was then split into training and testing sets at an 80/20 ratio. We utilized two deep learning algorithms, Convolutional Neural Network (CNN), and a combination of CNN, Recurrent Neural Networks (RNNs), and Long Short-Term Memory networks (LSTMs). We also employed three word embedding techniques: GloVe, Word2 Vec, and FastText, to convert words into vector representations. GloVe uses global co-occurrence statistics to capture semantic relationships between words, identifying ambiguities from multiple meanings [19]. Word2 Vec provides vector representations of text, capturing semantic meaning for NLP tasks [20], while FastText extends Word2 Vec with a shallow neural network, capturing context for a fine-grained understanding of text [21]. We stacked the algorithms as Word2 Vec_CNN, GloVe_CNN, FastText_CNN, Word2 Vec_CNN_RNN_LSTM, GloVe_CNN_RNN_LSTM, and FastText_CNN_RNN_LSTM. Table 5 shows presents the details on each layer for each experiment for the proposed model. \begin{table}
\begin{tabular}{c c} \hline \hline
**Software Requirements** & **Labelled Dataset** \\ \hline Lexical Ambiguity & 474 \\ Syntactic Ambiguity & 615 \\ Semantic Ambiguity & 614 \\ Syntax Ambiguity & 504 \\ Pragmatic Ambiguity & 834 \\ Clean & 4020 \\ \hline
**Total** & **7061** \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Number of tweets in the dataset. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Algorithm** & **Main Layer** & **Neural Network Layer** & **Output** & **Kernel** & **Max-Pool** & **Activation Function** \\  & & & **Size** & **Size** & **Size** & **Size** \\ \hline Word2 Vec\_CNN & Input layer & Word2 Vec Embedding & 300 & None & None & None \\  & Layer & Layer & & & & \\  & Hidden & CNN Layer 1 & 300 & 3 & 50 & ReLU \\  & layer & CNN Layer 2 & 300 & 2 & 10 & ReLU \\  & Fully & Dense Layer 1 & 300 & None & None & ReLU \\  & connected layer & Dense Layer 2 (output layer) & 6 & None & None & None \\ \hline GloVe\_CNN & Input layer & GloVe Embedding layer & 300 & None & None & None \\  & Hidden & CNN Layer 1 & 300 & 3 & 50 & ReLU \\  & layer & CNN Layer 2 & 300 & 2 & 10 & ReLU \\  & Fully & Dense Layer 1 & 300 & None & None & ReLU \\  & connected layer & Dense Layer 2 (output layer) & 6 & None & None & None \\ \hline FastText\_CNN & Input layer & FastText Embedding & 300 & None & None & None \\  & Layer & Layer & & & & \\  & Hidden & CNN Layer 1 & 300 & 3 & 50 & ReLU \\  & layer & CNN Layer 2 & 300 & 2 & 10 & ReLU \\  & Fully & Dense Layer 1 & 300 & None & None & ReLU \\  & connected layer & Dense Layer 2 (output layer) & 6 & None & None & Softmax \\ \hline Word2 Vec\_CNN\_ & Input layer & Word2 Vec Embedding Layer & 300 & None & None & None \\ RNN\_LSTM & Hidden & CNN Layer 1 & 300 & 3 & 50 & ReLU \\  & layer & CNN Layer 2 & 300 & 2 & 10 & ReLU \\  & RNN Layer 1 & 300 & None & None & & Sigmoid \\  & LSTM Layer 1 & 256 & & & ReLU \\  & Fully & Dense Layer 1 & 300 & None & None & ReLU \\  & connected layer & Dense Layer 2 (output layer) & 6 & None & None & None \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Details on each layer in the proposed model for each experiment. Using the prepared datasets for the ACM, we present the training results of the algorithms for the ACM in Table 6, based on its performance in the ambiguity classification of software requirements. To calculate the ambiguity for each requirement in the ACM, each requirement was separated into a single word based on the type of ambiguity. The table presents the evaluation metrics, including accuracy, recall, precision, and F-measure for each model. Figure 4 illustrates the accuracy of the algorithms. Based on the results, the GloVe_CNN_RNN_LSTM model achieved the highest score of 0.9907 for accuracy.