Text Classification
Transformers
Safetensors
roberta
Generated from Trainer
classification
nlp
vulnerability
text-embeddings-inference
Instructions to use CIRCL/vulnerability-severity-classification-roberta-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CIRCL/vulnerability-severity-classification-roberta-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="CIRCL/vulnerability-severity-classification-roberta-base")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("CIRCL/vulnerability-severity-classification-roberta-base") model = AutoModelForSequenceClassification.from_pretrained("CIRCL/vulnerability-severity-classification-roberta-base") - Notebooks
- Google Colab
- Kaggle
End of training
Browse files- README.md +33 -67
- model.safetensors +1 -1
README.md
CHANGED
|
@@ -1,67 +1,50 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
-
license:
|
| 4 |
base_model: roberta-base
|
| 5 |
-
metrics:
|
| 6 |
-
- accuracy
|
| 7 |
tags:
|
| 8 |
- generated_from_trainer
|
| 9 |
-
|
| 10 |
-
-
|
| 11 |
-
- nlp
|
| 12 |
-
- vulnerability
|
| 13 |
model-index:
|
| 14 |
- name: vulnerability-severity-classification-roberta-base
|
| 15 |
results: []
|
| 16 |
-
datasets:
|
| 17 |
-
- CIRCL/vulnerability-scores
|
| 18 |
---
|
| 19 |
|
|
|
|
|
|
|
| 20 |
|
| 21 |
-
#
|
| 22 |
-
|
| 23 |
-
# Severity classification
|
| 24 |
-
|
| 25 |
-
This model is a fine-tuned version of [roberta-base](https://huggingface.co/roberta-base) on the dataset [CIRCL/vulnerability-scores](https://huggingface.co/datasets/CIRCL/vulnerability-scores).
|
| 26 |
-
|
| 27 |
-
The model was presented in the paper [VLAI: A RoBERTa-Based Model for Automated Vulnerability Severity Classification](https://huggingface.co/papers/2507.03607) [[arXiv](https://arxiv.org/abs/2507.03607)].
|
| 28 |
-
|
| 29 |
-
**Abstract:** VLAI is a transformer-based model that predicts software vulnerability severity levels directly from text descriptions. Built on RoBERTa, VLAI is fine-tuned on over 600,000 real-world vulnerabilities and achieves over 82% accuracy in predicting severity categories, enabling faster and more consistent triage ahead of manual CVSS scoring. The model and dataset are open-source and integrated into the Vulnerability-Lookup service.
|
| 30 |
-
|
| 31 |
-
You can read [this page](https://www.vulnerability-lookup.org/user-manual/ai/) for more information.
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
## Model description
|
| 35 |
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
## How to get started with the model
|
| 39 |
-
|
| 40 |
-
```python
|
| 41 |
-
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 42 |
-
import torch
|
| 43 |
|
| 44 |
-
|
| 45 |
|
| 46 |
-
|
| 47 |
-
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 48 |
-
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
| 49 |
-
model.eval()
|
| 50 |
|
| 51 |
-
|
| 52 |
-
that could severely harm the host system. This could significantly affect the confidentiality, integrity, and availability of the targeted system."
|
| 53 |
-
inputs = tokenizer(test_description, return_tensors="pt", truncation=True, padding=True)
|
| 54 |
|
| 55 |
-
|
| 56 |
-
with torch.no_grad():
|
| 57 |
-
outputs = model(**inputs)
|
| 58 |
-
predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
|
| 59 |
-
|
| 60 |
-
# Print results
|
| 61 |
-
print("Predictions:", predictions)
|
| 62 |
-
predicted_class = torch.argmax(predictions, dim=-1).item()
|
| 63 |
-
print("Predicted severity:", labels[predicted_class])
|
| 64 |
-
```
|
| 65 |
|
| 66 |
## Training procedure
|
| 67 |
|
|
@@ -76,32 +59,15 @@ The following hyperparameters were used during training:
|
|
| 76 |
- lr_scheduler_type: linear
|
| 77 |
- num_epochs: 5
|
| 78 |
|
| 79 |
-
It achieves the following results on the evaluation set:
|
| 80 |
-
- Loss: 1.9916
|
| 81 |
-
- Accuracy: 0.8193
|
| 82 |
-
- F1 Macro: 0.7498
|
| 83 |
-
- Low Precision: 0.6797
|
| 84 |
-
- Low Recall: 0.4889
|
| 85 |
-
- Low F1: 0.5687
|
| 86 |
-
- Medium Precision: 0.8483
|
| 87 |
-
- Medium Recall: 0.8715
|
| 88 |
-
- Medium F1: 0.8597
|
| 89 |
-
- High Precision: 0.8133
|
| 90 |
-
- High Recall: 0.8151
|
| 91 |
-
- High F1: 0.8142
|
| 92 |
-
- Critical Precision: 0.7600
|
| 93 |
-
- Critical Recall: 0.7530
|
| 94 |
-
- Critical F1: 0.7565
|
| 95 |
-
|
| 96 |
### Training results
|
| 97 |
|
| 98 |
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 Macro | Low Precision | Low Recall | Low F1 | Medium Precision | Medium Recall | Medium F1 | High Precision | High Recall | High F1 | Critical Precision | Critical Recall | Critical F1 |
|
| 99 |
|:-------------:|:-----:|:-----:|:---------------:|:--------:|:--------:|:-------------:|:----------:|:------:|:----------------:|:-------------:|:---------:|:--------------:|:-----------:|:-------:|:------------------:|:---------------:|:-----------:|
|
| 100 |
-
| 2.
|
| 101 |
-
| 2.
|
| 102 |
-
| 2.
|
| 103 |
-
| 1.
|
| 104 |
-
| 1.
|
| 105 |
|
| 106 |
|
| 107 |
### Framework versions
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
+
license: mit
|
| 4 |
base_model: roberta-base
|
|
|
|
|
|
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
| 7 |
+
metrics:
|
| 8 |
+
- accuracy
|
|
|
|
|
|
|
| 9 |
model-index:
|
| 10 |
- name: vulnerability-severity-classification-roberta-base
|
| 11 |
results: []
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 15 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 16 |
|
| 17 |
+
# vulnerability-severity-classification-roberta-base
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
+
This model is a fine-tuned version of [roberta-base](https://huggingface.co/roberta-base) on an unknown dataset.
|
| 20 |
+
It achieves the following results on the evaluation set:
|
| 21 |
+
- Loss: 2.0603
|
| 22 |
+
- Accuracy: 0.8169
|
| 23 |
+
- F1 Macro: 0.7447
|
| 24 |
+
- Low Precision: 0.6569
|
| 25 |
+
- Low Recall: 0.4883
|
| 26 |
+
- Low F1: 0.5602
|
| 27 |
+
- Medium Precision: 0.8417
|
| 28 |
+
- Medium Recall: 0.8775
|
| 29 |
+
- Medium F1: 0.8592
|
| 30 |
+
- High Precision: 0.8177
|
| 31 |
+
- High Recall: 0.8029
|
| 32 |
+
- High F1: 0.8102
|
| 33 |
+
- Critical Precision: 0.7563
|
| 34 |
+
- Critical Recall: 0.7421
|
| 35 |
+
- Critical F1: 0.7491
|
| 36 |
|
| 37 |
## Model description
|
| 38 |
|
| 39 |
+
More information needed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
+
## Intended uses & limitations
|
| 42 |
|
| 43 |
+
More information needed
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
+
## Training and evaluation data
|
|
|
|
|
|
|
| 46 |
|
| 47 |
+
More information needed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
## Training procedure
|
| 50 |
|
|
|
|
| 59 |
- lr_scheduler_type: linear
|
| 60 |
- num_epochs: 5
|
| 61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
### Training results
|
| 63 |
|
| 64 |
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 Macro | Low Precision | Low Recall | Low F1 | Medium Precision | Medium Recall | Medium F1 | High Precision | High Recall | High F1 | Critical Precision | Critical Recall | Critical F1 |
|
| 65 |
|:-------------:|:-----:|:-----:|:---------------:|:--------:|:--------:|:-------------:|:----------:|:------:|:----------------:|:-------------:|:---------:|:--------------:|:-----------:|:-------:|:------------------:|:---------------:|:-----------:|
|
| 66 |
+
| 2.7685 | 1.0 | 16320 | 2.5328 | 0.7375 | 0.6375 | 0.6275 | 0.2956 | 0.4019 | 0.7555 | 0.8595 | 0.8041 | 0.7563 | 0.6668 | 0.7087 | 0.6296 | 0.6410 | 0.6352 |
|
| 67 |
+
| 2.1832 | 2.0 | 32640 | 2.3441 | 0.7670 | 0.6710 | 0.6478 | 0.3370 | 0.4434 | 0.8049 | 0.8441 | 0.8240 | 0.7431 | 0.7665 | 0.7546 | 0.7050 | 0.6237 | 0.6618 |
|
| 68 |
+
| 2.0311 | 3.0 | 48960 | 2.1676 | 0.7900 | 0.7086 | 0.6366 | 0.4174 | 0.5042 | 0.8369 | 0.8434 | 0.8402 | 0.7701 | 0.7915 | 0.7806 | 0.7079 | 0.7112 | 0.7096 |
|
| 69 |
+
| 1.5652 | 4.0 | 65280 | 2.0563 | 0.8083 | 0.7323 | 0.6671 | 0.4477 | 0.5358 | 0.8450 | 0.8597 | 0.8523 | 0.7981 | 0.8052 | 0.8016 | 0.7321 | 0.7467 | 0.7394 |
|
| 70 |
+
| 1.4185 | 5.0 | 81600 | 2.0603 | 0.8169 | 0.7447 | 0.6569 | 0.4883 | 0.5602 | 0.8417 | 0.8775 | 0.8592 | 0.8177 | 0.8029 | 0.8102 | 0.7563 | 0.7421 | 0.7491 |
|
| 71 |
|
| 72 |
|
| 73 |
### Framework versions
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 498618976
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4b829d16fe281497ed5f9c56a4b3030886da609289a74209d5304f592330666c
|
| 3 |
size 498618976
|