Downloads · 30 days
3
3% of all-time downloads
sourav-paramanya/bert-base-bank-mail-fraud-detector
bert-base-bank-mail-fraud-detector is a text classification model from sourav-paramanya. Use it when you need a label for a piece of text. The card lists the license as mit.
This model is a fine-tuned version of bert-base-uncased optimized specifically for identifying binary classification boundaries between legitimate business communication and malicious phishing/fraudulent email templates.
Downloads · 30 days
3
3% of all-time downloads
All-time downloads
96
Public
Parameters
109M
1.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of bert-base-uncased optimized specifically for identifying binary classification boundaries between legitimate business communication and malicious phishing/fraudulent email templates.
Developed as a highly resilient baseline security layer, this model successfully resolves typical representation convergence bugs (NaN log updates) found in larger architectures by utilizing strict token length packing bounds and zero-division safeguards during training evaluation.
The model achieved the following performance metrics on the validation dataset split ($20%$ isolated test pool) during its multi-epoch convergence sequence:
| Metric | Final Score |
|---|---|
| Accuracy | 99.22% |
| F1-Score | 99.25% |
| Precision | 99.77% |
| Recall | 98.73% |
| Final Training Loss | 0.0408 |
The architecture was trained using automated multi-CSV pipelines derived from the consolidated phishing email data streams. The configuration features:
To deploy this model downstream within your automated agentic or security response routing pipelines, you can load the fine-tuned parameters directly using the Hugging Face transformers framework:
import torch
import numpy as np
from transformers import AutoTokenizer, AutoModelForSequenceClassification
model_id = "sourav-paramanya/bert-base-bank-mail-fraud-detector"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
def scan_incoming_email(email_text):
inputs = tokenizer(email_text, return_tensors="pt", padding=True, truncation=True, max_length=512)
with torch.no_grad():
outputs = model(**inputs)
logits = outputs.logits
probabilities = torch.softmax(logits, dim=1).numpy()[0]
predicted_class = np.argmax(probabilities)
labels_map = {0: "Legitimate (Safe) ✅", 1: "FRAUD / PHISHING DETECTED 🚨"}
print(f"Analysis Verdict : {labels_map[predicted_class]}")
print(f"Confidence Matrix: Safe -> {probabilities[0]:.2%}, Fraud -> {probabilities[1]:.2%}")
# Live test scenario
scan_incoming_email("URGENT: Your online business portal access is frozen. Click here to confirm identity immediate.")