Text Classification
Transformers
Safetensors
English
roberta
security
vulnerability
cve
mitre-attack
cti
multi-label-classification
Generated from Trainer
Eval Results (legacy)
text-embeddings-inference
Instructions to use CIRCL/vulnerability-attack-technique-classification-roberta-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CIRCL/vulnerability-attack-technique-classification-roberta-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="CIRCL/vulnerability-attack-technique-classification-roberta-base")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("CIRCL/vulnerability-attack-technique-classification-roberta-base") model = AutoModelForSequenceClassification.from_pretrained("CIRCL/vulnerability-attack-technique-classification-roberta-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Rewrite model card: usage, intended use, data, protocol, artifacts
Browse files
README.md
CHANGED
|
@@ -2,42 +2,185 @@
|
|
| 2 |
library_name: transformers
|
| 3 |
license: cc-by-4.0
|
| 4 |
base_model: roberta-base
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
- generated_from_trainer
|
| 7 |
model-index:
|
| 8 |
- name: vulnerability-attack-technique-classification-roberta-base
|
| 9 |
-
results:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
-
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 13 |
-
should probably proofread and complete it, then remove this comment. -->
|
| 14 |
-
|
| 15 |
# vulnerability-attack-technique-classification-roberta-base
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
-
|
| 20 |
-
|
| 21 |
-
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
-
|
| 28 |
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
## Intended uses & limitations
|
| 32 |
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
## Training and evaluation data
|
| 36 |
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
## Training procedure
|
| 40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
### Training hyperparameters
|
| 42 |
|
| 43 |
The following hyperparameters were used during training:
|
|
@@ -48,6 +191,9 @@ The following hyperparameters were used during training:
|
|
| 48 |
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 49 |
- lr_scheduler_type: linear
|
| 50 |
- num_epochs: 40
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
### Training results
|
| 53 |
|
|
@@ -94,10 +240,37 @@ The following hyperparameters were used during training:
|
|
| 94 |
| 0.4570 | 39.0 | 1209 | 0.6206 | 0.4350 | 0.1932 | 0.3326 | 0.6287 | 0.5281 | 0.6910 |
|
| 95 |
| 0.4436 | 40.0 | 1240 | 0.6199 | 0.4325 | 0.1916 | 0.3296 | 0.6287 | 0.5329 | 0.6882 |
|
| 96 |
|
| 97 |
-
|
| 98 |
### Framework versions
|
| 99 |
|
| 100 |
- Transformers 5.13.0
|
| 101 |
- Pytorch 2.12.1+cu130
|
| 102 |
- Datasets 4.8.5
|
| 103 |
- Tokenizers 0.22.2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
license: cc-by-4.0
|
| 4 |
base_model: roberta-base
|
| 5 |
+
pipeline_tag: text-classification
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
datasets:
|
| 9 |
+
- CIRCL/vulnerability-attack-techniques
|
| 10 |
tags:
|
| 11 |
+
- security
|
| 12 |
+
- vulnerability
|
| 13 |
+
- cve
|
| 14 |
+
- mitre-attack
|
| 15 |
+
- cti
|
| 16 |
+
- multi-label-classification
|
| 17 |
- generated_from_trainer
|
| 18 |
model-index:
|
| 19 |
- name: vulnerability-attack-technique-classification-roberta-base
|
| 20 |
+
results:
|
| 21 |
+
- task:
|
| 22 |
+
type: text-classification
|
| 23 |
+
name: Multi-label MITRE ATT&CK technique classification
|
| 24 |
+
dataset:
|
| 25 |
+
name: CIRCL/vulnerability-attack-techniques
|
| 26 |
+
type: CIRCL/vulnerability-attack-techniques
|
| 27 |
+
split: test
|
| 28 |
+
metrics:
|
| 29 |
+
- type: recall
|
| 30 |
+
name: Recall@5
|
| 31 |
+
value: 0.6440
|
| 32 |
+
- type: recall
|
| 33 |
+
name: Recall@3
|
| 34 |
+
value: 0.5181
|
| 35 |
+
- type: f1
|
| 36 |
+
name: F1 micro
|
| 37 |
+
value: 0.3899
|
| 38 |
+
- type: f1
|
| 39 |
+
name: F1 macro
|
| 40 |
+
value: 0.1910
|
| 41 |
---
|
| 42 |
|
|
|
|
|
|
|
|
|
|
| 43 |
# vulnerability-attack-technique-classification-roberta-base
|
| 44 |
|
| 45 |
+
Suggests [MITRE ATT&CK](https://attack.mitre.org/) (Enterprise) techniques
|
| 46 |
+
from a free-text vulnerability description. This is a multi-label classifier
|
| 47 |
+
([roberta-base](https://huggingface.co/roberta-base) with a sigmoid head, one
|
| 48 |
+
output per technique) fine-tuned on
|
| 49 |
+
[CIRCL/vulnerability-attack-techniques](https://huggingface.co/datasets/CIRCL/vulnerability-attack-techniques),
|
| 50 |
+
a gold dataset of 1,207 CVEs whose labels come from expert
|
| 51 |
+
[MITRE CTID](https://ctid.mitre.org/) mappings. Given a CVE description it
|
| 52 |
+
scores 53 parent techniques (e.g. T1190 *Exploit Public-Facing Application*,
|
| 53 |
+
T1505 *Server Software Component*), for use as a ranked list of candidate
|
| 54 |
+
techniques for analyst review.
|
| 55 |
+
|
| 56 |
+
The model is trained with [VulnTrain](https://github.com/vulnerability-lookup/VulnTrain)
|
| 57 |
+
and runs in production on the public [Vulnerability-Lookup](https://vulnerability.circl.lu)
|
| 58 |
+
instance operated by CIRCL, served locally by
|
| 59 |
+
[ML-Gateway](https://github.com/vulnerability-lookup/ML-Gateway): every
|
| 60 |
+
vulnerability page has an ATT&CK tab with the model's suggestions (example:
|
| 61 |
+
[CVE-2021-44077](https://vulnerability.circl.lu/vuln/CVE-2021-44077#attack)).
|
| 62 |
+
|
| 63 |
+
The methodology, evaluation protocol, and the negative result on
|
| 64 |
+
LLM-assisted label expansion are described in the paper
|
| 65 |
+
[*Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and
|
| 66 |
+
the Limits of LLM-Assisted Label Expansion*](https://github.com/vulnerability-lookup/cve-attack-mapping-paper).
|
| 67 |
+
|
| 68 |
+
DOI: [10.57967/hf/9623](https://doi.org/10.57967/hf/9623)
|
| 69 |
+
|
| 70 |
+
## How to use
|
| 71 |
+
|
| 72 |
+
With VulnTrain, against a live CVE:
|
| 73 |
+
|
| 74 |
+
```bash
|
| 75 |
+
vulntrain-infer-attack-classification --cve CVE-2021-44077 \
|
| 76 |
+
--model CIRCL/vulnerability-attack-technique-classification-roberta-base
|
| 77 |
+
```
|
| 78 |
|
| 79 |
+
With plain Transformers:
|
| 80 |
|
| 81 |
+
```python
|
| 82 |
+
import torch
|
| 83 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 84 |
+
|
| 85 |
+
model_id = "CIRCL/vulnerability-attack-technique-classification-roberta-base"
|
| 86 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 87 |
+
model = AutoModelForSequenceClassification.from_pretrained(model_id)
|
| 88 |
+
model.eval()
|
| 89 |
+
|
| 90 |
+
description = (
|
| 91 |
+
"Zoho ManageEngine ServiceDesk Plus before 11306, ServiceDesk Plus MSP "
|
| 92 |
+
"before 10530, and SupportCenter Plus before 11014 are vulnerable to "
|
| 93 |
+
"unauthenticated remote code execution."
|
| 94 |
+
)
|
| 95 |
+
inputs = tokenizer(description, truncation=True, max_length=512, return_tensors="pt")
|
| 96 |
+
with torch.no_grad():
|
| 97 |
+
probs = torch.sigmoid(model(**inputs).logits)[0]
|
| 98 |
+
|
| 99 |
+
for i in probs.argsort(descending=True)[:5]:
|
| 100 |
+
print(f"{model.config.id2label[int(i)]} {probs[i]:.4f}")
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
Technique IDs map to names via the
|
| 104 |
+
[ATT&CK Enterprise matrix](https://attack.mitre.org/techniques/enterprise/);
|
| 105 |
+
`sigmoid >= 0.5` is the prediction threshold used in evaluation, but the
|
| 106 |
+
model is most useful as a ranker (see the recall@k numbers below).
|
| 107 |
|
| 108 |
## Intended uses & limitations
|
| 109 |
|
| 110 |
+
**Intended**: triage assistance — given a vulnerability description, surface
|
| 111 |
+
a short ranked list of candidate ATT&CK techniques for a human analyst to
|
| 112 |
+
confirm or reject. This is how it is deployed in Vulnerability-Lookup, where
|
| 113 |
+
the UI explicitly flags the output as unverified AI-generated suggestions.
|
| 114 |
+
|
| 115 |
+
**Limitations**:
|
| 116 |
+
|
| 117 |
+
- The label space is the 53 parent techniques with at least 5 training
|
| 118 |
+
examples; sub-techniques are collapsed to their parent, and techniques
|
| 119 |
+
outside this vocabulary can never be suggested.
|
| 120 |
+
- The gold set skews toward exploited-in-the-wild CVEs (CTID's corpus and
|
| 121 |
+
the KEV catalog), so coverage is best for the techniques common there.
|
| 122 |
+
- Trained on 972 CVEs — deliberately label-quality-bound rather than
|
| 123 |
+
data-bound (see the paper's gold-size scaling curve: every metric still
|
| 124 |
+
improves monotonically with more curated rows).
|
| 125 |
+
- English descriptions only; input is truncated at 512 tokens.
|
| 126 |
+
- Scores are not calibrated probabilities.
|
| 127 |
+
- Suggestions are **not** verified mappings; treat them as guidance, never
|
| 128 |
+
as authoritative CTI.
|
| 129 |
|
| 130 |
## Training and evaluation data
|
| 131 |
|
| 132 |
+
Labels come from the two public expert sources of CVE→ATT&CK mappings, both
|
| 133 |
+
following the CTID [*Mapping ATT&CK to CVE for
|
| 134 |
+
Impact*](https://ctid.mitre.org/projects/mapping-attck-to-cve-for-impact)
|
| 135 |
+
methodology: the CTID `attack_to_cve` mappings and the CTID Mappings
|
| 136 |
+
Explorer KEV mappings (ATT&CK 16.1). Technique IDs revoked since publication
|
| 137 |
+
are remapped to their successors via the ATT&CK STIX `revoked-by`
|
| 138 |
+
relationships. Descriptions are joined from
|
| 139 |
+
[CIRCL/vulnerability-scores](https://huggingface.co/datasets/CIRCL/vulnerability-scores)
|
| 140 |
+
(Vulnerability-Lookup). Full details in the
|
| 141 |
+
[dataset card](https://huggingface.co/datasets/CIRCL/vulnerability-attack-techniques)
|
| 142 |
+
and the [VulnTrain documentation](https://github.com/vulnerability-lookup/VulnTrain/blob/main/docs/attack-techniques-dataset.md).
|
| 143 |
+
|
| 144 |
+
Splits: 972 train / 106 validation / 118 test examples. **Checkpoint
|
| 145 |
+
selection uses the validation split; the test split is touched once, for the
|
| 146 |
+
numbers reported here.** The paper documents why this matters: selecting the
|
| 147 |
+
best checkpoint on the test split inflates and destabilizes small-test-split
|
| 148 |
+
metrics enough to produce spurious conclusions.
|
| 149 |
+
|
| 150 |
+
Notably, this model was **not** trained on LLM-generated labels: the paper's
|
| 151 |
+
controlled experiments show that folding in LLM-labeled CVEs at ≈0.39
|
| 152 |
+
agreement with the experts yields no reliable ranking improvement and
|
| 153 |
+
measurably degrades rare-technique coverage at scale (the comparison
|
| 154 |
+
checkpoint is published as
|
| 155 |
+
[...-llm-expanded](https://huggingface.co/CIRCL/vulnerability-attack-technique-classification-roberta-base-llm-expanded)).
|
| 156 |
+
|
| 157 |
+
## Evaluation
|
| 158 |
+
|
| 159 |
+
Held-out test split, this checkpoint (seed 42):
|
| 160 |
+
|
| 161 |
+
| Metric | Value |
|
| 162 |
+
|--------|-------|
|
| 163 |
+
| Recall@5 | 0.6440 |
|
| 164 |
+
| Recall@3 | 0.5181 |
|
| 165 |
+
| F1 micro | 0.3899 |
|
| 166 |
+
| F1 macro | 0.1910 |
|
| 167 |
+
| Precision micro | 0.2740 |
|
| 168 |
+
| Recall micro | 0.6756 |
|
| 169 |
+
|
| 170 |
+
Recall@5 = 0.64 means that on average 64% of an unseen CVE's expert-assigned
|
| 171 |
+
techniques appear in the model's top five suggestions — roughly double the
|
| 172 |
+
zero-shot embedding-similarity baseline reported in the paper. Across five
|
| 173 |
+
seeds under the identical protocol, the numbers of record are recall@5
|
| 174 |
+
0.673 ± 0.019, recall@3 0.536 ± 0.032, micro-F1 0.410 ± 0.006, macro-F1
|
| 175 |
+
0.177 ± 0.014. The complete trainer logs are published in the
|
| 176 |
+
[paper repository](https://github.com/vulnerability-lookup/cve-attack-mapping-paper/tree/main/trainer-logs).
|
| 177 |
|
| 178 |
## Training procedure
|
| 179 |
|
| 180 |
+
Binary cross-entropy over 53 sigmoid outputs, with per-label `pos_weight`
|
| 181 |
+
balancing (capped at 20) to keep rare techniques trainable. Trained with
|
| 182 |
+
`vulntrain-train-attack-classification` (VulnTrain).
|
| 183 |
+
|
| 184 |
### Training hyperparameters
|
| 185 |
|
| 186 |
The following hyperparameters were used during training:
|
|
|
|
| 191 |
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 192 |
- lr_scheduler_type: linear
|
| 193 |
- num_epochs: 40
|
| 194 |
+
- max_length: 512
|
| 195 |
+
- loss: BCEWithLogitsLoss, balanced pos_weight (min 2.447, max 20.0)
|
| 196 |
+
- checkpoint selection: best macro-F1 on the validation split
|
| 197 |
|
| 198 |
### Training results
|
| 199 |
|
|
|
|
| 240 |
| 0.4570 | 39.0 | 1209 | 0.6206 | 0.4350 | 0.1932 | 0.3326 | 0.6287 | 0.5281 | 0.6910 |
|
| 241 |
| 0.4436 | 40.0 | 1240 | 0.6199 | 0.4325 | 0.1916 | 0.3296 | 0.6287 | 0.5329 | 0.6882 |
|
| 242 |
|
|
|
|
| 243 |
### Framework versions
|
| 244 |
|
| 245 |
- Transformers 5.13.0
|
| 246 |
- Pytorch 2.12.1+cu130
|
| 247 |
- Datasets 4.8.5
|
| 248 |
- Tokenizers 0.22.2
|
| 249 |
+
|
| 250 |
+
## Related artifacts
|
| 251 |
+
|
| 252 |
+
| Artifact | Location | DOI |
|
| 253 |
+
|----------|----------|-----|
|
| 254 |
+
| Gold dataset (1,207 CVEs, CTID-curated labels) | [CIRCL/vulnerability-attack-techniques](https://huggingface.co/datasets/CIRCL/vulnerability-attack-techniques) | [10.57967/hf/9621](https://doi.org/10.57967/hf/9621) |
|
| 255 |
+
| LLM expansion dataset (negative result) | [CIRCL/vulnerability-attack-techniques-llm-scaling](https://huggingface.co/datasets/CIRCL/vulnerability-attack-techniques-llm-scaling) | [10.57967/hf/9622](https://doi.org/10.57967/hf/9622) |
|
| 256 |
+
| LLM-expanded comparison model | [CIRCL/vulnerability-attack-technique-classification-roberta-base-llm-expanded](https://huggingface.co/CIRCL/vulnerability-attack-technique-classification-roberta-base-llm-expanded) | [10.57967/hf/9624](https://doi.org/10.57967/hf/9624) |
|
| 257 |
+
| Code | [vulnerability-lookup/VulnTrain](https://github.com/vulnerability-lookup/VulnTrain) | — |
|
| 258 |
+
| Paper + trainer logs | [vulnerability-lookup/cve-attack-mapping-paper](https://github.com/vulnerability-lookup/cve-attack-mapping-paper) | — |
|
| 259 |
+
|
| 260 |
+
## Citation
|
| 261 |
+
|
| 262 |
+
```bibtex
|
| 263 |
+
@misc{bonhomme2026cveattack,
|
| 264 |
+
title = {Mapping CVEs to MITRE ATT\&CK Techniques: A Curated Gold-Set
|
| 265 |
+
Classifier and the Limits of LLM-Assisted Label Expansion},
|
| 266 |
+
author = {Bonhomme, C{\'e}dric},
|
| 267 |
+
year = {2026},
|
| 268 |
+
note = {Preprint},
|
| 269 |
+
}
|
| 270 |
+
```
|
| 271 |
+
|
| 272 |
+
## Acknowledgements
|
| 273 |
+
|
| 274 |
+
Developed at [CIRCL](https://www.circl.lu) in the context of the
|
| 275 |
+
[AIPITCH](https://www.science.nask.pl/en/research-areas/projects/12456)
|
| 276 |
+
project, co-funded by the European Union.
|