Machine Learning-Based Email Spam and Phishing Detection on Raspberry Pi Edge Devices
DOI:
https://doi.org/10.64751/Abstract
This paper presents an edge-oriented email-security framework that combines classical machine learning, bioinspired feature optimization, contextual transformer classification, and Raspberry Pi deployment. The conventional study evaluates Naive Bayes, Support Vector Machine, Random Forest, Decision Tree, and Multi-Layer Perceptron models, while Genetic Algorithm and Particle Swarm Optimization are used to reduce irrelevant features and support resource-efficient inference. A complementary software path uses a fine-tuned DistilBERT sequence classifier to distinguish Legitimate, Spam, and Phishing emails from sender, subject, and body fields. The browser interface reports class, confidence, risk level, and an explanation. Recorded software outputs show sample-level confidence values of 99.20%, 99.02%, and 98.77% for Legitimate, Spam, and Phishing examples, respectively. The embedded path uses TFIDF with Naive Bayes for lightweight local inference and Gmail monitoring. In the recorded Raspberry Pi dashboard state, 427 messages were processed, including 369 spam and 58 safe messages. A saved validation confusion matrix contains 28 Legitimate, 48 Spam, and 24 Phishing samples on the diagonal for the compact validation split. The results establish end-toend software and edge execution while emphasizing that sample confidence and dashboard counts should not be interpreted as unrestricted real-world benchmark accuracy.
Downloads
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.






