Views
No views yet
distilbert-base-uncased model fine-tuned to classify English email
bodies as Safe (label 0) or Phishing (label 1).| Metric | Value |
|---|---|
| Accuracy | 97.34% |
| F1 (binary) | 0.9665 |
| False-positive rate | 2.91% |
| False-negative rate | 2.26% |
1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch.nn.functional as F
3import torch
4
5MODEL = "Sonje03/phishlens-distilbert"
6
7tok = AutoTokenizer.from_pretrained(MODEL)
8model = AutoModelForSequenceClassification.from_pretrained(MODEL)
9model.eval()
10
11email = "Your account has been suspended. Click here to verify..."
12inputs = tok(email, truncation=True, max_length=256, return_tensors="pt")
13with torch.no_grad():
14 probs = F.softmax(model(**inputs).logits, dim=-1)[0]
15print(f"P(Safe)={probs[0]:.3f} P(Phishing)={probs[1]:.3f}")distilbert-base-uncased (66M params)| Source | Role | Count |
|---|---|---|
| zefang-liu/phishing-email-dataset (MeAJOR Corpus) | Baseline text training | 18,650 |
| AreLit/PhishNChips | Modern workplace legits (augmentation) | 1,333 |
| cybersectony/PhishingEmailDetectionv2.0 | Augmentation legits | 11,322 |
synthetic_legit_emails.csv | NG-domain hand-templated | 150 |
text/plain and text/html
parts of an .eml are read.1@misc{phishlens2026,
2 title = {Smart Phishing Detection System Using Natural Language Processing Techniques},
3 year = {2026},
4 school = {Nile University of Nigeria, Department of Cybersecurity},
5 note = {B.Sc. Final Year Project}
6}