Research Article

Spam classification based on parallel optimized BERT

Shaobo Li1, Yanyang Li2, Haoqin Xu3,*
1. Sun-Yat-Sen University
2. Dalian University of Technology
3. Nanjing University

* Corresponding author: [email protected]

Abstract

With the popularity of email and the increase in spam, effectively filtering spam has become an urgent need. This research presents a cutting-edge approach to spam filtering, leveraging the power of BERT and innovative parallel optimization techniques, improving email security. This study proposes a spam classification method based on the BERT (Bidirectional Encoder Representations from Transformers) model, aiming to improve the accuracy and efficiency of spam filtering. The study first investigated the shortcomings of traditional classification methods and then analysed the applicability of the BERT model to classifying spam. The study also performed two parallel optimizations on BERT, DDP (Distributed Data Parallel), and Gpipe. Among them, DDP was used to accelerate the large model BERT parallelly. After conducting experiments on spam classification, it was found that the average training time of an epoch was 54 seconds, with the accuracy on the test set reaching 98%, achieving significant performance improvements.

Keywords: Large Model; Parallelism; Spam Classification
Published: February 22, 2024
DOI: 10.54254/2755-2721/41/20230736
Volume: ACE Vol.41
pp. 153-159
Download PDF

References

  1. Mansoor R, Jayasinghe N D, Muslam M M A. A comprehensive review on email spam classification using machine learning algorithms[C]//2021 International Conference on Information Networking (ICOIN). IEEE, 2021: 327-332.
  2. Sarah Jane Delany, Mark Buckley, Derek Greene,SMS spam filtering: Methods and data,Expert Systems with Applications,Volume 39, Issue 10,2012,Pages 9899-9908,ISSN 0957-4174,
  3. Boyles, J.L., Rainie, L., 2012. Mobile Phone Problems. In: Pew Research Center’s Internet & American Life, Pew Research Center, pp. 2–3.
  4. Graham, P., 2002. A plan for spam. Retrieved on the 16th June 2017. Available online at http://www.paulgraham.com/spam.html.
  5. Abayomi-Alli O, Misra S, Abayomi-Alli A, et al. A review of soft techniques for SMS spam classification: Methods, approaches and applications[J]. Engineering Applications of Artificial Intelligence, 2019, 86: 197-212.
  6. Cormack G V. Email spam filtering: A systematic review[J]. Foundations and Trends® in Information Retrieval, 2008, 1(4): 335-455.
  7. Kim S E, Jo J T, Choi S H. SMS spam filterinig using keyword frequency ratio[J]. International Journal of Security and Its Applications, 2015, 9(1): 329-336.
  8. Garg P, Girdhar N. A systematic review on spam filtering techniques based on natural language processing framework[C]//2021 11th International Conference on Cloud Computing, Data Science & Engineering (Confluence). IEEE, 2021: 30-35.
  9. Crawford M, Khoshgoftaar T M, Prusa J D, et al. Survey of review spam detection using machine learning techniques[J]. Journal of Big Data, 2015, 2(1): 1-24.
  10. Huang Y , Cheng Y , Bapna A ,et al.GPipe: Efficient Training of Giant Neural Networks using Pipeline Parallelism[J].arXiv, 2018.DOI:10.48550/arXiv.1811.06965.
  11. Devlin J , Chang M W , Lee K ,et al.BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding[J]. 2018.
  12. Vaswani A, Shazeer N, Parmar N, et al. Attention is all you need[J]. Advances in neural information processing systems, 2017, 30.