Detecting spam tweets using machine learning and effective preprocessing

Kardaş B., Bayar I. E., Özyer T., Alhajj R.

13th IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining, ASONAM 2021, Virtual, Online, Netherlands, 08 November 2021, pp.393-398 identifier

  • Publication Type: Conference Paper / Full Text
  • Doi Number: 10.1145/3487351.3490968
  • City: Virtual, Online
  • Country: Netherlands
  • Page Numbers: pp.393-398
  • Keywords: machine learning, preprocessing, social media, spam detection, Twitter
  • Istanbul Medipol University Affiliated: Yes


Nowadays, with the rapid increase in popularity of online social networks (OSNs), these platforms are realized as ideal places for spammers. Unfortunately, these spammers can easily publish malicious content, advertise phishing scams by taking advantage of OSNs. Therefore, effective identification and filtering of spam tweets will be beneficial to both OSNs and users. However, it is becoming increasingly difficult to check and eliminate spam tweets due to this great flow of posts. Motivated by these observations, in this paper we propose an approach for the detection of spam tweets using machine learning and effective preprocessing techniques. The approach proposes the advantages of the preprocessing and which of these preprocessing techniques are the most effective. To compare these techniques UtkML Twitter spam dataset is used in testing. After the most effective methods determined, the detection accuracy of the spam tweets will be better optimized by combining them. We have evaluated our solution with four different machine learning algorithms namely - Naïve Bayes Classifier, Neural Network, Logistic Regression and Support Vector Machine. With SVM Classifier, we are able to achieve an accuracy of 93.02%. Experimental results show that our approach can improve the performance of spam tweet classification effectively.