CoolFace
Modelpublic

TestingCapstone/phishing-email-detector-capstone

sourceHugging Faceapache-2.0updated 11mo agoView on Hugging Face
0likes2downloads
Model Card

🧠 Phishing Detection Model (BERT-Large-Uncased)

A transformer-based model fine-tuned to detect phishing content across multiple formats β€” including emails, URLs, SMS messages, and scripts. Built on BERT-Large-Uncased, it leverages deep contextual understanding of language to classify text as phishing or benign with high accuracy.


πŸ“Œ Model Details

Base model: bert-large-uncased Architecture: 24 layers β€’ 1024 hidden size β€’ 16 attention heads β€’ ~336M parameters License: Apache 2.0 Language: English Pipeline tag: text-classification


🧩 Model Description

This model was trained to identify phishing-related content by analyzing linguistic and structural patterns commonly found in malicious communications. By leveraging BERT’s bidirectional transformer architecture, it effectively detects phishing attempts even when the message appears legitimate or well-written.

Key Features

  • β€”Detects phishing attempts in text, emails, URLs, and scripts
  • β€”Useful for cybersecurity applications, such as email gateways or web filtering systems
  • β€”Capable of identifying varied phishing tactics (impersonation, link manipulation, credential harvesting, etc.)

🎯 Intended Uses

Recommended use cases:

  • β€”Classify messages, emails, and URLs as phishing or benign
  • β€”Integrate into automated security pipelines, email filtering tools, or chat moderation systems
  • β€”Aid in phishing research or awareness programs

Limitations:

  • β€”May trigger false positives on legitimate content with financial or urgent language
  • β€”Optimized for English text only
  • β€”Should be part of a multi-layered defense strategy, not a standalone cybersecurity control

πŸ“Š Evaluation Results

MetricScore
Loss0.1953
Accuracy0.9717
Precision0.9658
Recall0.9670
False Positive Rate0.0249

βš™οΈ Training Details

Hyperparameters

ParameterValue
Learning rate2e-05
Train batch size16
Eval batch size16
Seed42
OptimizerAdam (β₁=0.9, Ξ²β‚‚=0.999, Ξ΅=1e-08)
LR schedulerLinear
Epochs4

Training Results

Training LossEpochStepValidation LossAccuracyPrecisionRecallFalse Positive Rate
0.14871.038660.14540.95960.97090.93200.0203
0.08052.077320.13890.96910.96630.96010.0243
0.03893.0115980.17790.96830.97780.94610.0156
0.00914.0154640.19530.97170.96580.96700.0249

🧠 Example Inference

Try the model in Python using the transformers library:

python
from transformers import pipeline
# Load the phishing detection model
classifier = pipeline("text-classification", model="your-username/phishing-email-detector-capstone")
# Example texts
examples = [
    "Dear colleague, your email storage is full. Click here to verify your account: https://secure-update-login.com",
    "Hi team, the meeting starts at 2 PM today.",
    "You have won a free gift card! Claim now at http://bit.ly/3xYzabc"
]
# Run inference
for text in examples:
    result = classifier(text)[0]
    print(f"Text: {text}\nPrediction: {result['label']} (score: {result['score']:.4f})\n")