Evaluation of Transformer-Based Large Language Models for Email Spam Detection Using BERT, Phi, and Gemma
Keywords:
Large Language Models, Spam Detection, Fine-Tuning, Binary Classification, Cybersecurity
Abstract
In this paper, we study how LLMs based on the transformer architecture work and the possibility of adjusting these models to use only the body of email messages to classify them as spam or ham. The models studied are BERT, Gemma, and Phi. All of them underwent quantization stages, fine-tuning with a real dataset, and evaluation with metrics commonly used in binary classification problems. The Gemma model achieves over 99% accuracy in detecting spam, standing out as the best among the compared models.
Published
2024-12-26
How to Cite
C. Grassmann, A. C., C. Feitosa, J., F. Brega, J. R., & A. P. da Costa, K. (2024). Evaluation of Transformer-Based Large Language Models for Email Spam Detection Using BERT, Phi, and Gemma. Statistics, Optimization & Information Computing, 13(2), 459-473. https://doi.org/10.19139/soic-2310-5070-2267
Issue
Section
Research Articles
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).