cedricbonhomme commited on
Commit
fde1107
·
verified ·
1 Parent(s): 9e9e943

End of training

Browse files
Files changed (4) hide show
  1. README.md +34 -70
  2. config.json +1 -1
  3. model.safetensors +1 -1
  4. tokenizer.json +16 -2
README.md CHANGED
@@ -1,69 +1,50 @@
1
  ---
2
  library_name: transformers
3
- license: cc-by-4.0
4
  base_model: roberta-base
5
- language:
6
- - en
7
- metrics:
8
- - accuracy
9
  tags:
10
  - generated_from_trainer
11
- - text-classification
12
- - classification
13
- - nlp
14
- - vulnerability
15
  model-index:
16
  - name: vulnerability-severity-classification-roberta-base
17
  results: []
18
- datasets:
19
- - CIRCL/vulnerability-scores
20
  ---
21
 
 
 
22
 
23
- # VLAI: A RoBERTa-Based Model for Automated Vulnerability Severity Classification
24
-
25
- # Severity classification
26
-
27
- 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).
28
-
29
- 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)].
30
-
31
- **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.
32
-
33
- You can read [this page](https://www.vulnerability-lookup.org/user-manual/ai/) for more information.
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
  ## Model description
37
 
38
- It is a classification model and is aimed to assist in classifying vulnerabilities by severity based on their descriptions.
39
-
40
- ## How to get started with the model
41
-
42
- ```python
43
- from transformers import AutoModelForSequenceClassification, AutoTokenizer
44
- import torch
45
 
46
- labels = ["low", "medium", "high", "critical"]
47
 
48
- model_name = "CIRCL/vulnerability-severity-classification-roberta-base"
49
- tokenizer = AutoTokenizer.from_pretrained(model_name)
50
- model = AutoModelForSequenceClassification.from_pretrained(model_name)
51
- model.eval()
52
 
53
- test_description = "SAP NetWeaver Visual Composer Metadata Uploader is not protected with a proper authorization, allowing unauthenticated agent to upload potentially malicious executable binaries \
54
- that could severely harm the host system. This could significantly affect the confidentiality, integrity, and availability of the targeted system."
55
- inputs = tokenizer(test_description, return_tensors="pt", truncation=True, padding=True)
56
 
57
- # Run inference
58
- with torch.no_grad():
59
- outputs = model(**inputs)
60
- predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
61
-
62
- # Print results
63
- print("Predictions:", predictions)
64
- predicted_class = torch.argmax(predictions, dim=-1).item()
65
- print("Predicted severity:", labels[predicted_class])
66
- ```
67
 
68
  ## Training procedure
69
 
@@ -78,37 +59,20 @@ The following hyperparameters were used during training:
78
  - lr_scheduler_type: linear
79
  - num_epochs: 5
80
 
81
- It achieves the following results on the evaluation set:
82
- - Loss: 2.0502
83
- - Accuracy: 0.8139
84
- - F1 Macro: 0.7431
85
- - Low Precision: 0.6397
86
- - Low Recall: 0.4924
87
- - Low F1: 0.5565
88
- - Medium Precision: 0.8410
89
- - Medium Recall: 0.8714
90
- - Medium F1: 0.8559
91
- - High Precision: 0.8123
92
- - High Recall: 0.8011
93
- - High F1: 0.8067
94
- - Critical Precision: 0.7592
95
- - Critical Recall: 0.7477
96
- - Critical F1: 0.7534
97
-
98
  ### Training results
99
 
100
  | 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 |
101
  |:-------------:|:-----:|:-----:|:---------------:|:--------:|:--------:|:-------------:|:----------:|:------:|:----------------:|:-------------:|:---------:|:--------------:|:-----------:|:-------:|:------------------:|:---------------:|:-----------:|
102
- | 2.7509 | 1.0 | 15759 | 2.5739 | 0.7341 | 0.6469 | 0.5294 | 0.3716 | 0.4367 | 0.7947 | 0.8050 | 0.7998 | 0.7148 | 0.7127 | 0.7137 | 0.6192 | 0.6570 | 0.6375 |
103
- | 2.3507 | 2.0 | 31518 | 2.4020 | 0.7609 | 0.6754 | 0.5901 | 0.3763 | 0.4595 | 0.7847 | 0.8626 | 0.8218 | 0.7920 | 0.6852 | 0.7348 | 0.6399 | 0.7385 | 0.6857 |
104
- | 1.6387 | 3.0 | 47277 | 2.1924 | 0.7858 | 0.7093 | 0.6319 | 0.4335 | 0.5142 | 0.8197 | 0.8558 | 0.8374 | 0.7971 | 0.7467 | 0.7711 | 0.6734 | 0.7614 | 0.7147 |
105
- | 1.2756 | 4.0 | 63036 | 2.0808 | 0.8042 | 0.7289 | 0.6554 | 0.4562 | 0.5380 | 0.8217 | 0.8792 | 0.8495 | 0.8022 | 0.7858 | 0.7939 | 0.7730 | 0.6991 | 0.7342 |
106
- | 1.5348 | 5.0 | 78795 | 2.0502 | 0.8139 | 0.7431 | 0.6397 | 0.4924 | 0.5565 | 0.8410 | 0.8714 | 0.8559 | 0.8123 | 0.8011 | 0.8067 | 0.7592 | 0.7477 | 0.7534 |
107
 
108
 
109
  ### Framework versions
110
 
111
- - Transformers 5.5.0
112
  - Pytorch 2.11.0+cu130
113
  - Datasets 4.8.4
114
  - Tokenizers 0.22.2
 
1
  ---
2
  library_name: transformers
3
+ license: mit
4
  base_model: roberta-base
 
 
 
 
5
  tags:
6
  - generated_from_trainer
7
+ metrics:
8
+ - accuracy
 
 
9
  model-index:
10
  - name: vulnerability-severity-classification-roberta-base
11
  results: []
 
 
12
  ---
13
 
14
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
15
+ should probably proofread and complete it, then remove this comment. -->
16
 
17
+ # vulnerability-severity-classification-roberta-base
 
 
 
 
 
 
 
 
 
 
18
 
19
+ This model is a fine-tuned version of [roberta-base](https://huggingface.co/roberta-base) on an unknown dataset.
20
+ It achieves the following results on the evaluation set:
21
+ - Loss: 2.0430
22
+ - Accuracy: 0.8132
23
+ - F1 Macro: 0.7438
24
+ - Low Precision: 0.6379
25
+ - Low Recall: 0.5097
26
+ - Low F1: 0.5666
27
+ - Medium Precision: 0.8494
28
+ - Medium Recall: 0.8632
29
+ - Medium F1: 0.8562
30
+ - High Precision: 0.8038
31
+ - High Recall: 0.8062
32
+ - High F1: 0.8050
33
+ - Critical Precision: 0.7484
34
+ - Critical Recall: 0.7460
35
+ - Critical F1: 0.7472
36
 
37
  ## Model description
38
 
39
+ More information needed
 
 
 
 
 
 
40
 
41
+ ## Intended uses & limitations
42
 
43
+ More information needed
 
 
 
44
 
45
+ ## Training and evaluation data
 
 
46
 
47
+ More information needed
 
 
 
 
 
 
 
 
 
48
 
49
  ## Training procedure
50
 
 
59
  - lr_scheduler_type: linear
60
  - num_epochs: 5
61
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  ### Training results
63
 
64
  | 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 |
65
  |:-------------:|:-----:|:-----:|:---------------:|:--------:|:--------:|:-------------:|:----------:|:------:|:----------------:|:-------------:|:---------:|:--------------:|:-----------:|:-------:|:------------------:|:---------------:|:-----------:|
66
+ | 2.5898 | 1.0 | 15845 | 2.5850 | 0.7385 | 0.6295 | 0.5772 | 0.2855 | 0.3820 | 0.7645 | 0.8514 | 0.8056 | 0.7327 | 0.7009 | 0.7164 | 0.6611 | 0.5731 | 0.6140 |
67
+ | 2.4114 | 2.0 | 31690 | 2.3649 | 0.7600 | 0.6809 | 0.5056 | 0.4649 | 0.4844 | 0.8245 | 0.8086 | 0.8164 | 0.7492 | 0.7480 | 0.7486 | 0.6423 | 0.7097 | 0.6743 |
68
+ | 1.9995 | 3.0 | 47535 | 2.1359 | 0.7862 | 0.7087 | 0.6127 | 0.4467 | 0.5167 | 0.8134 | 0.8654 | 0.8386 | 0.8038 | 0.7379 | 0.7694 | 0.6803 | 0.7424 | 0.7100 |
69
+ | 1.4062 | 4.0 | 63380 | 2.0928 | 0.8063 | 0.7176 | 0.7134 | 0.3661 | 0.4839 | 0.8441 | 0.8591 | 0.8515 | 0.7805 | 0.8172 | 0.7985 | 0.7538 | 0.7201 | 0.7365 |
70
+ | 1.5982 | 5.0 | 79225 | 2.0430 | 0.8132 | 0.7438 | 0.6379 | 0.5097 | 0.5666 | 0.8494 | 0.8632 | 0.8562 | 0.8038 | 0.8062 | 0.8050 | 0.7484 | 0.7460 | 0.7472 |
71
 
72
 
73
  ### Framework versions
74
 
75
+ - Transformers 5.5.3
76
  - Pytorch 2.11.0+cu130
77
  - Datasets 4.8.4
78
  - Tokenizers 0.22.2
config.json CHANGED
@@ -34,7 +34,7 @@
34
  "pad_token_id": 1,
35
  "problem_type": "single_label_classification",
36
  "tie_word_embeddings": true,
37
- "transformers_version": "5.5.0",
38
  "type_vocab_size": 1,
39
  "use_cache": true,
40
  "vocab_size": 50265
 
34
  "pad_token_id": 1,
35
  "problem_type": "single_label_classification",
36
  "tie_word_embeddings": true,
37
+ "transformers_version": "5.5.3",
38
  "type_vocab_size": 1,
39
  "use_cache": true,
40
  "vocab_size": 50265
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:45b332e5b806ab9f5eec0cc477a61ecc9319048bf8f539587b597f37388a418d
3
  size 498618952
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b605096095a323bc53778e6f78fe1d981595c3bd8d0b622753844e4d80c7358a
3
  size 498618952
tokenizer.json CHANGED
@@ -1,7 +1,21 @@
1
  {
2
  "version": "1.0",
3
- "truncation": null,
4
- "padding": null,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  "added_tokens": [
6
  {
7
  "id": 0,
 
1
  {
2
  "version": "1.0",
3
+ "truncation": {
4
+ "direction": "Right",
5
+ "max_length": 512,
6
+ "strategy": "LongestFirst",
7
+ "stride": 0
8
+ },
9
+ "padding": {
10
+ "strategy": {
11
+ "Fixed": 512
12
+ },
13
+ "direction": "Right",
14
+ "pad_to_multiple_of": null,
15
+ "pad_id": 1,
16
+ "pad_type_id": 0,
17
+ "pad_token": "<pad>"
18
+ },
19
  "added_tokens": [
20
  {
21
  "id": 0,