Spam-T5: Benchmarking Large Language Models for Few-Shot Email Spam Detection
Not on the map. Why?
Abstract (arXiv)
This paper investigates the effectiveness of large language models (LLMs) in email spam detection by comparing prominent models from three distinct families: BERT-like, Sentence Transformers, and Seq2Seq. Additionally, we examine well-established machine learning techniques for spam detection, such as Na"ive Bayes and LightGBM, as baseline methods. We assess the performance of these models across four public datasets, utilizing different numbers of training samples (full training set and few-shot settings). Our findings reveal that, in the majority of cases, LLMs surpass the performance of the popular baseline techniques, particularly in few-shot scenarios. This adaptability renders LLMs uniquely suited to spam detection tasks, where labeled samples are limited in number and models require frequent updates. Additionally, we introduce Spam-T5, a Flan-T5 model that has been specifically adapted and fine-tuned for the purpose of detecting email spam. Our results demonstrate that Spam-T5 surpasses baseline models and other LLMs in the majority of scenarios, particularly when there are a limited number of training samples available. Our code is publicly available at https://github.com/jpmorganchase/emailspamdetection.
Key facts. Cited by 12 papers in the map (data through 7 Oct 2026). Builds on 18 of its 52 references that are in the map. First posted on arXiv 3 Apr 2023.
Builds on
18 of 52 references.
References · 18
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
- 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,747
- 2013Distributed Representations of Words and Phrases and their Compositionalitycited by 3,462
- 2018SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processingcited by 1,973
- 2016Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translationcited by 1,471
- 2020MPNet: Masked and Permuted Pre-training for Language Understandingcited by 973
- 2022LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scalecited by 881
6 more
- 2019Generalizing from a Few Examples: A Survey on Few-Shot Learningcited by 462
- 2019Text Classification Algorithms: A Surveycited by 163
- 2022Efficient Few-Shot Learning Without Promptscited by 135
- 2020A Survey on Text Classification: From Shallow to Deep Learningcited by 80
- 2022Universal Spam Detection using Transfer Learning of BERT Modelcited by 13
- 2022Spam Detection Using BERTcited by 6
Built on by
Citing papers per year: 2023: 1; 2024: 7; 2025: 4.
12 papers.
- 2024Large Language Models for Cyber Security: A Systematic Literature Reviewcited by 65
- 2025PrefillOnly: An Inference Engine for Prefill-only Workloads in Large Language Model Applicationscited by 21
- 2023User Modeling in the Era of Large Language Models: Current Research and Future Directionscited by 18
- 2024Next-Generation Phishing: How LLM Agents Empower Cyber Attackerscited by 14
- 2024Your Finetuned Large Language Model is Already a Powerful Out-of-distribution Detectorcited by 11
- 2024Mitigating Boundary Ambiguity and Inherent Bias for Text Classification in the Era of Large Language Modelscited by 9
- 2024Zero-Shot Spam Email Classification Using Pre-trained Large Language Modelscited by 2
- 2024Advacheck at GenAI Detection Task 1: AI Detection Powered by Domain-Aware Multi-Taskingcited by 2
- 2024POST: Email Archival, Processing and Flagging Stack for Incident Responderscited by 0
- 2025Large Language Models in Cybersecurity: Applications, Vulnerabilities, and Defense Techniquescited by 0
- 2025Ethic-BERT: An Enhanced Deep Learning Model for Ethical and Non-Ethical Content Classificationcited by 0
- 2025Beyond One-Size-Fits-All: Personalized Harmful Content Detection with In-Context Learningcited by 0
- 2025Beyond One-Size-Fits-All: Personalized Harmful Content Detection with In-Context Learning29 Oct 2025
- 2025Ethic-BERT: An Enhanced Deep Learning Model for Ethical and Non-Ethical Content Classification14 Oct 2025
- 2025Large Language Models in Cybersecurity: Applications, Vulnerabilities, and Defense Techniques18 Jul 2025
- 2025PrefillOnly: An Inference Engine for Prefill-only Workloads in Large Language Model Applications12 May 2025
- 2024Next-Generation Phishing: How LLM Agents Empower Cyber Attackers21 Nov 2024
- 2024Advacheck at GenAI Detection Task 1: AI Detection Powered by Domain-Aware Multi-Tasking18 Nov 2024
- 2024POST: Email Archival, Processing and Flagging Stack for Incident Responders1 Jul 2024
- 2024Mitigating Boundary Ambiguity and Inherent Bias for Text Classification in the Era of Large Language Models11 Jun 2024
- 2024Zero-Shot Spam Email Classification Using Pre-trained Large Language Models24 May 2024
- 2024Large Language Models for Cyber Security: A Systematic Literature Review8 May 2024
- 2024Your Finetuned Large Language Model is Already a Powerful Out-of-distribution Detector7 Apr 2024
- 2023User Modeling in the Era of Large Language Models: Current Research and Future Directions11 Dec 2023