## 3 Research Methodology
### Models Selection
#### 3.3.2 Selected Deep Learning Models  
Convolutional neural networks (CNNs) are the best-known and widely adopted DL models. The key advantage of CNNs over previous architectures is that they automatically recognize the important features without human supervision. It has been demonstrated that CNNs, which were first developed for computer vision, perform well on text classification tasks [55; 56; 57; 58; 59] in addition to other traditional natural language processing (NLP) tasks [60; 61]. Our framework uses the following CNN model architecture: an input layer consists of TF-IDF vectors of the email text, followed by a fully connected dense layer with 128 neurons and ReLU activation. A dropout layer with a rate of 0.3 is applied to prevent overfitting. Next, another dense layer with 64 neurons and ReLU activation is included, followed by another dropout layer with a rate of 0.3. Finally, the output layer comprises a single neuron with sigmoid activation for binary email text classification. Recurrent neural networks (RNNs) are mostly used in speech processing and NLP contexts. Unlike CNNs, an RNN employs sequential data in its network. This feature is vital for a wide range of applications since the embedded structure in the data sequence delivers meaningful information. For example, understanding the context of a sentence is essential for determining the meaning of a specific word in it. Thus, an RNN can be viewed as a short-term memory unit, with \(x\) representing the input layer, \(y\) representing the output layer, and \(s\) representing the state (hidden) layer [62]. We have used the following RNN model architecture: an embedding layer that converts tokenized sequences into dense vector representations. It has an input dimension equal to the vocabulary size, an output dimension of 128 (vector size for each word), and an input length of 200 (maximum sequence length). The SimpleRNN layer has 128 units to capture sequential patterns in the text and uses the ReLU activation function. The dense layer is fully connected with 64 neurons and uses ReLU as the activation function. The output layer is a fully connected layer with a single neuron and a sigmoid activation function for binary classification. Long short-term memory (LSTM) denotes that the LSTM network can produce long-term or short-term delays for a variety of operations [63]. An LSTM cell consists of four components: the cell state, the input gate, the forget gate, and the output gate. LSTM employs these four components to ensure long-term and short-term reliance on successive data. Compared to traditional RNNs, LSTMs have the benefit of processing long sequences more efficiently than RNNs because of their strong internal structure [64]. The LSTM model architecture used in our framework includes an embedding layer that converts tokenized sequences into dense vector representations. It has an input dimension equal to the vocabulary size, an output dimension of 128 (embedding size for each word), and an input length of 200 (maximum sequence length). The LSTM layer includes 128 units to capture long-term dependencies in the email text. It uses the Tanh activation function and does not return sequences; it outputs the last hidden state. The dense layer is a fully connected layer with 64 neurons and uses the ReLU activation function. Finally, the output layer is a fully connected layer with a single neuron. It uses the sigmoid activation function to produce probabilities for email text classification. Bidirectional encoder representations from transformers (BERT) is a widely used model developed by Google for NLP tasks [21]. Unlike traditional transformers that use both encoders and decoders, BERT utilizes only the encoder component.BERT processes input data using a multi-layer transformer encoder. It first embeds input tokens with a token embedding layer, then applies multiple self-attention layers within the encoder [65]. This allows BERT to understand the context by reading text bi-directionally, considering both words' left and right contexts.