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", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
File size: 5,386 Bytes
2a7e8e8 321fe62 2a7e8e8 30bbdaa 321fe62 2a7e8e8 321fe62 2a7e8e8 321fe62 3e7f638 2394377 7fbfa7e 2394377 321fe62 1e9d6f6 321fe62 1e9d6f6 321fe62 accca22 321fe62 accca22 321fe62 999ccc9 25373ed 2a7e8e8 e801d4a 2a7e8e8 ab225d6 2a7e8e8 321fe62 2a7e8e8 e4a3453 30bbdaa 2a7e8e8 30bbdaa 97aafaf 34c4352 30bbdaa | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | ---
library_name: transformers
license: cc-by-4.0
base_model: roberta-base
metrics:
- accuracy
tags:
- generated_from_trainer
- text-classification
- classification
- nlp
- vulnerability
model-index:
- name: vulnerability-severity-classification-roberta-base
results: []
datasets:
- CIRCL/vulnerability-scores
---
# VLAI: A RoBERTa-Based Model for Automated Vulnerability Severity Classification
# Severity classification
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).
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)].
**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.
You can read [this page](https://www.vulnerability-lookup.org/user-manual/ai/) for more information.
## Model description
It is a classification model and is aimed to assist in classifying vulnerabilities by severity based on their descriptions.
## How to get started with the model
```python
from transformers import AutoModelForSequenceClassification, AutoTokenizer
import torch
labels = ["low", "medium", "high", "critical"]
model_name = "CIRCL/vulnerability-severity-classification-roberta-base"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
model.eval()
print("Model revision:", model.config._commit_hash)
test_description = "SAP NetWeaver Visual Composer Metadata Uploader is not protected with a proper authorization, allowing unauthenticated agent to upload potentially malicious executable binaries \
that could severely harm the host system. This could significantly affect the confidentiality, integrity, and availability of the targeted system."
inputs = tokenizer(test_description, return_tensors="pt", truncation=True, padding=True)
# Run inference
with torch.no_grad():
outputs = model(**inputs)
predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
# Print results
print("Predictions:", predictions)
predicted_class = torch.argmax(predictions, dim=-1).item()
print("Predicted severity:", labels[predicted_class])
```
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 3e-05
- train_batch_size: 32
- eval_batch_size: 32
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- num_epochs: 5
It achieves the following results on the evaluation set:
- Loss: 2.0532
- Accuracy: 0.8158
- F1 Macro: 0.7498
- Low Precision: 0.6832
- Low Recall: 0.4988
- Low F1: 0.5766
- Medium Precision: 0.8349
- Medium Recall: 0.8687
- Medium F1: 0.8514
- High Precision: 0.8180
- High Recall: 0.8128
- High F1: 0.8154
- Critical Precision: 0.7683
- Critical Recall: 0.7435
- Critical F1: 0.7557
### Training results
| 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 |
|:-------------:|:-----:|:-----:|:---------------:|:--------:|:--------:|:-------------:|:----------:|:------:|:----------------:|:-------------:|:---------:|:--------------:|:-----------:|:-------:|:------------------:|:---------------:|:-----------:|
| 2.7510 | 1.0 | 18405 | 2.5883 | 0.7325 | 0.6230 | 0.6335 | 0.2451 | 0.3534 | 0.7813 | 0.8031 | 0.7920 | 0.7066 | 0.7464 | 0.7259 | 0.6394 | 0.6027 | 0.6205 |
| 2.1876 | 2.0 | 36810 | 2.3209 | 0.7617 | 0.6768 | 0.6014 | 0.3890 | 0.4724 | 0.7807 | 0.8477 | 0.8128 | 0.7610 | 0.7464 | 0.7536 | 0.7190 | 0.6244 | 0.6683 |
| 1.9450 | 3.0 | 55215 | 2.2040 | 0.7853 | 0.7005 | 0.6855 | 0.3683 | 0.4792 | 0.8019 | 0.8620 | 0.8309 | 0.7950 | 0.7654 | 0.7799 | 0.7092 | 0.7147 | 0.7119 |
| 1.6939 | 4.0 | 73620 | 2.0452 | 0.8060 | 0.7346 | 0.6528 | 0.4713 | 0.5474 | 0.8262 | 0.8633 | 0.8443 | 0.8097 | 0.8011 | 0.8054 | 0.7539 | 0.7294 | 0.7414 |
| 1.4585 | 5.0 | 92025 | 2.0532 | 0.8158 | 0.7498 | 0.6832 | 0.4988 | 0.5766 | 0.8349 | 0.8687 | 0.8514 | 0.8180 | 0.8128 | 0.8154 | 0.7683 | 0.7435 | 0.7557 |
### Framework versions
- Transformers 5.16.1
- Pytorch 2.13.0+cu130
- Datasets 4.8.5
- Tokenizers 0.23.1
|