Safetensors
English
distilbert
phishing_url
File size: 3,035 Bytes
6a88f66
aeb7429
 
6a88f66
 
 
 
 
 
 
 
 
d796204
 
 
 
 
 
 
 
 
 
 
 
 
 
aeb7429
b7b3fc8
2a57b46
 
 
 
 
 
 
 
 
b7b3fc8
026acc2
 
 
 
 
29a038d
 
 
b7b3fc8
 
 
 
 
 
 
 
a5ee679
b7b3fc8
 
 
a5ee679
b7b3fc8
 
 
 
 
 
a5ee679
 
b7b3fc8
 
 
 
 
 
 
 
6a88f66
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
license: apache-2.0
datasets:
- Adnan-AI-Labs/CleanedBalancedPhishingUrls
language:
- en
base_model:
- distilbert/distilbert-base-uncased
tags:
- phishing_url
---

# Model Card for DistilBERT-PhishGuard

## Model Overview
**URLShield-DistilBERT** is a phishing URL detection model based on DistilBERT, fine-tuned specifically for the task of identifying whether a URL is safe or phishing. This model is designed for real-time applications in web and email security, helping users identify malicious links.



## Intended Use
- **Use Cases**: URL classification for phishing detection in emails, websites, and chat applications.
- **Limitations**: This model may have reduced accuracy with non-English URLs or heavily obfuscated links.
- **Intended Users**: Security researchers, application developers, and cybersecurity engineers.



# Model Card for DistilBERT-PhishGuard

πŸ” What Sets PhishGuard Apart?
High Accuracy πŸ“ˆ – Achieved up to 99.6% accuracy and 0.997 AUC on validation datasets.
Optimized for Speed πŸš€ – Leveraging a distilled transformer model for faster predictions without compromising accuracy.
Real-World Data 🌐 – Trained and evaluated on diverse phishing and safe URLs, ensuring robust performance across domains.
πŸ“Š Performance Metrics (Averaged Across Epochs)
Accuracy: 99.6%
AUC (Area Under Curve): 0.997
Training Loss: 0.054
Validation Loss: 0.047

Markdown
## Support the Project

If you find this project useful, consider buying me a coffee to support further development! β˜•οΈ

<a href="https://buymeacoffee.com/adnanailabs">
  <img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me a Coffee">
</a>

## Usage
This model can be loaded and used with Hugging Face's `transformers` library:

```python
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

#Load the model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("your-username/DistilBERT-PhishGuard")
model = AutoModelForSequenceClassification.from_pretrained("your-username/DistilBERT-PhishGuard")

#Sample URL for classification
url = "http://example.com"
inputs = tokenizer(url, return_tensors="pt", truncation=True, max_length=256)
outputs = model(**inputs)
predictions = torch.argmax(outputs.logits, dim=-1)
print("Prediction:", "Phishing" if predictions.item() == 1 else "Safe")

```

## Performance
The model achieves high accuracy across different chunks of training data, with performance metrics above 98% accuracy and an AUC close to or at 1.00 in later stages. This indicates robust and reliable phishing detection across varied datasets.

## Limitations and Biases
The model's performance may degrade on URLs containing obfuscated or novel phishing techniques.
It may be less effective on non-English URLs and may need further fine-tuning for different languages or domain-specific URLs.

### Contact and Support
For questions, improvements, or support, please contact us through the Hugging Face community or open an issue in the model repository.