nielsr's picture
nielsr HF Staff
Improve model card: Add pipeline tag, paper, project, code links, and descriptive tags
e859998 verified
|
raw
history blame
3.28 kB
metadata
base_model: distilbert-base-uncased
datasets:
  - CIRCL/vulnerability-scores
library_name: transformers
license: apache-2.0
metrics:
  - accuracy
pipeline_tag: text-classification
tags:
  - generated_from_trainer
  - security
  - vulnerability
  - classification
  - distilbert
model-index:
  - name: vulnerability-severity-classification-distilbert-base-uncased
    results: []

vulnerability-severity-classification-distilbert-base-uncased

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

This model is part of the work presented in the paper VLAI: A RoBERTa-Based Model for Automated Vulnerability Severity Classification.

Project Page: https://vulnerability.circl.lu Code Repository: https://github.com/vulnerability-lookup/ML-Gateway

It achieves the following results on the evaluation set:

  • Loss: 0.6447
  • Accuracy: 0.7595

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 = "vulnerability-severity-classification-distilbert-base-uncased"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
model.eval()

test_description = "langchain_experimental 0.0.14 allows an attacker to bypass the CVE-2023-36258 fix and execute arbitrary code via the PALChain in the python exec method."
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 and evaluation data

More information needed

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 2e-05
  • train_batch_size: 32
  • eval_batch_size: 32
  • 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.6379 1.0 7465 0.6355 0.7366
0.5871 2.0 14930 0.6145 0.7507
0.565 3.0 22395 0.6065 0.7572
0.4976 4.0 29860 0.6175 0.7620
0.3684 5.0 37325 0.6447 0.7595

Framework versions

  • Transformers 4.49.0
  • Pytorch 2.6.0+cu124
  • Datasets 3.3.2
  • Tokenizers 0.21.0