Enhancing Spam Detection in Arabic Texts: A Comparative Analysis of RNN and LSTM Models
摘要
The detection of spam in Arabic texts presents a significant challenge due to the language’s intricate morphology, syntax, and dialectal diversity. This study compares the performance of Recurrent Neural Networks (RNNs) and Long Short-Term Memory (LSTM) networks in detecting spam in Arabic texts. Both models were trained on the “Dataset of Arabic Spam and Ham Tweets,” comprising 13,240 labeled tweets collected using the Twitter REST API. A comprehensive preprocessing stage, comprising tokenization and normalization, was employed to prepare the data for training. The performance of the models was evaluated using a range of metrics, including accuracy, precision, recall, and F1-score. The results demonstrated that the LSTM model outperformed the RNN model, achieving an accuracy of 97.75% compared to 96.22%. This superior performance can be attributed to LSTM effectively captures long-term patterns in text and contextual nuances, which are essential for processing Arabic’s intricate linguistic structures. The findings highlight the potential of deep learning techniques in advancing spam detection for underrepresented languages like Arabic.