Classifying an incoming customer message into spam versus ham

Purpose Customers often communicate with a company by sending it emails, filling out the “contact us” form on the company’s website, and posting messages on social media platforms. Unfortunately, a substantial part of these incoming customer messages can be spam. Whether an email is authentic (i.e. ham) or spam is specific to the company. Consequently, commercial spam classifiers (e.g. the one Microsoft Outlook uses) do not work well. A machine learning-based spam classifier can solve this problem. Design/methodology/approach I used a large dataset from a publicly traded retailer in the United States to test 27 TF-IDF-based and six word embedding-based binary classifiers. Findings I found that RoBERTa – a sophisticated embedding-based classifier – provided the lowest false positive rate of 5.31%. However, its rival classifier – XLNet – offered marginally superior (92%) balanced accuracy, relative to RoBERTa’s 91%. To enhance the use of the models by other organizations and academics, I offer supplemental models trained on only external datasets and a combination of internal and external datasets. Research limitations/implications The manuscript contributes by applying a broad set of existing machine learning models to solve a real problem for a real company. Practical implications I publish my code (via the journal), which other companies and researchers can use. Originality/value The manuscript is original in comparing a broad range of machine learning classifiers on real data from a real company.

Authors

Institutions

Publication Details

Journal
Marketing Intelligence & Planning
Published
2025-03-27
DOI
https://doi.org/10.1108/mip-04-2024-0252
Citations
2
Primary Topic
Spam and Phishing Detection
Type
article
Field-Weighted Citation Impact
6.49
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Classifying an incoming customer message into spam versus ham

Vivek Astvansh
2 citations
Marketing Intelligence & Planning
Spam and Phishing Detection
6.49
article

Classifying an incoming customer message into spam versus ham

Vivek Astvansh
article en
2 citations

Abstract

Purpose Customers often communicate with a company by sending it emails, filling out the “contact us” form on the company’s website, and posting messages on social media platforms. Unfortunately, a substantial part of these incoming customer messages can be spam. Whether an email is authentic (i.e. ham) or spam is specific to the company. Consequently, commercial spam classifiers (e.g. the one Microsoft Outlook uses) do not work well. A machine learning-based spam classifier can solve this problem. Design/methodology/approach I used a large dataset from a publicly traded retailer in the United States to test 27 TF-IDF-based and six word embedding-based binary classifiers. Findings I found that RoBERTa – a sophisticated embedding-based classifier – provided the lowest false positive rate of 5.31%. However, its rival classifier – XLNet – offered marginally superior (92%) balanced accuracy, relative to RoBERTa’s 91%. To enhance the use of the models by other organizations and academics, I offer supplemental models trained on only external datasets and a combination of internal and external datasets. Research limitations/implications The manuscript contributes by applying a broad set of existing machine learning models to solve a real problem for a real company. Practical implications I publish my code (via the journal), which other companies and researchers can use. Originality/value The manuscript is original in comparing a broad range of machine learning classifiers on real data from a real company.

Marketing Intelligence & PlanningVol. 43(7)
Leibniz Institute for Resilience Research (DE), Quantitative BioSciences (US), Institute of Informatics of the Slovak Academy of Sciences (SK), McGill University (CA)
Openalex Percentile: Top 4%
Spam and Phishing Detection
6.49
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.