NourFakih commited on
Commit
b220cef
·
verified ·
1 Parent(s): f3e03e1

Upload folder using huggingface_hub

Browse files
training_artifacts/README.md ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # microsoft/codebert-base Script Detector
2
+
3
+ ## Summary
4
+
5
+ | Field | Value |
6
+ | --- | --- |
7
+ | Base model | `microsoft/codebert-base` |
8
+ | Phase | `phase1` |
9
+ | Target repo | `HID-APP/script-detector-microsoft-codebert-base` |
10
+ | Datasets | `HID-APP/All-combined` |
11
+ | Text column | `text` |
12
+ | Epochs | 3.0000 |
13
+ | Max length | 512 |
14
+ | Train batch size | 4 |
15
+ | Eval batch size | 8 |
16
+ | Gradient accumulation steps | 4 |
17
+ | Learning rate | 0.0000 |
18
+ | Precision | fp16 |
19
+ | Optimizer | adamw_torch |
20
+ | Dataloader workers | 0 |
21
+ | Gradient checkpointing | False |
22
+ | Group by length | True |
23
+ | LoRA enabled | False |
24
+
25
+ ## Dataset Sources
26
+
27
+ | Source | Type | Revision | Fingerprint |
28
+ | --- | --- | --- | --- |
29
+ | HID-APP/All-combined | huggingface | default | 81f16d3fdbb4f97d3574f5c78bce8ada7b15c9ccd625913daa095cae6d545d67 |
30
+
31
+ ## Training And Validation History
32
+
33
+ | Epoch | Step | Train Loss | Eval Loss | Accuracy | Precision | Recall | F1 |
34
+ | --- | --- | --- | --- | --- | --- | --- | --- |
35
+ | 1.0000 | 373 | 3.2531 | | | | | |
36
+ | 1.0000 | 373 | | 0.5277 | 0.8353 | 0.8144 | 0.9806 | 0.8898 |
37
+ | 2.0000 | 746 | 2.7352 | | | | | |
38
+ | 2.0000 | 746 | | 0.5214 | 0.8291 | 0.8015 | 0.9943 | 0.8875 |
39
+ | 3.0000 | 1119 | 2.6190 | | | | | |
40
+ | 3.0000 | 1119 | | 0.5194 | 0.8360 | 0.8383 | 0.9396 | 0.8860 |
41
+
42
+ ## Final Test Summary
43
+
44
+ | Split | Accuracy | Malicious Precision | Malicious Recall | Malicious F1 | Loss |
45
+ | --- | --- | --- | --- | --- | --- |
46
+ | test | 0.7846 | 0.7636 | 0.9598 | 0.8505 | 0.7020 |
47
+
48
+ ## Final Test Classification Report
49
+
50
+ | Class | Precision | Recall | F1 | Support |
51
+ | --- | --- | --- | --- | --- |
52
+ | benign | 0.8701 | 0.4753 | 0.6147 | 465.0000 |
53
+ | malicious | 0.7636 | 0.9598 | 0.8505 | 821.0000 |
54
+ | macro avg | 0.8168 | 0.7175 | 0.7326 | 1286.0000 |
55
+ | weighted avg | 0.8021 | 0.7846 | 0.7653 | 1286.0000 |
56
+ | accuracy | | | 0.7846 | |
57
+
58
+ ## Final Test Confusion Matrix
59
+
60
+ | | Pred benign | Pred malicious |
61
+ | --- | --- | --- |
62
+ | Actual benign | 221 | 244 |
63
+ | Actual malicious | 33 | 788 |
64
+
65
+ ## Final Test Grouped By Original Sample
66
+
67
+ Chunk rows: `1286`; original samples: `1286`.
68
+
69
+ | Pooling | Original Samples | Accuracy | Malicious Precision | Malicious Recall | Malicious F1 |
70
+ | --- | --- | --- | --- | --- | --- |
71
+ | max_pool | 1286 | 0.7846 | 0.7636 | 0.9598 | 0.8505 |
72
+ | mean_pool | 1286 | 0.7846 | 0.7636 | 0.9598 | 0.8505 |
training_artifacts/metrics.json ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model": "microsoft/codebert-base",
3
+ "phase": "phase1",
4
+ "dataset_sources": [
5
+ {
6
+ "source": "HID-APP/All-combined",
7
+ "revision": "default",
8
+ "type": "huggingface",
9
+ "fingerprint": "81f16d3fdbb4f97d3574f5c78bce8ada7b15c9ccd625913daa095cae6d545d67"
10
+ }
11
+ ],
12
+ "text_column": "text",
13
+ "test_metrics": {
14
+ "test_loss": 0.7019847631454468,
15
+ "test_accuracy": 0.7846034214618973,
16
+ "test_precision": 0.7635658914728682,
17
+ "test_recall": 0.9598051157125457,
18
+ "test_f1": 0.850512682137075,
19
+ "test_runtime": 25.7657,
20
+ "test_samples_per_second": 49.911,
21
+ "test_steps_per_second": 3.144
22
+ },
23
+ "classification_report": {
24
+ "benign": {
25
+ "precision": 0.8700787401574803,
26
+ "recall": 0.4752688172043011,
27
+ "f1-score": 0.6147426981919333,
28
+ "support": 465.0
29
+ },
30
+ "malicious": {
31
+ "precision": 0.7635658914728682,
32
+ "recall": 0.9598051157125457,
33
+ "f1-score": 0.850512682137075,
34
+ "support": 821.0
35
+ },
36
+ "accuracy": 0.7846034214618973,
37
+ "macro avg": {
38
+ "precision": 0.8168223158151743,
39
+ "recall": 0.7175369664584234,
40
+ "f1-score": 0.7326276901645041,
41
+ "support": 1286.0
42
+ },
43
+ "weighted avg": {
44
+ "precision": 0.8020794798386106,
45
+ "recall": 0.7846034214618973,
46
+ "f1-score": 0.7652614826545782,
47
+ "support": 1286.0
48
+ }
49
+ },
50
+ "confusion_matrix": [
51
+ [
52
+ 221,
53
+ 244
54
+ ],
55
+ [
56
+ 33,
57
+ 788
58
+ ]
59
+ ],
60
+ "grouped_by_original_sample": {
61
+ "group_count": 1286,
62
+ "chunk_count": 1286,
63
+ "max_pool": {
64
+ "classification_report": {
65
+ "benign": {
66
+ "precision": 0.8700787401574803,
67
+ "recall": 0.4752688172043011,
68
+ "f1-score": 0.6147426981919333,
69
+ "support": 465.0
70
+ },
71
+ "malicious": {
72
+ "precision": 0.7635658914728682,
73
+ "recall": 0.9598051157125457,
74
+ "f1-score": 0.850512682137075,
75
+ "support": 821.0
76
+ },
77
+ "accuracy": 0.7846034214618973,
78
+ "macro avg": {
79
+ "precision": 0.8168223158151743,
80
+ "recall": 0.7175369664584234,
81
+ "f1-score": 0.7326276901645041,
82
+ "support": 1286.0
83
+ },
84
+ "weighted avg": {
85
+ "precision": 0.8020794798386106,
86
+ "recall": 0.7846034214618973,
87
+ "f1-score": 0.7652614826545782,
88
+ "support": 1286.0
89
+ }
90
+ },
91
+ "confusion_matrix": [
92
+ [
93
+ 221,
94
+ 244
95
+ ],
96
+ [
97
+ 33,
98
+ 788
99
+ ]
100
+ ]
101
+ },
102
+ "mean_pool": {
103
+ "classification_report": {
104
+ "benign": {
105
+ "precision": 0.8700787401574803,
106
+ "recall": 0.4752688172043011,
107
+ "f1-score": 0.6147426981919333,
108
+ "support": 465.0
109
+ },
110
+ "malicious": {
111
+ "precision": 0.7635658914728682,
112
+ "recall": 0.9598051157125457,
113
+ "f1-score": 0.850512682137075,
114
+ "support": 821.0
115
+ },
116
+ "accuracy": 0.7846034214618973,
117
+ "macro avg": {
118
+ "precision": 0.8168223158151743,
119
+ "recall": 0.7175369664584234,
120
+ "f1-score": 0.7326276901645041,
121
+ "support": 1286.0
122
+ },
123
+ "weighted avg": {
124
+ "precision": 0.8020794798386106,
125
+ "recall": 0.7846034214618973,
126
+ "f1-score": 0.7652614826545782,
127
+ "support": 1286.0
128
+ }
129
+ },
130
+ "confusion_matrix": [
131
+ [
132
+ 221,
133
+ 244
134
+ ],
135
+ [
136
+ 33,
137
+ 788
138
+ ]
139
+ ]
140
+ }
141
+ }
142
+ }
training_artifacts/training_log_history.json ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "log_history": [
3
+ {
4
+ "loss": 3.253069430190181,
5
+ "grad_norm": 8.451900482177734,
6
+ "learning_rate": 1.3351206434316355e-05,
7
+ "epoch": 1.0,
8
+ "step": 373
9
+ },
10
+ {
11
+ "eval_loss": 0.5276884436607361,
12
+ "eval_accuracy": 0.8352668213457076,
13
+ "eval_precision": 0.8143939393939394,
14
+ "eval_recall": 0.9806157354618016,
15
+ "eval_f1": 0.8898085876875323,
16
+ "eval_runtime": 26.2521,
17
+ "eval_samples_per_second": 49.253,
18
+ "eval_steps_per_second": 3.085,
19
+ "epoch": 1.0,
20
+ "step": 373
21
+ },
22
+ {
23
+ "loss": 2.735222946862433,
24
+ "grad_norm": 5.377457141876221,
25
+ "learning_rate": 6.684539767649688e-06,
26
+ "epoch": 2.0,
27
+ "step": 746
28
+ },
29
+ {
30
+ "eval_loss": 0.5213587880134583,
31
+ "eval_accuracy": 0.8290796597061099,
32
+ "eval_precision": 0.8014705882352942,
33
+ "eval_recall": 0.9942987457240593,
34
+ "eval_f1": 0.8875318066157761,
35
+ "eval_runtime": 26.0805,
36
+ "eval_samples_per_second": 49.577,
37
+ "eval_steps_per_second": 3.106,
38
+ "epoch": 2.0,
39
+ "step": 746
40
+ },
41
+ {
42
+ "loss": 2.6189828826658847,
43
+ "grad_norm": 8.425128936767578,
44
+ "learning_rate": 1.7873100983020556e-08,
45
+ "epoch": 3.0,
46
+ "step": 1119
47
+ },
48
+ {
49
+ "eval_loss": 0.5193805694580078,
50
+ "eval_accuracy": 0.8360402165506574,
51
+ "eval_precision": 0.8382502543234995,
52
+ "eval_recall": 0.9395667046750285,
53
+ "eval_f1": 0.886021505376344,
54
+ "eval_runtime": 25.9863,
55
+ "eval_samples_per_second": 49.757,
56
+ "eval_steps_per_second": 3.117,
57
+ "epoch": 3.0,
58
+ "step": 1119
59
+ },
60
+ {
61
+ "train_runtime": 2705.0358,
62
+ "train_samples_per_second": 13.211,
63
+ "train_steps_per_second": 0.414,
64
+ "total_flos": 9402536674344960.0,
65
+ "train_loss": 2.8690917532394997,
66
+ "epoch": 3.0,
67
+ "step": 1119
68
+ }
69
+ ]
70
+ }