Downloads · 30 days
20
10% of all-time downloads
takumi123xxx/phishing-email-detector-deberta-v3
phishing-email-detector-deberta-v3 is a text classification model from takumi123xxx. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
フィッシングメール検出のためにファインチューニングされたDeBERTa-v3-largeモデル
Downloads · 30 days
20
10% of all-time downloads
All-time downloads
192
Public
Parameters
435M
1.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.7 GB · 100%
From the Hugging Face model README
フィッシングメール検出のためにファインチューニングされたDeBERTa-v3-largeモデル
このモデルはmicrosoft/deberta-v3-largeをベースに、フィッシングメールと安全なメールを分類するためにファインチューニングされています。
閾値を0.0007に設定することで、フィッシングメールを100%検出できます。
| Metric | Value |
|---|---|
| Accuracy | 97.59% |
| F1-score | 96.99% |
| Precision | 95.01% |
| Recall | 99.04% |
| Metric | Value |
|---|---|
| Accuracy | 95.23% |
| F1-score | 94.26% |
| Precision | 89.15% |
| Recall | 100.00% |
from transformers import pipeline
classifier = pipeline("text-classification", model="takumi123xxx/phishing-email-detector-deberta-v3")
result = classifier("Your email text here")
print(result)
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
model = AutoModelForSequenceClassification.from_pretrained("takumi123xxx/phishing-email-detector-deberta-v3")
tokenizer = AutoTokenizer.from_pretrained("takumi123xxx/phishing-email-detector-deberta-v3")
THRESHOLD = 0.0007 # For 100% Recall
def detect_phishing(text):
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
outputs = model(**inputs)
probs = torch.softmax(outputs.logits, dim=-1)
phishing_prob = probs[0][1].item()
return {
"is_phishing": phishing_prob >= THRESHOLD,
"phishing_probability": phishing_prob,
"label": "Phishing Email" if phishing_prob >= THRESHOLD else "Safe Email"
}
# Example
result = detect_phishing("Congratulations! You've won $1,000,000. Click here to claim your prize!")
print(result)
0: Safe Email1: Phishing Email| Use Case | Threshold | Recall | False Positives |
|---|---|---|---|
| Balanced | 0.5 | 99.04% | 38 |
| High Security | 0.0007 | 100.00% | 89 |
MIT License