Token Classification
Transformers
Safetensors
English
bert
named-entity-recognition
de-identification
anonymisation
cybersecurity
cyber-incident-reports
Instructions to use GVIS-ULE/rubiner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GVIS-ULE/rubiner with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="GVIS-ULE/rubiner")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("GVIS-ULE/rubiner") model = AutoModelForTokenClassification.from_pretrained("GVIS-ULE/rubiner", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
library_name: transformers
|
| 6 |
+
pipeline_tag: token-classification
|
| 7 |
+
base_model: dslim/bert-base-NER
|
| 8 |
+
tags:
|
| 9 |
+
- named-entity-recognition
|
| 10 |
+
- de-identification
|
| 11 |
+
- anonymisation
|
| 12 |
+
- cybersecurity
|
| 13 |
+
- cyber-incident-reports
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# RubiNER: general NER component
|
| 17 |
+
|
| 18 |
+
This is the general-purpose named entity recognition component of **RubiNER**,
|
| 19 |
+
the ensemble NER model behind the text anonymisation service of the EOSC SIESTA
|
| 20 |
+
project (Use Case 4). It is `dslim/bert-base-NER` fine-tuned on synthetic
|
| 21 |
+
cyber incident reports, so that it tags both personal data and cybersecurity
|
| 22 |
+
entities with the entity types the SIESTA service uses.
|
| 23 |
+
|
| 24 |
+
On its own, this model is **not** RubiNER. In RubiNER it runs alongside a
|
| 25 |
+
cybersecurity NER model, pattern recognisers, zero-shot custom entity types and
|
| 26 |
+
a date/time recogniser, and their outputs are merged. See
|
| 27 |
+
*EOSC SIESTA Deliverable 19.4: Anonymising Cyber Incident Reports* for the full
|
| 28 |
+
design and evaluation.
|
| 29 |
+
|
| 30 |
+
## Labels
|
| 31 |
+
|
| 32 |
+
25 entity types in BIO format (51 labels):
|
| 33 |
+
|
| 34 |
+
`PER`, `ORG`, `LOC`, `DATE`, `TIME`, `JOB_TITLE`, `AGE`, `NATIONALITY`,
|
| 35 |
+
`USERNAME`, `PASSWORD`, `IDENTIFICATION_NUMBER`, `BANK_OR_CARD_NUMBER`,
|
| 36 |
+
`PHONE_NUMBER`, `EMAIL`, `MEDICAL_CONDITION`, `QUANTITY`, `AMOUNT_OF_MONEY`,
|
| 37 |
+
`IP`, `URL`, `FILE`, `HASH`, `SOFTWARE`, `OPERATING_SYSTEM`, `MALWARE`, `CVE`
|
| 38 |
+
|
| 39 |
+
## Training
|
| 40 |
+
|
| 41 |
+
| | |
|
| 42 |
+
|---|---|
|
| 43 |
+
| Base model | `dslim/bert-base-NER` |
|
| 44 |
+
| Training data | 663 annotated reports from 37 seed incidents of S-CECILIA-Gold |
|
| 45 |
+
| Validation | 64 reports from 4 further seed incidents (used to choose the epoch) |
|
| 46 |
+
| Held out | All reports from 15 seed incidents, never used for training or tuning |
|
| 47 |
+
| Epochs | 8 (best: epoch 6, by validation loss) |
|
| 48 |
+
| Optimiser | AdamW, learning rate 5e-5, weight decay 0.01, 10% linear warm-up |
|
| 49 |
+
| Batch size | 16 |
|
| 50 |
+
| Long reports | Split into 512-token windows with a 128-token stride |
|
| 51 |
+
|
| 52 |
+
S-CECILIA's annotation types were mapped to the SIESTA entity types as listed
|
| 53 |
+
in Appendix 1 of D19.4. Three types with no SIESTA equivalent (MAC addresses,
|
| 54 |
+
system identifiers, event information) were left unlabelled.
|
| 55 |
+
|
| 56 |
+
S-CECILIA is a synthetic dataset: its personal data is generated, not taken
|
| 57 |
+
from real people. The dataset is currently under review and will be released
|
| 58 |
+
once it is accepted.
|
| 59 |
+
|
| 60 |
+
## Usage
|
| 61 |
+
|
| 62 |
+
```python
|
| 63 |
+
from transformers import pipeline
|
| 64 |
+
|
| 65 |
+
ner = pipeline("token-classification", model="GVIS-ULE/rubiner",
|
| 66 |
+
aggregation_strategy="simple", stride=128)
|
| 67 |
+
ner("On 3 March, Jane Doe reported that 10.0.0.5 was contacting evil.example.com.")
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
Within RubiNER, predictions below a confidence of 0.65 are discarded, as are
|
| 71 |
+
spans of one or two characters.
|
| 72 |
+
|
| 73 |
+
## Limitations
|
| 74 |
+
|
| 75 |
+
- English only.
|
| 76 |
+
- Trained on synthetic incident reports; performance on other kinds of text may
|
| 77 |
+
be lower.
|
| 78 |
+
- Like other NER models, it may detect some names (for example by origin or
|
| 79 |
+
gender) less reliably than others.
|
| 80 |
+
- Run it as part of RubiNER, not on its own, if the goal is de-identification.
|
| 81 |
+
|
| 82 |
+
## Citation
|
| 83 |
+
|
| 84 |
+
*Anonymising Cyber Incident Reports: Text Anonymisation Tool Evaluation*,
|
| 85 |
+
EOSC SIESTA Deliverable D19.4, 2026.
|