Spam-T5: Benchmarking Large Language Models for Few-Shot Email Spam Detection

Maxime Labonne, Sean Moran
4/3/2023
43 citations
cs.CLcs.AI
benchmark-dataset

No official code found. Best implementation: jpmorganchase/llm-email-spam-detection (130 stars, Python, Apache-2.0, last commit 2023-06-26).

Abstract

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ïve Bayes and LightGBM, as baseline methods.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

LLM for Email Spam Detection

13030PythonMar 15, 20233 years agoApache-2.0
applied-innovation-of-aijpmorganchaselarge-language-modelsllmspam-detection

Similar Papers

Cite this paper

@article{labonne2023spamt,
  title  = {Spam-T5: Benchmarking Large Language Models for Few-Shot Email Spam Detection},
  author = {Maxime Labonne and Sean Moran},
  year   = {2023},
  eprint = {2304.01238},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2304.01238v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2304.01238.svg)](https://codeofpaper.com/paper/2304.01238)

Discussion