An LLM driven framework for email spam detection using DistilBERT embeddings and neural classifiers

Email spam detection is still a critical challenge in cybersecurity due to the increasing sophistication of malicious campaigns. Effective filtering is essential to protect users from phishing, fraud, and privacy violations. Traditional machine learning and rule-based approaches often fail to adapt to evolving spam patterns. Although deep learning models such as BERT have shown strong performance, many existing studies still rely on traditional feature extraction methods such as TF-IDF, which limits semantic understanding, or lack explanation in predictions. In this view, this paper addresses these gaps by evaluating various datasets namely Enron and SpamAssassin, and LingSpam and Phishing Email using DistilBERT and BERT embeddings to represent emails in a semantically rich feature space. Seven models such as Logistic Regression, Random Forest, Naive Bayes, Decision Tree, KNN, AdaBoost, and a Neural Network (MLP Classifier), were evaluated with hyperparameter tuning. The Neural Network with DistilBERT achieved the highest accuracies of 0.99 and 0.98, while BERT achieved 0.98 and 0.97 across both datasets. Furthermore, to improve interpretability, FLAN-T5 was incorporated to generate natural language explanations, thereby enabling transparency in model decisions. The proposed approach effectively balances accuracy and interpretability, making it suitable for real-world deployment.

Authors

Institutions

Publication Details

Journal
Discover Applied Sciences
Published
2025-12-24
DOI
https://doi.org/10.1007/s42452-025-08147-y
Citations
1
Primary Topic
Spam and Phishing Detection
Type
article
Field-Weighted Citation Impact
3.25
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

An LLM driven framework for email spam detection using DistilBERT embeddings and neural classifiers

P. S. Venugopala, S. Raghavendra, G. Pradeep Reddy, Ramyashree et al.
1 citations
Discover Applied Sciences
Spam and Phishing Detection
3.25
article

An LLM driven framework for email spam detection using DistilBERT embeddings and neural classifiers

P. S. Venugopala, S. Raghavendra, G. Pradeep Reddy, Ramyashree, Rishona Dsouza
article en
1 citations

Abstract

Email spam detection is still a critical challenge in cybersecurity due to the increasing sophistication of malicious campaigns. Effective filtering is essential to protect users from phishing, fraud, and privacy violations. Traditional machine learning and rule-based approaches often fail to adapt to evolving spam patterns. Although deep learning models such as BERT have shown strong performance, many existing studies still rely on traditional feature extraction methods such as TF-IDF, which limits semantic understanding, or lack explanation in predictions. In this view, this paper addresses these gaps by evaluating various datasets namely Enron and SpamAssassin, and LingSpam and Phishing Email using DistilBERT and BERT embeddings to represent emails in a semantically rich feature space. Seven models such as Logistic Regression, Random Forest, Naive Bayes, Decision Tree, KNN, AdaBoost, and a Neural Network (MLP Classifier), were evaluated with hyperparameter tuning. The Neural Network with DistilBERT achieved the highest accuracies of 0.99 and 0.98, while BERT achieved 0.98 and 0.97 across both datasets. Furthermore, to improve interpretability, FLAN-T5 was incorporated to generate natural language explanations, thereby enabling transparency in model decisions. The proposed approach effectively balances accuracy and interpretability, making it suitable for real-world deployment.

Discover Applied SciencesVol. 8(2)
Nitte University (IN), Manipal Academy of Higher Education (IN)
Peace, Justice and strong institutions
Openalex Percentile: Top 5%
Spam and Phishing Detection
3.25
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.

An LLM driven framework for email spam detection using DistilBERT embeddings and neural classifiers — P. S. Venugopala, S. Raghavendra, et al. · Discover Applied Sciences (2025) | TGRS Research Map | TGRS