journal article·2025-09-14Open access

A Novel Approach to SPAM Detection in Social Networks-Light-ANFIS: Integrating Gradient-Based One-Sided Sampling and Random Forest-Based Feature Clustering Techniques with Adaptive Neuro-Fuzzy Inference Systems

Oğuzhan Çıtlak, İsmail Atacak, İbrahim Alper Doğru

Applied Sciences· Volume 15· Issue 18

Abstract

With today’s technological advancements and the widespread use of the Internet, social networking platforms that allow users to interact with each other are increasing rapidly. The popular social network X (formerly Twitter) has become a target for malicious actors, and spam is one of its biggest challenges. The filters employed by such platforms to protect users struggle to keep up with evolving spam techniques, the diverse behaviors of platform users, the dynamic tactics of spam accounts, and the need for updates in spam detection algorithms. The literature shows that many effective solutions rely on computationally expensive methods that are limited by dataset constraints. This study addresses the spam challenges of social networks by proposing a novel detection framework, Light-ANFIS, which combines ANFIS with gradient-based one-side sampling (GOSS) and random forest-based clustering (RFBFC) techniques. The proposed approach employs the RFBFC technique to achieve efficient feature reduction, yielding an ANFIS model with reduced input requirements. This optimized ANFIS structure enables a simpler system configuration by minimizing parameter usage. In this context, dimensionality reduction enables a faster ANFIS training. The GOSS technique further accelerates ANFIS training by reducing the sample size without sacrificing accuracy. The proposed Light-ANFIS architecture was evaluated using three datasets: two public benchmarks and one custom dataset. To demonstrate the impact of GOSS, its performance was benchmarked against that of RFBFC-ANFIS, which relies solely on RFBFC. Experiments comparing the training durations of the Light-ANFIS and RFBFC-ANFIS architectures revealed that the GOSS technique improved the training time efficiency by 38.77% (Dataset 1), 40.86% (Dataset 2), and 38.79% (Dataset 3). The Light-ANFIS architecture has also achieved successful results in terms of accuracy, precision, recall, F1-score, and AUC performance metrics. The proposed architecture has obtained scores of 0.98748, 0.98821, 0.99091, 0.98956, and 0.98664 in Dataset 1; 0.98225, 0.97412, 0.99043, 0.98221, and 0.98233 in Dataset 2; and 0.98552, 0.98915, 0.98720, 0.98818, and 0.98503 in Dataset 3 for these performance metrics, respectively. The Light-ANFIS architecture has been observed to demonstrate performance above existing methods when compared with methods in studies using similar datasets and methodologies based on the literature. Even in Dataset 1 and Dataset 3, it achieved a slightly better performance in terms of confusion matrix metrics compared to current deep learning (DL)-based hybrid and fusion methods, which are known as high-performance complex models in this field. Additionally, the proposed model not only exhibits high performance but also features a simpler configuration than structurally equivalent models, providing it with a competitive edge. This makes it a valuable for safeguarding social media users from harmful content.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Neural Networks and Applications · Text and Document Classification Technologies · Network Security and Intrusion Detection

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Department of Computer Engineering, Graduate School of Natural and Applied Sciences, Gazi University, Ankara 06500, Turkey

IoTLab, Department of Computer Engineering, Faculty of Technology, Gazi University, Ankara 06560, Turkey

Department of Computer Engineering, Faculty of Technology, Gazi University, Ankara 06560, Turkey

References (91)

