File size: 3,264 Bytes
a08e656
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: apache-2.0
language:
- en
library_name: transformers
pipeline_tag: text-classification
base_model: distilroberta-base
datasets:
- aitrainingdatabroker/synthetic-document-sensitivity-tiers
tags:
- data-classification
- sensitivity
- data-governance
- text-classification
- synthetic
---

# Document Sensitivity Tier Classifier

Reads a short description of a document and suggests a sensitivity tier: `public`, `internal`, `confidential` or `restricted`.

Every name, number and sentence it was trained on is made up. Nothing comes from a real person, customer or business.

Related tool: [document-sensitivity-keyword-sorter](https://huggingface.co/spaces/aitrainingdatabroker/document-sensitivity-keyword-sorter) (a Space that runs in your browser).

## Why it exists

Before data leaves a company, someone sorts what it holds by how sensitive it is. This model gives that sort a first draft.

## Use it

```python
from transformers import pipeline

classify = pipeline("text-classification", model="aitrainingdatabroker/document-sensitivity-tier-classifier", top_k=3)
print(classify("Customer database export with emails, phone numbers and home addresses."))
```

## How it was trained

Fine-tuned from `distilroberta-base` for 6 epochs on one RTX 3070. Training data: 305 rows from [synthetic-document-sensitivity-tiers](https://huggingface.co/datasets/aitrainingdatabroker/synthetic-document-sensitivity-tiers), all invented, with test rows built from templates the model never saw in training. The scripts that built the data and trained the model are in `source/`; the full scores are in `scores.json`.

## Test scores

On 77 held-out rows: accuracy 0.831, macro F1 0.823.

| Label | F1 | Count |
|---|---|---|
| `confidential` | 0.857 | 19 |
| `internal` | 0.816 | 20 |
| `public` | 0.974 | 20 |
| `restricted` | 0.645 | 18 |

## Limits

- Trained only on invented text from templates, with test sentences built from templates it never saw. Real text varies far more.
- Tiers differ between companies and laws. A model's tier is a suggestion; the owner of the data sets the tier.
- This model is not legal advice and not a certification. A person should review its output before anything is shared or decided, and your counsel decides what a rule requires.

## Read more

- [De-identification before data is licensed](https://aitrainingdatabroker.com/de-identification/?utm_source=huggingface&utm_medium=model&utm_campaign=document-sensitivity-tier-classifier)
- [Privacy rules by region](https://aitrainingdatabroker.com/regions/?utm_source=huggingface&utm_medium=model&utm_campaign=document-sensitivity-tier-classifier)
- [Can you license SOPs and knowledge bases?](https://aitrainingdatabroker.com/data/sops-and-knowledge-bases/?utm_source=huggingface&utm_medium=model&utm_campaign=document-sensitivity-tier-classifier)

## License and credit

Apache 2.0. Please credit **AI Training Data Broker** and link to https://aitrainingdatabroker.com/ when you share or build on it.

## About

AI Training Data Broker is a broker and technical advisor for companies that sell or license their data to AI labs. It guides the technical side, including export, format, de-identification and compliance, and publishes free guides, checklists and tools.