Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -3,35 +3,26 @@ license: mit
|
|
| 3 |
language:
|
| 4 |
- en
|
| 5 |
tags:
|
|
|
|
|
|
|
| 6 |
- mitre-attack
|
| 7 |
- text-classification
|
| 8 |
- fine-tuned
|
| 9 |
-
- cybersecurity
|
| 10 |
-
- vulnerability
|
| 11 |
- securebert
|
| 12 |
base_model: ehsanaghaei/SecureBERT
|
| 13 |
---
|
| 14 |
|
| 15 |
-
# SecureBERT β
|
|
|
|
|
|
|
| 16 |
|
|
|
|
|
|
|
| 17 |
[](https://theses.fr/s371241)
|
| 18 |
[](https://opensource.org/licenses/MIT)
|
| 19 |
[](https://doi.org/10.5281/zenodo.16936476)
|
| 20 |
-
[](https://zenodo.org/records/17368476)
|
| 21 |
-
[](https://github.com/terranovafr/CVE-LMTune)
|
| 22 |
-
|
| 23 |
-
<div align="center">
|
| 24 |
-
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5b/Logo_Universit%C3%A9_de_Lorraine.svg/1280px-Logo_Universit%C3%A9_de_Lorraine.svg.png" alt="Universite de Lorraine" height="50"/>
|
| 25 |
-
|
| 26 |
-
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/Inr_logo_rouge.svg/1280px-Inr_logo_rouge.svg.png" alt="INRIA" height="50"/>
|
| 27 |
-
|
| 28 |
-
<img src="https://upload.wikimedia.org/wikipedia/fr/6/6e/Logo_loria_abrege_couleur.png" alt="LORIA" height="70"/>
|
| 29 |
-
|
| 30 |
-
<img src="https://www.pepr-cybersecurite.fr/wp-content/uploads/2023/09/pep-cybersecurite-550x250-1.png" alt="SuperViZ" height="70"/>
|
| 31 |
-
</div>
|
| 32 |
-
<br>
|
| 33 |
|
| 34 |
-
Part of the **CVE-LMTune** model suite
|
| 35 |
|
| 36 |
## Paper
|
| 37 |
|
|
@@ -39,21 +30,34 @@ Part of the **CVE-LMTune** model suite β language models fine-tuned for multi-
|
|
| 39 |
> *Multi-Taxonomy Vulnerability Classification with Hierarchically Finetuned Language Models.*
|
| 40 |
> The 23rd Conference on Detection of Intrusions and Malware & Vulnerability Assessment **(DIMVA '26)**.
|
| 41 |
|
| 42 |
-
##
|
|
|
|
|
|
|
| 43 |
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
-
##
|
| 47 |
|
| 48 |
-
|
| 49 |
-
|---|---|
|
| 50 |
-
| Micro-F1 | **0.8168** |
|
| 51 |
-
| LRAP | **0.9152** |
|
| 52 |
-
| Mean Reciprocal Rank | **0.9460** |
|
| 53 |
|
| 54 |
-
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
## Quick Start
|
| 59 |
|
|
@@ -63,24 +67,34 @@ import torch
|
|
| 63 |
|
| 64 |
tokenizer = AutoTokenizer.from_pretrained("Sana9/securebert-vuln2attack-flat")
|
| 65 |
model = AutoModelForSequenceClassification.from_pretrained("Sana9/securebert-vuln2attack-flat")
|
| 66 |
-
model.eval()
|
| 67 |
|
| 68 |
text = "Buffer overflow vulnerability in OpenSSL allows remote attackers to execute arbitrary code."
|
| 69 |
-
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
|
| 70 |
|
| 71 |
with torch.no_grad():
|
| 72 |
-
|
| 73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
```
|
| 75 |
|
| 76 |
## Citation
|
| 77 |
|
| 78 |
```bibtex
|
| 79 |
-
@inproceedings{
|
|
|
|
| 80 |
title = {Multi-Taxonomy Vulnerability Classification with Hierarchically Finetuned Language Models},
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
|
|
|
|
|
|
| 84 |
}
|
| 85 |
```
|
| 86 |
|
|
@@ -89,10 +103,9 @@ with torch.no_grad():
|
|
| 89 |
- π€ [Full model suite on Hugging Face](https://huggingface.co/Sana9)
|
| 90 |
- π» [CVE-LMTune β Training code (GitHub)](https://github.com/terranovafr/CVE-LMTune)
|
| 91 |
- π¦ [Zenodo β Data repository](https://doi.org/10.5281/zenodo.16936476)
|
| 92 |
-
- π¦ [Zenodo β Code repository](https://zenodo.org/records/17368476)
|
| 93 |
|
| 94 |
## Disclaimers
|
| 95 |
|
| 96 |
-
- This product
|
| 97 |
- This project relies on data publicly available from the CWE, CAPEC, and MITRE ATT&CK projects.
|
| 98 |
-
- This work has been partially supported by the French National Research Agency under the France 2030 label (Superviz ANR-22-PECY-0008).
|
|
|
|
| 3 |
language:
|
| 4 |
- en
|
| 5 |
tags:
|
| 6 |
+
- cybersecurity
|
| 7 |
+
- vulnerability
|
| 8 |
- mitre-attack
|
| 9 |
- text-classification
|
| 10 |
- fine-tuned
|
|
|
|
|
|
|
| 11 |
- securebert
|
| 12 |
base_model: ehsanaghaei/SecureBERT
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# SecureBERT β CVE-LMTune ATT&CK Classifier (Flat)
|
| 16 |
+
|
| 17 |
+
<div align="center" style="display:inline-flex; gap:18px; align-items:center; flex-wrap:nowrap;"> <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5b/Logo_Universit%C3%A9_de_Lorraine.svg/1280px-Logo_Universit%C3%A9_de_Lorraine.svg.png" alt="Universite de Lorraine" style="height:50px; width:auto;" /> <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/Inr_logo_rouge.svg/1280px-Inr_logo_rouge.svg.png" alt="INRIA" style="height:50px; width:auto;" /> <img src="https://upload.wikimedia.org/wikipedia/fr/6/6e/Logo_loria_abrege_couleur.png" alt="LORIA" style="height:70px; width:auto;" /> <img src="https://www.pepr-cybersecurite.fr/wp-content/uploads/2023/09/pep-cybersecurite-550x250-1.png" alt="SuperViZ" style="height:70px; width:auto;" /> </div>
|
| 18 |
|
| 19 |
+
[](https://github.com/terranovafr/CVE-LMTune)
|
| 20 |
+
[](https://hal.science/hal-05500820)
|
| 21 |
[](https://theses.fr/s371241)
|
| 22 |
[](https://opensource.org/licenses/MIT)
|
| 23 |
[](https://doi.org/10.5281/zenodo.16936476)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
+
Part of the **CVE-LMTune** model suite, a collection of language models fine-tuned for multi-taxonomy vulnerability classification across widely used cybersecurity taxonomies, including CWE, CAPEC, and MITRE ATT&CK.
|
| 26 |
|
| 27 |
## Paper
|
| 28 |
|
|
|
|
| 30 |
> *Multi-Taxonomy Vulnerability Classification with Hierarchically Finetuned Language Models.*
|
| 31 |
> The 23rd Conference on Detection of Intrusions and Malware & Vulnerability Assessment **(DIMVA '26)**.
|
| 32 |
|
| 33 |
+
## Overview
|
| 34 |
+
|
| 35 |
+
This model performs **multi-label ATT&CK classification** from vulnerability descriptions. Given a CVE-style description, it predicts one or more ATT&CK identifiers associated with the described vulnerability.
|
| 36 |
|
| 37 |
+
| Property | Value |
|
| 38 |
+
|----------|-------|
|
| 39 |
+
| Taxonomy | MITRE ATT&CK Enterprise Subtechniques |
|
| 40 |
+
| Task | Multi-label text classification |
|
| 41 |
+
| Input | Vulnerability description (e.g., CVE summary) |
|
| 42 |
+
| Output | One or more ATT&CK identifiers |
|
| 43 |
+
| Number of labels | 175 |
|
| 44 |
+
| Number of samples | 231,009 |
|
| 45 |
+
| Latest CVE update included | 17/06/2025 |
|
| 46 |
+
| Split | train (60%), val (20%), test (20%) |
|
| 47 |
|
| 48 |
+
## Evaluation Results
|
| 49 |
|
| 50 |
+
The model was evaluated on the held-out test set using standard multi-label classification metrics using sigmoid activation and a default threshold of 0.5.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
+
**Ranking Metrics**
|
| 53 |
+
| LRAP | MRR | Coverage Error | Label Ranking Loss | P@1 | P@3 | P@5 | R@1 | R@3 | R@5 |
|
| 54 |
+
|------|-----|----------------|--------------------|-----|-----|-----|-----|-----|-----|
|
| 55 |
+
| 0.9152 | 0.9460 | 18.79 | 0.0173 | 0.9321 | 0.9084 | 0.8458 | 0.1286 | 0.3779 | 0.5554 |
|
| 56 |
|
| 57 |
+
**Threshold = 0.5**
|
| 58 |
+
| Micro P | Micro R | Micro F1 | Macro F1 | Weighted F1 | Hamming Loss | Subset Accuracy |
|
| 59 |
+
|--------|--------|----------|----------|------------|--------------|----------------|
|
| 60 |
+
| 0.8612 | 0.7767 | 0.8168 | 0.4286 | 0.8093 | 0.0264 | 0.6874 |
|
| 61 |
|
| 62 |
## Quick Start
|
| 63 |
|
|
|
|
| 67 |
|
| 68 |
tokenizer = AutoTokenizer.from_pretrained("Sana9/securebert-vuln2attack-flat")
|
| 69 |
model = AutoModelForSequenceClassification.from_pretrained("Sana9/securebert-vuln2attack-flat")
|
|
|
|
| 70 |
|
| 71 |
text = "Buffer overflow vulnerability in OpenSSL allows remote attackers to execute arbitrary code."
|
|
|
|
| 72 |
|
| 73 |
with torch.no_grad():
|
| 74 |
+
probs = torch.sigmoid(
|
| 75 |
+
model(**tokenizer(text, return_tensors="pt", truncation=True)).logits
|
| 76 |
+
)[0]
|
| 77 |
+
|
| 78 |
+
predictions = {
|
| 79 |
+
model.config.id2label[i]: p.item()
|
| 80 |
+
for i, p in enumerate(probs)
|
| 81 |
+
if p > 0.5
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
print(predictions)
|
| 85 |
```
|
| 86 |
|
| 87 |
## Citation
|
| 88 |
|
| 89 |
```bibtex
|
| 90 |
+
@inproceedings{terranova2026multitaxonomy,
|
| 91 |
+
author = {Franco Terranova and Sana Rekbi and Abdelkader Lahmadi and Isabelle Chrisment},
|
| 92 |
title = {Multi-Taxonomy Vulnerability Classification with Hierarchically Finetuned Language Models},
|
| 93 |
+
booktitle = {Proceedings of the International Conference on Detection of Intrusions and Malware, and Vulnerability Assessment (DIMVA)},
|
| 94 |
+
year = {2026},
|
| 95 |
+
month = jul,
|
| 96 |
+
address = {Chania, Crete, Greece},
|
| 97 |
+
note = {HAL identifier: hal-05500820v2}
|
| 98 |
}
|
| 99 |
```
|
| 100 |
|
|
|
|
| 103 |
- π€ [Full model suite on Hugging Face](https://huggingface.co/Sana9)
|
| 104 |
- π» [CVE-LMTune β Training code (GitHub)](https://github.com/terranovafr/CVE-LMTune)
|
| 105 |
- π¦ [Zenodo β Data repository](https://doi.org/10.5281/zenodo.16936476)
|
|
|
|
| 106 |
|
| 107 |
## Disclaimers
|
| 108 |
|
| 109 |
+
- This product is a result of the use of the NVD API but is not endorsed or certified by the NVD. The same for the CVE2CAPEC project and the Hugging Face API.
|
| 110 |
- This project relies on data publicly available from the CWE, CAPEC, and MITRE ATT&CK projects.
|
| 111 |
+
- This work has been partially supported by the French National Research Agency under the France 2030 label (Superviz ANR-22-PECY-0008). The views reflected herein do not necessarily reflect the opinion of the French government.
|