Sumeetgpt's picture
Upload folder using huggingface_hub
ce863d7 verified
|
Raw
History Blame Contribute Delete
2.18 kB
---
language: en
license: apache-2.0
tags:
- setfit
- sentence-transformers
- dlp
- data-loss-prevention
- pii
- security
- spidercob
base_model: sentence-transformers/all-MiniLM-L6-v2
metrics:
- accuracy
model-index:
- name: dlp-intent-classifier
results:
- task:
type: text-classification
metrics:
- type: accuracy
value: 0.9425
---
# DLP Intent Classifier
Fine-tuned [SetFit](https://github.com/huggingface/setfit) model for Data Loss Prevention intent classification. Part of the [Spidercob](https://spidercob.com) DLP platform.
## Model Description
This model classifies text snippets that triggered DLP regex patterns into one of four categories to reduce false positives:
| Label | Description |
|---|---|
| `REAL_DATA` | Genuine sensitive data (PII, credentials, secrets) |
| `TEST_DATA` | Synthetic/mock data used in tests or examples |
| `DOCUMENTATION` | Documentation examples, tutorials, placeholder values |
| `NOISE` | Random strings, hashes, or non-sensitive matches |
**Base model:** `sentence-transformers/all-MiniLM-L6-v2`
**Framework:** SetFit (few-shot fine-tuning)
**Test accuracy:** 94.25%
## Usage
```python
from setfit import SetFitModel
model = SetFitModel.from_pretrained("Sumeetgpt/dlp-intent-classifier")
predictions = model.predict(["sk-proj-abc123XYZ", "test_api_key_placeholder"])
print(predictions) # ['REAL_DATA', 'TEST_DATA']
```
## Intended Use
Used inside the Spidercob DLP engine to verify whether regex-matched findings are genuinely sensitive before blocking or alerting. Blocks on `REAL_DATA` confidence > 0.7; allows through on `TEST_DATA` confidence > 0.8.
## Training Data
Trained on curated examples spanning:
- Real PII samples (anonymized): emails, SSNs, credit cards, API keys, passwords
- Synthetic test data from `faker`, `factory_boy`, pytest fixtures
- Documentation examples from popular libraries
- Noise patterns (random strings, base64, UUIDs)
## Limitations
- Optimized for English text
- Best performance on short text snippets (< 512 tokens)
- Not a replacement for regex-based pattern matching — meant as a downstream filter