VLAI: A RoBERTa-Based Model for Automated Vulnerability Severity Classification

Severity classification

This model is a fine-tuned version of roberta-base on the dataset CIRCL/vulnerability-scores.

The model was presented in the paper VLAI: A RoBERTa-Based Model for Automated Vulnerability Severity Classification [arXiv].

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.

Note: since VulnTrain 3.4.0, the dataset is split so that records of the same vulnerability (for example a CVE and its GitHub advisory) never appear in both train and test. Accuracy measured this way (74%) reflects performance on vulnerabilities the model has never seen. Earlier figures, including the one in the abstract above, were measured on a split where many test descriptions also appeared in training. Details in the technical report Improving vulnerability-scores: Leakage-Free Splits and Consistent CVSS 4.0 Scoring.

You can read this page for more information.

Model description

It is a classification model and is aimed to assist in classifying vulnerabilities by severity based on their descriptions.

Labels:

Label CVSS score
Low < 4.0
Medium 4.0 – 6.9
High 7.0 – 8.9
Critical β‰₯ 9.0

How to get started with the model

from transformers import AutoModelForSequenceClassification, AutoTokenizer
import torch

model_name = "CIRCL/vulnerability-severity-classification-roberta-base"
revision = "ca57888"
tokenizer = AutoTokenizer.from_pretrained(model_name, revision=revision)
model = AutoModelForSequenceClassification.from_pretrained(model_name, revision=revision)
model.eval()

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:", model.config.id2label[predicted_class])

Training data

Revision df1b480 of CIRCL/vulnerability-scores, built with VulnTrain from CVE records, GitHub, PySec and CSAF (Red Hat, Cisco, CISA) advisories:

Split Rows Labelled rows
train 700,685 597,616
validation 87,147 75,109
test 86,797 73,796
  • Group-aware split (80/10/10). Rows that share a description, an identifier or an alias are kept in the same split, so no vulnerability appears in both train and test.
  • Labels come from the first available CVSS score, in the order v4.0, v3.1, v3.0, v2.0. CVSS 4.0 scores are read with base metrics only (CVSS-B), whatever the source.

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: adamw_torch_fused
  • lr_scheduler_type: linear
  • warmup_steps: 0
  • weight_decay: 0.01
  • num_epochs: 5

The checkpoint with the best validation accuracy (epoch 4) is the one published.

Training took 4 h 35 min on 4 x NVIDIA L40S and used 4.85 kWh, for 0.60 kg COβ‚‚eq (measured with CodeCarbon, see emissions.csv).

Results

Evaluated once on the leakage-free test split (73,796 labelled rows):

  • Accuracy: 0.7422 (95% CI 0.7391 – 0.7454)
  • F1 Macro: 0.6570
Class Precision Recall F1 Support
Low 0.5639 0.3909 0.4617 2,699
Medium 0.7824 0.8138 0.7978 33,300
High 0.7378 0.7252 0.7314 28,855
Critical 0.6378 0.6368 0.6373 8,942

Training results

Validation metrics at each epoch:

Epoch Step Training Loss Validation Loss Accuracy F1 Macro
1.0 18676 2.8313 2.6363 0.7307 0.6174
2.0 37352 2.2695 2.5727 0.7436 0.6494
3.0 56028 2.0150 2.6915 0.7457 0.6544
4.0 74704 1.6337 2.7945 0.7483 0.6596
5.0 93380 1.4512 3.0718 0.7479 0.6601

Previous versions

The previous model, trained on the earlier random split, is revision 10d9861 (dataset revision 34e6a14, test accuracy 81.17%, 73.02% on the test rows without a twin in train).

Framework versions

  • Transformers 5.24.1
  • Pytorch 2.15.0
  • Datasets 4.8.5
  • Tokenizers 0.23.3

Provenance

This model card is generated by VulnTrain 3.5.0 at the end of the training run, from the values the run measured.

Citation

@article{bonhomme2025vlai,
  title   = {{VLAI}: A {RoBERTa}-Based Model for Automated Vulnerability
             Severity Classification},
  author  = {Bonhomme, C{\'e}dric and Dulaunoy, Alexandre},
  journal = {arXiv preprint arXiv:2507.03607},
  year    = {2025}
}

@techreport{bonhomme2026vulnscores,
  title       = {Improving vulnerability-scores: Leakage-Free Splits and
                 Consistent {CVSS} 4.0 Scoring},
  author      = {Bonhomme, C{\'e}dric},
  institution = {CIRCL - Computer Incident Response Center Luxembourg},
  year        = {2026},
  month       = oct,
  doi         = {10.5281/zenodo.23760802},
  url         = {https://doi.org/10.5281/zenodo.23760802}
}
Downloads last month
15,767
Safetensors
Model size
0.1B params
Tensor type
F32
Β·
Inference Providers NEW

Model tree for CIRCL/vulnerability-severity-classification-roberta-base

Finetuned
(2,435)
this model

Dataset used to train CIRCL/vulnerability-severity-classification-roberta-base

Spaces using CIRCL/vulnerability-severity-classification-roberta-base 2

Collection including CIRCL/vulnerability-severity-classification-roberta-base

Paper for CIRCL/vulnerability-severity-classification-roberta-base

Evaluation results