Show source-provided references
1. Patmanthara, S., Febiharsa, D., and Dwiyanto, F.A. (2019, January 3–4). Social Media as a Learning Media: A Comparative Analysis of Youtube, WhatsApp, Facebook and Instagram Utillization. Proceedings of the 2019 International Conference on Electrical, Electronics and Information Engineering (ICEEIE), Denpasar, Bali, Indonesia.10.1109/ICEEIE47180.2019.8981441 ↗
2. Masciantonio, A., Bourguignon, D., Bouchat, P., Balty, M., and Rimé, B. (2021). Don’t Put All Social Network Sites in One Basket: Facebook, Instagram, Twitter, TikTok, and Their Relations with Well-Being during the COVID-19 Pandemic. PLoS ONE, 16.10.1371/journal.pone.0248384 ↗
3. (2025, June 15). Authenticity | X Help. Available online: https://help.x.com/en/rules-and-policies/authenticity.
4. A Comprehensive Survey of Spam Profile Detection Methods in Online Social Networks10.1088/1742-6596/1362/1/012111 ↗
5. Mian, S.M., Khan, M.S., Shawez, M., and Kaur, A. (2024, January 10–12). Artificial Intelligence (AI), Machine Learning (ML) & Deep Learning (DL): A Comprehensive Overview on Techniques, Applications and Research Directions. Proceedings of the 2024 2nd International Conference on Sustainable Computing and Smart Systems (ICSCSS), Coimbatore, India.10.1109/ICSCSS60660.2024.10625198 ↗
6. StopSpamX: A Multi Modal Fusion Approach for Spam Detection in Social Networking10.1016/j.mex.2025.103227 ↗
7. Topic-Aware Neural Attention Network for Malicious Social Media Spam Detection10.1016/j.aej.2024.10.073 ↗
8. Pal, A.A., Mondal, S., Kumar, C.A., and Kumar, C.J. (2025, January 20–22). A Transformer-Based Approach for Fake News and Spam Detection in Social Media Using RoBERTa. Proceedings of the 2025 International Conference on Multi-Agent Systems for Collaborative Intelligence (ICMSCI), Erode, India.10.1109/ICMSCI62561.2025.10894342 ↗
9. A Survey on Detecting Spam Accounts on Twitter Network
10. Choi, J., Jeon, B., and Jeon, C. (2024). Scalable Learning Framework for Detecting New Types of Twitter Spam with Misuse and Anomaly Detection. Sensors, 24.10.3390/s24072263 ↗
11. Rovito, L., Bonin, L., Manzoni, L., and De Lorenzo, A. (2022). An Evolutionary Computation Approach for Twitter Bot Detection. Appl. Sci., 12.10.3390/app12125915 ↗
12. Addressing the Class Imbalance Problem in Twitter Spam Detection Using Ensemble Learning10.1016/j.cose.2016.12.004 ↗
13. A Hybrid Approach for Detecting Automated Spammers in Twitter10.1109/TIFS.2018.2825958 ↗
14. Early Detection and Prevention of Malicious User Behavior on Twitter Using Deep Learning Techniques10.1109/TCSS.2024.3419171 ↗
15. Patel, P., Bhushanwar, K., and Patel, H. (2025, January 18–20). Social Media Analysis for Criminal Behavior Detection: Methods, Application and Challenge. Proceedings of the 2025 4th International Conference on Sentiment Analysis and Deep Learning (ICSADL), Bhimdatta, Nepal.10.1109/ICSADL65848.2025.10933426 ↗
16. Hussain, N., Turab Mirza, H., Rasool, G., Hussain, I., and Kaleem, M. (2019). Spam Review Detection Techniques: A Systematic Literature Review. Appl. Sci., 9.10.3390/app9050987 ↗
17. A Comparative Study of the Class Imbalance Problem in Twitter Spam Detection10.1002/cpe.4281 ↗
18. Herrero, Á., Baruque, B., Klett, F., Abraham, A., Snášel, V., de Carvalho, A.C.P.L.F., Bringas, P.G., Zelinka, I., Quintián, H., and Corchado, E. (2013, January 11–13). Twitter Content-Based Spam Filtering. Proceedings of the International Joint Conference SOCO’13-CISIS’13-ICEUTE’13, Salamanca, Spain.10.1007/978-3-319-01854-6 ↗
19. Deceptive Opinion Spam Detection Using Feature Reduction Techniques10.1007/s13198-023-02208-4 ↗
20. Dheyaa Radhi, A., Obeid, H.N., Al-Attar, B., Fuqdan, A.-I., Hakim, B.A., and Ali Hussein Al Naffakh, H. (2024). Unmasking Deceptive Profiles: A Deep Dive into Fake Account Detection on Instagram and Twitter. BIO Web Conf., 97.10.1051/bioconf/20249700127 ↗
21. An Ensemble Deep Learning Model for Fast Classification of Twitter Spam10.1016/j.im.2024.104052 ↗
22. Enhancing Detection of Malicious Profiles and Spam Tweets with an Automated Honeypot Framework Powered by Deep Learning10.1007/s10207-023-00796-7 ↗
23. Kumar, M.R., Bharathi, P.S., and Sajiv, G. (2024, January 4–5). Accuracy Enhancement in Detection of Malicious Social Bots Using Reinforcement Learning Technique with URL Features in Twitter Network Through Convolutional Neural Network over K -Nearest Neighbors. Proceedings of the 2024 Ninth International Conference on Science Technology Engineering and Mathematics (ICONSTEM), Chennai, India.10.1109/ICONSTEM60960.2024.10568804 ↗
24. Dhabliya, D., Karthikeyan, C., Sood, G., Faiz, A., and Shah, M.D. (2024, January 13–14). Robust Twitter Spam Detection Through Ensemble Learning and Optimal Feature Selection. Proceedings of the 2024 IEEE 4th International Conference on ICT in Business Industry & Government (ICTBIG), Indore, India.10.1109/ICTBIG64922.2024.10911727 ↗
25. Follow Spam Detection Based on Cascaded Social Information10.1016/j.ins.2016.07.033 ↗
26. Detecting Non-Personal and Spam Users on Geo-Tagged Twitter Network10.1111/tgis.12101 ↗
27. SohoNet: A Novel Social Honeynet Framework for Detecting Social Bots in Online Social Networks
28. An Efficient Malicious Social Bots with URL Features Detection Using Densenet Compared over ANN with Improved Accuracy10.1063/5.0262672 ↗
29. Divani, N., and Vinitha, A. (2025, January 11–13). Machine Learning-Based Detection of Malicious URLs in Twitter. Proceedings of the 2025 International Conference on Machine Learning and Autonomous Systems (ICMLAS), Prawet, Thailand.10.1109/ICMLAS64557.2025.10968493 ↗
30. Güngör, K.N., Ayhan Erdem, O., and Doğru, İ.A. (November, January 31). Tweet and Account Based Spam Detection on Twitter. Proceedings of the The International Conference on Artificial Intelligence and Applied Mathematics in Engineering, Warsaw, Poland.
31. Asthana, Y., Chhabra, R., and Srivastava, S. (2024, January 18–19). Machine Learning Techniques for Twitter Spam Detection: Comparative Insights and Real-Time Application. Proceedings of the 2024 14th International Conference on Cloud Computing, Data Science & Engineering (Confluence), Noida, India.10.1109/Confluence60223.2024.10463206 ↗
32. Asha, S., Madhan, M., PB, H.K., Hariharan, S., and Dharaneesh, B. (2024, January 4–6). Twitter (X) Spam Detection Using Natural Language Processing by Encoder Decoder Model. Proceedings of the 2024 1st International Conference on Sustainable Computing and Integrated Communication in Changing Landscape of AI (ICSCAI), Greater Noida, India.10.1109/ICSCAI61790.2024.10866112 ↗
33. Asmitha, M., and Kavitha, C.R. (2024, January 5–7). Exploration of Automatic Spam/Ham Message Classifier Using NLP. Proceedings of the 2024 IEEE 9th International Conference for Convergence in Technology (I2CT), Pune, India.10.1109/I2CT61223.2024.10544236 ↗
34. Gupta, S., Khattar, A., Gogia, A., Kumaraguru, P., and Chakraborty, T. (2018, January 23–27). Collective Classification of Spam Campaigners on Twitter: A Hierarchical Meta-Path Based Approach. Proceedings of the 2018 World Wide Web Conference, Lyon, France.10.1145/3178876.3186119 ↗
35. A Nudge to Credible Information as a Countermeasure to Misinformation: Evidence from Twitter10.1287/isre.2021.0491 ↗
36. Nikhil Sai, G.V., Tubagus, R.A., Rohith, V., and Donavalli, H. (2024, January 24–26). Unlocking Deeper Data Insights on Social Media: Removing Hashtag and Tweets Spam for Improved Content Analysis. Proceedings of the 2024 5th International Conference for Emerging Technology (INCET), Belgaum, India.10.1109/INCET61516.2024.10593042 ↗
37. A Content Analysis: Analyzing Topics of Conversation under the #sustainability Hashtag on Twitter10.1017/eds.2024.4 ↗
38. Detection of Spam-Posting Accounts on Twitter10.1016/j.neucom.2018.07.044 ↗
39. Swe, M.M., and Nyein Myo, N. (2018, January 6–8). Fake Accounts Detection on Twitter Using Blacklist. Proceedings of the 2018 IEEE/ACIS 17th International Conference on Computer and Information Science (ICIS), Singapore.10.1109/ICIS.2018.8466499 ↗
40. Application of Interval Type-2 Fuzzy Logic and Type-1 Fuzzy Logic-Based Approaches to Social Networks for Spam Detection with Combined Feature Capabilities10.7717/peerj-cs.1316 ↗
41. A Survey of Spam Detection Methods on Twitter
42. Şencan, Ö.A., Atacak, İ., and Doğru, İ.A. (2022). Sosyal Ağlarda Topluluk ve Konu Tespiti: Bir Sistematik Literatür Taraması. Int. J. Inform. Technol., 15.10.17671/gazibtd.1061332 ↗
43. Zhang, L., Liu, W., and Wang, J. (2025, January 16–18). Design of Spam Detection and Classification System Based on Artificial Intelligence. Proceedings of the 2025 5th International Symposium on Computer Technology and Information Science (ISCTIS), Xi’an, China.10.1109/ISCTIS65944.2025.11065358 ↗
44. A Review of Artificial Intelligence Techniques for Optimizing Friction Stir Welding Processes and Predicting Mechanical Properties
45. Shifath, S.M.S.-U.-R., Khan, M.F., and Islam, M.S. (2021). A Transformer Based Approach for Fighting COVID-19 Fake News 2021. arXiv.
46. Alshattnawi, S., Shatnawi, A., AlSobeh, A.M.R., and Magableh, A.A. (2024). Beyond Word-Based Model Embeddings: Contextualized Representations for Enhanced Social Media Spam Detection. Appl. Sci., 14.10.3390/app14062254 ↗
47. A Deep Learning Model for Twitter Spam Detection10.1016/j.osnem.2020.100079 ↗
48. A Novel Approach for Spam Detection Using Natural Language Processing with AMALS Models10.1109/ACCESS.2024.3391023 ↗
49. Altwaijry, N., Al-Turaiki, I., Alotaibi, R., and Alakeel, F. (2024). Advancing Phishing Email Detection: A Comparative Study of Deep Learning Models. Sensors, 24.10.3390/s24072077 ↗
50. Unsupervised Twitter Social Bot Detection Using Deep Contrastive Graph Clustering10.1016/j.knosys.2024.111690 ↗
51. Web of Things Based Social Media Fake News Classification with Feature Extraction Using Pre-Trained Convoluted Recurrent Network with Deep Fuzzy Learning10.1016/j.tcs.2022.07.031 ↗
52. AI-Generated Spam Review Detection Framework with Deep Learning Algorithms and Natural Language Processing
53. A Knowledge-Based Deep Learning Approach for Automatic Fake News Detection Using BERT on Twitter10.1016/j.procs.2024.04.178 ↗
54. Tweet Recommender Model Using Adaptive Neuro-Fuzzy Inference System10.1016/j.future.2020.04.001 ↗
55. Fuzzy Similarity Based Hierarchical Clustering for Communities in Twitter Social Networks10.1016/j.measen.2024.101033 ↗
56. Rajesh, K.P., Nallasivam, M.P., PS, S.P., Kumar, H., and Dharun, V.S. (2024, January 8–9). Detection of Fake Hotel Reviews Using ANFIS and Natural Language Processing Techniques. Proceedings of the 2024 7th International Conference on Circuit Power and Computing Technologies (ICCPCT), Kollam, India.
57. Gracia Betty, J., Harivarthini, R., Deepthi, O., Pari, R., and Maharajan, P. (2023, January 3–5). YouTube Video Spam Comment Detection Using Light Gradient Boosting Machine. Proceedings of the 2023 5th International Conference on Inventive Research in Computing Applications (ICIRCA), Coimbatore, India.10.1109/ICIRCA57980.2023.10220615 ↗
58. Gong, D., and Liu, Y. (2022, January 20–22). A Mechine Learning Approach for Botnet Detection Using LightGBM. Proceedings of the 2022 3rd International Conference on Computer Vision, Image and Deep Learning & International Conference on Computer Engineering and Applications (CVIDL & ICCEA), Changchun, China.10.1109/CVIDLICCEA56201.2022.9824033 ↗
59. Aditya, B.L., and Mohanty, S.N. (2023). Heterogenous Social Media Analysis For Efficient Deep Learning Fake-Profile Identification. IEEE Access.10.1109/ACCESS.2023.3313169 ↗
60. Classification of Instagram Fake Users Using Supervised Machine Learning Algorithms
61. Çıtlak, O., Doğru, İ.A., and Dörterler, M. (2018). Data Set Attributes Drawn in JSON Format on Twitter. ResearchGate, Available online: https://www.researchgate.net/publication/328655475_Data_set_attributes_drawn_in_JSON_format_on_Twitter.
62. Patro, S.G.K., and Sahu, K.K. (2015). Normalization: A Preprocessing Stage. arXiv.10.17148/IARJSET.2015.2305 ↗
63. (2025, July 18). Feature Selection Using Random Forest Classifier. Available online: https://www.geeksforgeeks.org/machine-learning/feature-selection-using-random-forest-classifier/.
64. Zhao, Q., Li, L., Zhang, L., and Zhao, M. (2023). Recognition of Corrosion State of Water Pipe Inner Wall Based on SMA-SVM under RF Feature Selection. Coatings, 13.10.3390/coatings13010026 ↗
65. (2025, June 27). Feature Selection Using Random Forest GeeksforGeeks. Available online: https://www.geeksforgeeks.org/machine-learning/feature-selection-using-random-forest/.
66. Gruber, P., Agner, R., and Deniz, S. (2018, January 10–13). Detection of Cavitating States (Swirls) in a Francis Test Pump-Turbine Using Ultrasonic and Transient Pressure Measurements. Proceedings of the 2018 12th International Group for Hydraulic Efficiency Measurements(IGHEM), Beijing, China.
67. Saha, S. (2021). Acoustic Assessment of Sleep Apnea and Pharyngeal Airway. [Ph.D. Thesis, University of Toronto (Canada)].
68. Random Forests10.1023/A:1010933404324 ↗
69. LightGBM: A Highly Efficient Gradient Boosting Decision Tree
70. (2025, August 26). Feature Selection Techniques in Machine Learning GeeksforGeeks. Available online: https://www.geeksforgeeks.org/machine-learning/feature-selection-techniques-in-machine-learning/.
71. Alpaydin, E. (2020). Introduction to Machine Learning, MIT Press.
72. Shahani, N.M., Zheng, X., Guo, X., and Wei, X. (2022). Machine Learning-Based Intelligent Prediction of Elastic Modulus of Rocks at Thar Coalfield. Sustainability, 14.10.3390/su14063689 ↗
73. Wang, R., Liu, Y., Ye, X., Tang, Q., Gou, J., Huang, M., and Wen, Y. (2019, January 8–10). Power System Transient Stability Assessment Based on Bayesian Optimized LightGBM. Proceedings of the 2019 IEEE 3rd Conference on Energy Internet and Energy System Integration (EI2), Changsha, China.10.1109/EI247390.2019.9062027 ↗
74. Modeling and Simulation of an Adaptive Neuro-Fuzzy Inference System (ANFIS) for Mobile Learning10.1109/TLT.2011.36 ↗
75. Development of a Path-Loss Prediction Model Using Adaptive Neuro-Fuzzy Inference System
76. ANFIS: Adaptive-Network-Based Fuzzy Inference System10.1109/21.256541 ↗
77. Deep Learning-Based Novel Ensemble Method with Best Score Transferred-Adaptive Neuro Fuzzy Inference System for Energy Consumption Prediction10.7717/peerj-cs.2680 ↗
78. RNGU-NET: A Novel Efficient Approach in Segmenting Tuberculosis Using Chest X-Ray Images10.7717/peerj-cs.1780 ↗
79. Gharaibeh, M., Almahmoud, M., Ali, M.Z., Al-Badarneh, A., El-Heis, M., Abualigah, L., Altalhi, M., Alaiad, A., and Gandomi, A.H. (2022). Early Diagnosis of Alzheimer’s Disease Using Cerebral Catheter Angiogram Neuroimaging: A Novel Model Based on Deep Learning Approaches. Big Data Cogn. Comput., 6.10.3390/bdcc6010002 ↗
80. A Spam Transformer Model for SMS Spam Detection10.1109/ACCESS.2021.3081479 ↗
81. Comparing Two SVM Models through Different Metrics Based on the Confusion Matrix10.1016/j.cor.2022.106131 ↗
82. (2025, June 21). Understanding the Confusion Matrix in Machine Learning. Available online: https://www.geeksforgeeks.org/confusion-matrix-machine-learning/.
83. Atacak, İ. (2023). An Ensemble Approach Based on Fuzzy Logic Using Machine Learning Classifiers for Android Malware Detection. Appl. Sci., 13.10.3390/app13031484 ↗
84. Jayaswal, V. (2020). Performance Metrics: Confusion Matrix, Precision, Recall, and F1 Score. Towards Data Sci.
85. A Unified Neuro-Fuzzy Framework to Assess the User Credibility on Twitter10.1080/03772063.2023.2220687 ↗
86. BERT- and CNN-Based TOBEAT Approach for Unwelcome Tweets Detection10.1007/s13278-022-00970-0 ↗
87. Airlangga, G., Bata, J., Adi Nugroho, O.I., and Lim, B.H.P. (2025). Hybrid CNN-LSTM Model with Custom Activation and Loss Functions for Predicting Fan Actuator States in Smart Greenhouses. AgriEngineering, 7.10.3390/agriengineering7040118 ↗
88. CNN-LSTM-Attention with PSO Optimization for Temperature and Fault Prediction in Meat Grinder Motors10.1007/s42452-025-07011-3 ↗
89. (2025, August 31). BERT Inference on G4 Instances Using Apache MXNet and GluonNLP: 1 Million Requests for 20 Cents | Artificial Intelligence. Available online: https://aws.amazon.com/blogs/machine-learning/bert-inference-on-g4-instances-using-apache-mxnet-and-gluonnlp-1-million-requests-for-20-cents/.
90. (2025, August 31). Performance Regression Found in TensorRT 8.6.1 When Running BERT on GPU T4 Deep Learning (Training & Inference)/TensorRT. Available online: https://forums.developer.nvidia.com/t/performance-regression-found-in-tensorrt-8-6-1-when-running-bert-on-gpu-t4/261651.
91. (2025, August 31). What Differences in Inference Speed and Memory Usage Might You Observe Between Different Sentence Transformer Architectures (for Example, BERT-Base vs DistilBERT vs RoBERTa-Based Models)?. Available online: https://milvus.io/ai-quick-reference/what-differences-in-inference-speed-and-memory-usage-might-you-observe-between-different-sentence-transformer-architectures-for-example-bertbase-vs-distilbert-vs-robertabased-models.