Views
No views yet




Franco Terranova, Sana Rekbi, Abdelkader Lahmadi, Isabelle Chrisment. Multi-Taxonomy Vulnerability Classification with Hierarchically Finetuned Language Models. The 23rd Conference on Detection of Intrusions and Malware & Vulnerability Assessment (DIMVA '26).
| Property | Value |
|---|---|
| Taxonomy | CWE (Common Weakness Enumeration) |
| Task | Multi-label text classification |
| Input | Vulnerability description (e.g., CVE summary) |
| Output | One or more CWE identifiers |
| Number of labels | 713 |
| Number of samples | 259,549 |
| Latest CVE update included | 17/06/2026 |
| Split | train (60%), val (20%), test (20%) |
| LRAP | MRR | Coverage Error | Label Ranking Loss | P@1 | P@3 | P@5 | R@1 | R@3 | R@5 |
|---|---|---|---|---|---|---|---|---|---|
| 0.8114 | 0.8588 | 15.78 | 0.0082 | 0.8062 | 0.7461 | 0.5326 | 0.2669 | 0.7118 | 0.8270 |
| Micro P | Micro R | Micro F1 | Macro F1 | Weighted F1 | Hamming Loss | Subset Accuracy |
|---|---|---|---|---|---|---|
| 0.8686 | 0.7013 | 0.7760 | 0.0751 | 0.7425 | 0.0018 | 0.5326 |
1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch
3
4tokenizer = AutoTokenizer.from_pretrained("Sana9/distilbert-vuln2cwe-flat")
5model = AutoModelForSequenceClassification.from_pretrained("Sana9/distilbert-vuln2cwe-flat")
6
7text = "Buffer overflow vulnerability in OpenSSL allows remote attackers to execute arbitrary code."
8
9with torch.no_grad():
10 probs = torch.sigmoid(
11 model(**tokenizer(text, return_tensors="pt", truncation=True)).logits
12 )[0]
13
14predictions = {
15 model.config.id2label[i]: p.item()
16 for i, p in enumerate(probs)
17 if p > 0.5
18}
19
20print(predictions)1@inproceedings{terranova2026multitaxonomy,
2 author = {Franco Terranova and Sana Rekbi and Abdelkader Lahmadi and Isabelle Chrisment},
3 title = {Multi-Taxonomy Vulnerability Classification with Hierarchically Finetuned Language Models},
4 booktitle = {Proceedings of the International Conference on Detection of Intrusions and Malware, and Vulnerability Assessment (DIMVA)},
5 year = {2026},
6 month = jul,
7 address = {Chania, Crete, Greece},
8 note = {HAL identifier: hal-05500820v2}
9}