Enhanced Twitter Bot Detection via Static and Temporal Feature Integration

Authors

  • Zahraa E. H. Al-Khersan Department of Information Computer Systems, Faculty of Computer Science and Information Technology, Basra University, Basra, Iraq
  • Nahla A. Flayh Department of Information Computer Systems, Faculty of Computer Science and Information Technology, Basra University, Basra, Iraq

DOI:

https://doi.org/10.29304/jqcsm.2025.17.42574

Keywords:

Temporal, Real

Abstract

This study presents a robust supervised learning framework tailored for the precise identification of Twitter bots. The central contribution lies in the integration of both static and temporal features to establish a comprehensive representation of user behavior. Using the benchmark Cresci-2017 dataset, the framework constructs a rich feature space encompassing profile-level metadata, detailed posting frequency statistics, and fine-grained temporal activity features, enabling effective discrimination between sophisticated bots and genuine human users. To fully exploit this diverse information, an advanced stacking ensemble is employed. This architecture strategically combines the predictive strengths of multiple base learners Random Forest, LightGBM, XGBoost, and Support Vector Machine while a Logistic Regression meta-learner is trained to optimally integrate their outputs. The resulting model delivers state-of-the-art performance, achieving 98.71% accuracy, 99.26% precision, 99.04% recall, and a 99.15% F1-score, substantially outperforming individual classifiers. These findings underscore the value of unifying heterogeneous feature types with stacked generalization, highlighting that strategically diverse feature engineering coupled with advanced ensemble methods is essential for building resilient defenses against the rapidly evolving landscape of automated bot behavior.

Downloads

Download data is not yet available.

References

Mazza, M., Avvenuti, M., Cresci, S., and Tesconi, M., “Investigating the difference between trolls, social bots, and humans on Twitter", Computer Communications, vol. 199, (2022), pp: 111–126, https://www.sciencedirect.com/science/article/abs/pii/S0140366422003711?via %3Dihub.

Aljabri, M., Zagrouba, R., Shaahid, A., Alnasser, F., Saleh, A., and Alomari, D. M., "Machine learning-based social media bot detection: a comprehensive literature review", Social Network Analysis and Mining, vol. 13, Article 20, (2023), https://www.researchgate.net/publication/366895683_Machine_learningbased_social_media_bot_detection_a_comprehensive_literature_review

Rani, S., and Gill, N. S., "Hybrid Model for Twitter Data Sentiment Analysis Based on Ensemble of Dictionary Based Classifier and Stacked Machine Learning Classifiers—SVM, KNN and C5.0", Journal of Theoretical and Applied Information Technology, vol. 98, no. 04, (2020), PP: 610–619 https://www.researchgate.net/publication/345197750_Hybrid_model_for_twitter data_sentiment_analysis_based_on_ensemble_of_dictionary_based_classifier _and_stacked_machine_learning_classifiers-SVM_KNN_and_C50.

Dimitriadis, I., Georgiou, K., & Vakali, A., "Social botomics: A systematic ensemble ML approach for explainable and multi-class bot detection" , Applied Sciences, 11(21), 9857, (2021), https://www.researchgate.net/publication/355502305_Social_Botomics_A_Syst ematic_Ensemble_ML_Approach_for_Explainable_and_MultiClass_Bot_Detection.

Ren, Y., Wu, D., Singh, A., Kasson, E., Huang, M., and Cavazos-Rehg, P., "Automated Detection of Vaping-Related Tweets on Twitter During the 2019 EVALI Outbreak Using Machine Learning Classification", Frontiers in Big Data, vol. 5, Article 770585, (2022), https://www.frontiersin.org/journals/bigdata/articles/10.3389/fdata.2022.770585/full.

Darem, A. A., Alhashmi, A. A., Alanazi, M. H., Alanezi, A. F., Said, Y., Darem, L. A., & Hussain, M. M., "Cybersecurity in social networks: An ensemble model for Twitter bot detection", International Journal of Advanced and Applied Sciences, 11(11), (2024), PP: 130–141, https://www.researchgate.net/publication/386064983_Cybersecurity_in_social_ networks_An_ensemble_model_for_Twitter_bot_detection.

Kadhim, A., and Abdullah, A. M., "Fake accounts detection on social media using stack ensemble system", International Journal of Electrical and Computer Engineering (IJECE), vol. 12, no. 3, (2022), PP: 3013–3022, https://www.researchgate.net/publication/359602764_Fake_accounts_detection _on_social_media_using_stack_ensemble_system.

Ng, L. H. X., & Carley, K. M., "Assembling a multi-platform ensemble social bot detector with applications to US 2020 elections" ,Social Network Analysis and Mining, 14(45), (2024), https://www.researchgate.net/publication/378464325_Assembling_a_multiplatform_ensemble_social_bot_detector_with_applications_to_US_2020_elections.

Hannousse, A., and Talha, Z., "A Hybrid Ensemble Learning Approach for Detecting Bots on Twitter", International Journal of Performability Engineering, vol. 20, no. 10, (2024), PP: 610–620, https://www.researchgate.net/publication/391943243_A_Hybrid_Ensemble_Le arning_Approach_for_Detecting_Bots_on_Twitter.

Downloads

Published

2025-12-30

How to Cite

Al-Khersan, Z. E. H., & Flayh, N. A. (2025). Enhanced Twitter Bot Detection via Static and Temporal Feature Integration . Journal of Al-Qadisiyah for Computer Science and Mathematics, 17(4), Comp 349–359. https://doi.org/10.29304/jqcsm.2025.17.42574

Issue

Section

Computer Articles