cedricbonhomme commited on
Commit
678bead
·
verified ·
1 Parent(s): fc530b2

End of training

Browse files
Files changed (4) hide show
  1. README.md +37 -156
  2. config.json +1 -1
  3. emissions.csv +1 -1
  4. model.safetensors +1 -1
README.md CHANGED
@@ -1,118 +1,50 @@
1
  ---
2
  library_name: transformers
3
- license: cc-by-4.0
4
  base_model: roberta-base
5
- metrics:
6
- - accuracy
7
- - f1
8
  tags:
9
  - generated_from_trainer
10
- - text-classification
11
- - classification
12
- - nlp
13
- - vulnerability
14
- datasets:
15
- - CIRCL/vulnerability-scores
16
  model-index:
17
  - name: vulnerability-severity-classification-roberta-base
18
- results:
19
- - task:
20
- type: text-classification
21
- name: Vulnerability severity classification
22
- dataset:
23
- type: CIRCL/vulnerability-scores
24
- name: CIRCL/vulnerability-scores
25
- split: test
26
- revision: 55a886a483bb27aabb6461edc64e8058cc136e24
27
- metrics:
28
- - type: accuracy
29
- value: 0.7415
30
- name: Accuracy
31
- - type: f1
32
- value: 0.6460
33
- name: F1 Macro
34
- args:
35
- average: macro
36
  ---
37
 
