Team Ai
Modelpublic

CIRCL/vulnerability-severity-classification-roberta-base

sourceHugging Facecc-by-4.0updated 7d agoView on Hugging Face
11likes4.8kdownloads
Model Card

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.

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.

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
  • —trainbatchsize: 32
  • —evalbatchsize: 32
  • —seed: 42
  • —optimizer: Use OptimizerNames.ADAMWTORCHFUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
  • —lrschedulertype: linear
  • —num_epochs: 5

Training results

Training LossEpochStepValidation LossAccuracyF1 MacroLow PrecisionLow RecallLow F1Medium PrecisionMedium RecallMedium F1High PrecisionHigh RecallHigh F1Critical PrecisionCritical RecallCritical F1
2.66731.0192092.62700.72750.62290.58910.27860.37830.79940.76800.78330.68090.78590.72960.65560.55360.6003
2.25082.0384182.37070.75990.67890.57900.40200.47450.78710.83710.81130.77040.73250.75100.66950.68820.6787
1.50713.0576272.24190.78170.69420.66900.35880.46710.81500.83840.82650.76530.79440.77960.72710.68190.7038
1.71854.0768362.08140.80130.72380.67240.42700.52230.82640.85790.84180.79330.80720.80020.75710.70670.7310
1.45175.0960452.08020.81010.73780.64730.47290.54650.82640.87260.84890.81900.79910.80890.75990.73390.7467

It achieves the following results on the evaluation set:

  • —Loss: 2.0802
  • —Accuracy: 0.8101
  • —F1 Macro: 0.7378
  • —Low Precision: 0.6473
  • —Low Recall: 0.4729
  • —Low F1: 0.5465
  • —Medium Precision: 0.8264
  • —Medium Recall: 0.8726
  • —Medium F1: 0.8489
  • —High Precision: 0.8190
  • —High Recall: 0.7991
  • —High F1: 0.8089
  • —Critical Precision: 0.7599
  • —Critical Recall: 0.7339
  • —Critical F1: 0.7467

Framework versions

  • —Transformers 5.17.0
  • —Pytorch 2.14.0+cu130
  • —Datasets 4.8.5
  • —Tokenizers 0.23.2