vulnerability-severity-classification-roberta-base
This model is a fine-tuned version of roberta-base on the dataset CIRCL/vulnerability-scores.
You can read this page for more information.
It achieves the following results on the evaluation set:
- Loss: 0.4977
- Accuracy: 0.8282
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
from transformers import AutoModelForSequenceClassification, AutoTokenizer
import torch
labels = ["low", "medium", "high", "critical"]
model_name = "CIRCL/vulnerability-severity-classification-distilbert-base-uncased"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
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:", labels[predicted_class])
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 3e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- num_epochs: 5
Training results
Training Loss | Epoch | Step | Validation Loss | Accuracy |
---|---|---|---|---|
0.6104 | 1.0 | 27258 | 0.6445 | 0.7436 |
0.5623 | 2.0 | 54516 | 0.5718 | 0.7731 |
0.4926 | 3.0 | 81774 | 0.5292 | 0.7999 |
0.4963 | 4.0 | 109032 | 0.5039 | 0.8192 |
0.4027 | 5.0 | 136290 | 0.4977 | 0.8282 |
Framework versions
- Transformers 4.51.3
- Pytorch 2.7.0+cu126
- Datasets 3.6.0
- Tokenizers 0.21.1
- Downloads last month
- 31
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support
Model tree for CIRCL/vulnerability-severity-classification-roberta-base
Base model
FacebookAI/roberta-base