--- 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: 3.0881 - Accuracy: 0.7477 - F1 Macro: 0.6619 - Low Precision: 0.5404 - Low Recall: 0.4261 - Low F1: 0.4765 - Medium Precision: 0.7953 - Medium Recall: 0.8114 - Medium F1: 0.8033 - High Precision: 0.7300 - High Recall: 0.7469 - High F1: 0.7384 - Critical Precision: 0.6604 - Critical Recall: 0.6015 - Critical F1: 0.6296 ### 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.5865 | 1.0 | 18258 | 2.6268 | 0.7302 | 0.6219 | 0.6499 | 0.2702 | 0.3817 | 0.7774 | 0.8076 | 0.7922 | 0.7061 | 0.7295 | 0.7176 | 0.6226 | 0.5720 | 0.5962 | | 2.3063 | 2.0 | 36516 | 2.5395 | 0.7447 | 0.6513 | 0.6407 | 0.3392 | 0.4436 | 0.7705 | 0.8451 | 0.8061 | 0.7491 | 0.6990 | 0.7231 | 0.6375 | 0.6272 | 0.6323 | | 1.6765 | 3.0 | 54774 | 2.6399 | 0.7478 | 0.6605 | 0.6133 | 0.3784 | 0.4681 | 0.7952 | 0.8150 | 0.8050 | 0.7342 | 0.7365 | 0.7354 | 0.6307 | 0.6362 | 0.6334 | | 1.6561 | 4.0 | 73032 | 2.8246 | 0.7483 | 0.6634 | 0.6211 | 0.3880 | 0.4776 | 0.8001 | 0.8076 | 0.8038 | 0.7282 | 0.7466 | 0.7373 | 0.6364 | 0.6334 | 0.6349 | | 1.2166 | 5.0 | 91290 | 3.0881 | 0.7477 | 0.6619 | 0.5404 | 0.4261 | 0.4765 | 0.7953 | 0.8114 | 0.8033 | 0.7300 | 0.7469 | 0.7384 | 0.6604 | 0.6015 | 0.6296 | ### Framework versions - Transformers 5.22.2 - Pytorch 2.15.0+cu132 - Datasets 4.8.5 - Tokenizers 0.23.3