Commit
·
c2cbb97
1
Parent(s):
b543426
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,24 @@
|
|
1 |
---
|
2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
+
tags:
|
4 |
+
- Text Classification
|
5 |
+
- Transformers
|
6 |
+
- PyTorch
|
7 |
+
- JAX
|
8 |
+
- MSR
|
9 |
+
- English
|
10 |
+
- roberta
|
11 |
+
- Inference Endpoints
|
12 |
+
metrics:
|
13 |
+
- accuracy
|
14 |
+
pipeline_tag: text-classification
|
15 |
---
|
16 |
+
|
17 |
+
I finetuned a RobertaForSequenceClassification model which is initialized
|
18 |
+
from CodeBert [https://huggingface.co/microsoft/codebert-base] to judge whether a code is vulnerable or not.
|
19 |
+
I selected balanced samples from MSR dataset [https://github.com/ZeoVan/MSR_20_Code_vulnerability_CSV_Dataset] for training, validation, and testing.
|
20 |
+
The "func_before" is used for code classification. All the data is in the file "msr.csv".
|
21 |
+
Funcs shorter than 50 or longer than 512 (The CodeBert window size) are dropped.
|
22 |
+
|
23 |
+
Test Reulsts:
|
24 |
+
acc 0.7022935779816514, f1 0.6482384823848238, precision 0.7920529801324503, recall 0.5486238532110091
|