38
-
39
- # VLAI: A RoBERTa-Based Model for Automated Vulnerability Severity Classification
40
-
41
- ## Severity classification
42
-
43
- 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).
44
-
45
- 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)].
46
-
47
- **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.
48
-
49
- > **Note (October 2026):** since [VulnTrain 3.4.0](https://github.com/vulnerability-lookup/VulnTrain/releases/tag/v3.4.0),
50
- > the dataset is split so that records of the same vulnerability (for example a CVE and its
51
- > GitHub advisory) never appear in both train and test. Accuracy measured this way (**74%**)
52
- > reflects performance on vulnerabilities the model has never seen. Earlier figures, including
53
- > the one in the abstract above, were measured on a split where many test descriptions also
54
- > appeared in training. Details in the technical report
55
- > [Improving vulnerability-scores: Leakage-Free Splits and Consistent CVSS 4.0 Scoring](https://doi.org/10.5281/zenodo.23760802).
56
-
57
- You can read [this page](https://www.vulnerability-lookup.org/user-manual/ai/) for more information.
58
-
 
59
 
60
  ## Model description
61
 
62
- It is a classification model and is aimed to assist in classifying vulnerabilities by severity based on their descriptions.
63
-
64
- Labels:
65
-
66
- | Label | CVSS score |
67
- |-------|------------|
68
- | Low | < 4.0 |
69
- | Medium | 4.0 – 6.9 |
70
- | High | 7.0 – 8.9 |
71
- | Critical | ≥ 9.0 |
72
-
73
- ## How to get started with the model
74
 
75
- ```python
76
- from transformers import AutoModelForSequenceClassification, AutoTokenizer
77
- import torch
78
 
79
- model_name = "CIRCL/vulnerability-severity-classification-roberta-base"
80
- revision = "064daa2"
81
- tokenizer = AutoTokenizer.from_pretrained(model_name, revision=revision)
82
- model = AutoModelForSequenceClassification.from_pretrained(model_name, revision=revision)
83
- model.eval()
84
 
85
- test_description = "SAP NetWeaver Visual Composer Metadata Uploader is not protected with a proper authorization, allowing unauthenticated agent to upload potentially malicious executable binaries \
86
- that could severely harm the host system. This could significantly affect the confidentiality, integrity, and availability of the targeted system."
87
- inputs = tokenizer(test_description, return_tensors="pt", truncation=True, padding=True)
88
 
89
- # Run inference
90
- with torch.no_grad():
91
- outputs = model(**inputs)
92
- predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
93
-
94
- # Print results
95
- print("Predictions:", predictions)
96
- predicted_class = torch.argmax(predictions, dim=-1).item()
97
- print("Predicted severity:", model.config.id2label[predicted_class])
98
- ```
99
-
100
- ## Training data
101
-
102
- Revision [`55a886a`](https://huggingface.co/datasets/CIRCL/vulnerability-scores/tree/55a886a483bb27aabb6461edc64e8058cc136e24)
103
- of [CIRCL/vulnerability-scores](https://huggingface.co/datasets/CIRCL/vulnerability-scores),
104
- built with VulnTrain 3.4.0 from CVE records, GitHub, PySec and CSAF (Red Hat, Cisco, CISA) advisories:
105
-
106
- | Split | Rows | Labelled rows |
107
- |-------|-----:|--------------:|
108
- | train | 670,283 | 567,964 |
109
- | validation | 83,550 | 71,470 |
110
- | test | 83,376 | 70,472 |
111
-
112
- - **Group-aware split (80/10/10).** Rows that share a description, an identifier or an alias are
113
- kept in the same split, so no vulnerability appears in both train and test.
114
- - **Labels** come from the first available CVSS score, in the order v4.0, v3.1, v3.0, v2.0.
115
- CVSS 4.0 scores are read with base metrics only (CVSS-B), whatever the source.
116
 
117
  ## Training procedure
118
 
@@ -127,71 +59,20 @@ The following hyperparameters were used during training:
127
  - lr_scheduler_type: linear
128
  - num_epochs: 5
129
 
130
- The checkpoint with the best validation accuracy (epoch 4) is the one published.
131
-
132
- Training took 4 h 25 min on 4 × NVIDIA L40S and used 4.61 kWh, for 0.48 kg CO₂eq
133
- (measured with CodeCarbon, see [`emissions.csv`](emissions.csv)).
134
-
135
- ### Results
136
-
137
- Evaluated once on the leakage-free test split of
138
- [CIRCL/vulnerability-scores](https://huggingface.co/datasets/CIRCL/vulnerability-scores/tree/55a886a483bb27aabb6461edc64e8058cc136e24)
139
- (revision `55a886a`, 70,472 labelled rows):
140
-
141
- - Accuracy: **0.7415** (95% CI 0.7383 – 0.7447)
142
- - F1 Macro: 0.6460
143
-
144
- | Class | Precision | Recall | F1 |
145
- |-------|----------:|-------:|---:|
146
- | Low | 0.6146 | 0.3280 | 0.4278 |
147
- | Medium | 0.7767 | 0.8251 | 0.8002 |
148
- | High | 0.7328 | 0.7237 | 0.7282 |
149
- | Critical | 0.6460 | 0.6107 | 0.6279 |
150
-
151
  ### Training results
152
 
153
- Validation metrics at each epoch:
154
-
155
  | 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 |
156
  |:-------------:|:-----:|:-----:|:---------------:|:--------:|:--------:|:-------------:|:----------:|:------:|:----------------:|:-------------:|:---------:|:--------------:|:-----------:|:-------:|:------------------:|:---------------:|:-----------:|
157
- | 2.5082 | 1.0 | 17749 | 2.7143 | 0.7229 | 0.6180 | 0.6764 | 0.2567 | 0.3722 | 0.8047 | 0.7647 | 0.7842 | 0.6872 | 0.7424 | 0.7137 | 0.5700 | 0.6374 | 0.6018 |
158
- | 2.3903 | 2.0 | 35498 | 2.5364 | 0.7437 | 0.6474 | 0.6961 | 0.3085 | 0.4275 | 0.7932 | 0.8130 | 0.8030 | 0.7202 | 0.7355 | 0.7277 | 0.6314 | 0.6317 | 0.6316 |
159
- | 1.8962 | 3.0 | 53247 | 2.6291 | 0.7461 | 0.6624 | 0.5688 | 0.4115 | 0.4775 | 0.7755 | 0.8330 | 0.8032 | 0.7455 | 0.7106 | 0.7276 | 0.6600 | 0.6234 | 0.6412 |
160
- | 1.8782 | 4.0 | 70996 | 2.7383 | 0.7500 | 0.6608 | 0.6555 | 0.3622 | 0.4665 | 0.7892 | 0.8279 | 0.8081 | 0.7315 | 0.7352 | 0.7333 | 0.6601 | 0.6120 | 0.6351 |
161
- | 1.4131 | 5.0 | 88745 | 3.0105 | 0.7457 | 0.6639 | 0.5635 | 0.4309 | 0.4884 | 0.7916 | 0.8126 | 0.8019 | 0.7271 | 0.7365 | 0.7317 | 0.6589 | 0.6101 | 0.6336 |
162
-
163
- ### Previous versions
164
 
165
- The previous model, trained on the earlier random split, is revision
166
- [`10d9861`](https://huggingface.co/CIRCL/vulnerability-severity-classification-roberta-base/tree/10d9861)
167
- (dataset revision `34e6a14`, test accuracy 81.17%, 73.02% on the test rows without a twin in train).
168
 
169
  ### Framework versions
170
 
171
- - Transformers 5.21.0
172
  - Pytorch 2.15.0+cu132
173
  - Datasets 4.8.5
174
  - Tokenizers 0.23.3
175
-
176
- ## Citation
177
-
178
- ```bibtex
179
- @article{bonhomme2025vlai,
180
- title = {{VLAI}: A {RoBERTa}-Based Model for Automated Vulnerability
181
- Severity Classification},
182
- author = {Bonhomme, C{\'e}dric and Dulaunoy, Alexandre},
183
- journal = {arXiv preprint arXiv:2507.03607},
184
- year = {2025}
185
- }
186
-
187
- @techreport{bonhomme2026vulnscores,
188
- title = {Improving vulnerability-scores: Leakage-Free Splits and
189
- Consistent {CVSS} 4.0 Scoring},
190
- author = {Bonhomme, C{\'e}dric},
191
- institution = {CIRCL - Computer Incident Response Center Luxembourg},
192
- year = {2026},
193
- month = oct,
194
- doi = {10.5281/zenodo.23760802},
195
- url = {https://doi.org/10.5281/zenodo.23760802}
196
- }
197
- ```
 
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: 3.0881
22
+ - Accuracy: 0.7477
23
+ - F1 Macro: 0.6619
24
+ - Low Precision: 0.5404
25
+ - Low Recall: 0.4261
26
+ - Low F1: 0.4765
27
+ - Medium Precision: 0.7953
28
+ - Medium Recall: 0.8114
29
+ - Medium F1: 0.8033
30
+ - High Precision: 0.7300
31
+ - High Recall: 0.7469
32
+ - High F1: 0.7384
33
+ - Critical Precision: 0.6604
34
+ - Critical Recall: 0.6015
35
+ - Critical F1: 0.6296
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.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 |
67
+ | 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 |
68
+ | 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 |
69
+ | 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 |
70
+ | 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 |
 
 
71
 
 
 
 
72
 
73
  ### Framework versions
74
 
75
+ - Transformers 5.22.2
76
  - Pytorch 2.15.0+cu132
77
  - Datasets 4.8.5
78
  - Tokenizers 0.23.3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.21.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.22.2",
38
  "type_vocab_size": 1,
39
  "use_cache": true,
40
  "vocab_size": 50265
emissions.csv CHANGED
@@ -1,2 +1,2 @@
1
  timestamp,project_name,run_id,experiment_id,duration,emissions,emissions_rate,cpu_power,gpu_power,ram_power,cpu_energy,gpu_energy,ram_energy,energy_consumed,water_consumed,country_name,country_iso_code,region,cloud_provider,cloud_region,os,python_version,codecarbon_version,cpu_count,cpu_model,gpu_count,gpu_model,longitude,latitude,ram_total_size,tracking_mode,cpu_utilization_percent,gpu_utilization_percent,ram_utilization_percent,ram_used_gb,on_cloud,pue,wue
2
- 2026-10-29T18:04:54,VulnTrain,a0de6b0a-1c64-47a0-ac0e-f7afb09977be,5b0fa12a-3dd7-45bb-9766-cc326314d9f1,15907.370135360998,0.48498217400176347,3.04878914537659e-05,70.00019464846667,903.8459795071008,70.0,0.30927252797905813,3.989522156337392,0.30854287970663974,4.607337564023099,0.0,Luxembourg,LUX,luxembourg,,,Linux-6.8.0-147-generic-x86_64-with-glibc2.39,3.12.3,3.3.2,224,Intel(R) Xeon(R) Platinum 8480+,4,4 x NVIDIA L40S,6.1327,49.6098,2015.3354148864746,machine,0.693132613772644,77.6417187401376,1.0988322918639148,21.301271207569027,N,1.0,0.0
 
1
  timestamp,project_name,run_id,experiment_id,duration,emissions,emissions_rate,cpu_power,gpu_power,ram_power,cpu_energy,gpu_energy,ram_energy,energy_consumed,water_consumed,country_name,country_iso_code,region,cloud_provider,cloud_region,os,python_version,codecarbon_version,cpu_count,cpu_model,gpu_count,gpu_model,longitude,latitude,ram_total_size,tracking_mode,cpu_utilization_percent,gpu_utilization_percent,ram_utilization_percent,ram_used_gb,on_cloud,pue,wue
2
+ 2026-11-13T16:33:32,VulnTrain,fa63d08b-de15-4b04-9d1f-2657c1449f00,5b0fa12a-3dd7-45bb-9766-cc326314d9f1,16333.030918859999,0.49822975988256707,3.050442764467271e-05,70.00019598784039,904.829317126947,70.0,0.31755006313886025,4.098892778556039,0.31674697697422527,4.733189818669112,0.0,Luxembourg,LUX,luxembourg,,,Linux-6.8.0-149-generic-x86_64-with-glibc2.39,3.12.3,3.3.2,224,Intel(R) Xeon(R) Platinum 8480+,4,4 x NVIDIA L40S,6.1327,49.6098,2015.3354415893555,machine,0.6936078672403196,77.62334050399508,1.0999877074370008,21.564408882952353,N,1.0,0.0
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7cd9b113688bcc19f36735492ca2c59c798e5463246b405e3d7e2780f991ebb8
3
  size 498618976
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:264e93c8df795b1dc66459bae6bf178bad6b30b7c5b553ca25ea49b251cfcae4
3
  size 498618976