## 4 Results and Discussion
### BERT and EMLO Embedding
## 5 Conclusions and Future Work

Systematically, this research evaluated the effectiveness of contextualized word embeddings (BERT, ELMo) against noncontextualized alternatives (Word2 Vec, GloVe) for social media spam detection, leveraging the capabilities of RNN architectures, particularly LSTM networks. Our analysis demonstrates the superior performance of contextualized models in processing Twitter and YouTube texts. Specifically, BERT and ELMo consistently achieved considerably higher accuracy, precision, and recall compared with Word2 Vec and GloVe. This can be attributed to their ability to generate distinct representations of the same word based on its semantic context. The ELMo embedder paired with logistic regression attained the top classification results across metrics, even on imbalanced datasets. This underscores the importance of contextual awareness in modeling the nuances of heterogeneous social media content. The findings pave the way for exploring innovative directions like \"deep forest\" approaches that leverage the transfer learning capacities of contextualized language models such as BERT and ELMo. Applying these techniques beyond English to languages like Arabic can accelerate multilingual social spam research, and the rigorous error analysis provided insights into why certain embedding-model combinations underpin, guiding efforts to enhance generalization. We demonstrate the profound impact of contextualized representations on recurrent neural network performance for real-worldspam detection across Twitter and YouTube. The analysis offers a robust framework for evaluating state-of-the-art NLP techniques to identify optimal deployment strategies tailored to diverse platforms. These findings highlight promising pathways for developing versatile, scalable, and accurate systems to secure burgeoning social media ecosystems against continuously evolving threats, in addition to emphasizing the superior performance of contextualized embeddings, discussing potential research directions, and highlighting the practical implications for real-world social media spam filtering systems. This research received no external funding. Not applicable. The data supporting the findings of this study are available from public sources on the social media platform Kaggle. Our research is a testament to the collaborative efforts of several esteemed institutions whose contributions have been fundamental to the success of this study. We extend gratitude to the Southern Illinois University Carbondale (SIUC), Yarmouk University, and Prince Sultan University. Each institution has provided a wealth of resources, academic expertise, and a collaborative spirit that has been indispensable in our pursuit of knowledge and the successful completion of this paper. Their joint commitment to research excellence has not only propelled this project but also reinforced the value of academic cooperation. The authors declare no conflicts of interest. ## References

* (1) [PERSON]; [PERSON]; [PERSON] [PERSON] Ham and spam e-mails classification using machine learning techniques. _J. Appl. Secur. Res._**2018**, _13_, 315-331. [CrossRef]
* (2) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] Determinants of fake news diffusion on social media: A systematic literature review. _Glob. Knowl. Mem. Commun._**2023**, _ahead-of-print_. [CrossRef]
* (3) [PERSON]; [PERSON] Spam filtering in social networks using regularized deep neural networks with ensemble learning. In Proceedings of the Artificial Intelligence Applications and Innovations: 14 th IFIP WG 12.5 International Conference, AIAI 2018, Rhodes, Greece, 25-27 May 2018; Proceedings 14; Springer: Berlin/Heidelberg, Germany, 2018; pp. 38-49. * (4) [PERSON]; [PERSON]; [PERSON]; [PERSON] Twitter spam detection: Survey of new approaches and comparative study. _Comput. Secur._**2018**, _76_, 265-284. [CrossRef]
* (5) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]. Predictive Analytics in Mental Health Leveraging LLM Embeddings and Machine Learning Models for Social Media Analysis. _Int. J.