KRISHNAPURI commited on
Commit
4e99f65
·
verified ·
1 Parent(s): bde0621

add reports/training_report_real.json

Browse files
Files changed (1) hide show
  1. reports/training_report_real.json +839 -0
reports/training_report_real.json ADDED
@@ -0,0 +1,839 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "generated_at": "2026-09-02T05:09:46.017444+00:00",
3
+ "epochs": 5,
4
+ "rl_episodes": 40,
5
+ "real_datasets": true,
6
+ "datasets_used": {
7
+ "code_corpus": 13973,
8
+ "tls_hosts": 277,
9
+ "vendor_records": 16
10
+ },
11
+ "results": [
12
+ {
13
+ "model": "discovery/CryptoCodeDetector",
14
+ "status": "trained",
15
+ "seconds": 283.51,
16
+ "train": {
17
+ "epochs": 5,
18
+ "examples": 11558,
19
+ "label_distribution": {
20
+ "DATAFLOW": 3,
21
+ "AES-256": 19,
22
+ "RSA": 110,
23
+ "RSA/ECC": 885,
24
+ "UNKNOWN": 173,
25
+ "LIB": 2188,
26
+ "HASH": 567,
27
+ "AES": 288,
28
+ "CERT": 618,
29
+ "PQC": 313,
30
+ "SHA-256": 17,
31
+ "HMAC-SHA256": 1,
32
+ "SHA": 82,
33
+ "CRYPTOLIB": 36,
34
+ "LIBSODIUM": 205,
35
+ "MODE": 13,
36
+ "ML-KEM-768": 1,
37
+ "ML-DSA-65": 1,
38
+ "Ed25519": 1,
39
+ "WRAPPER": 7,
40
+ "hash": 12,
41
+ "sign": 1,
42
+ "SHA3-256": 224,
43
+ "ECDSA": 14
44
+ },
45
+ "per_language_bias": {
46
+ "python": -0.01296829971181557,
47
+ "shell": 0.03872053872053872,
48
+ "rust": -0.04770755885997523,
49
+ "go": -0.06091030789825971,
50
+ "c": 0.04267100977198698,
51
+ "javascript": -0.1504005826656956,
52
+ "java": 0.0936443542934415,
53
+ "csharp": 0.16626065773447016,
54
+ "php": -0.08317872603586891,
55
+ "cpp": 0.05126903553299493,
56
+ "swift": 0.16666666666666669,
57
+ "typescript": -0.16086956521739132,
58
+ "solidity": -0.02595296025952961
59
+ },
60
+ "has_torch": true,
61
+ "has_transformers": true,
62
+ "note": "fallback path (no transformers/GPU); priors populated deterministically \u2014 use fine_tune() for the real CodeBERTa fine-tune",
63
+ "torch_available": true,
64
+ "simulated_loss": 0.532,
65
+ "_fine_tune": {
66
+ "status": "trained",
67
+ "model": "huggingface/CodeBERTa-small-v1",
68
+ "device": "cuda",
69
+ "epochs": 4,
70
+ "examples": 11558,
71
+ "batch_size": 24,
72
+ "train_accuracy": 0.9686,
73
+ "final_loss": 0.0774,
74
+ "gpus_visible": 1,
75
+ "saved_to": "/home/nvidia/Project/qtrust_ai/artifacts/crypto_codebert"
76
+ },
77
+ "_eval": {
78
+ "precision": 0.952,
79
+ "recall": 0.953,
80
+ "f1": 0.9525,
81
+ "accuracy": 0.9271,
82
+ "false_negatives": 87,
83
+ "fn_rate": 0.047,
84
+ "coverage": 1.0,
85
+ "n": 2415,
86
+ "per_language": {
87
+ "swift": {
88
+ "tp": 48,
89
+ "fp": 29,
90
+ "fn": 0,
91
+ "tn": 35
92
+ },
93
+ "shell": {
94
+ "tp": 11,
95
+ "fp": 2,
96
+ "fn": 3,
97
+ "tn": 5
98
+ },
99
+ "c": {
100
+ "tp": 1507,
101
+ "fp": 35,
102
+ "fn": 53,
103
+ "tn": 93
104
+ },
105
+ "cpp": {
106
+ "tp": 83,
107
+ "fp": 0,
108
+ "fn": 1,
109
+ "tn": 2
110
+ },
111
+ "go": {
112
+ "tp": 42,
113
+ "fp": 4,
114
+ "fn": 8,
115
+ "tn": 17
116
+ },
117
+ "python": {
118
+ "tp": 12,
119
+ "fp": 4,
120
+ "fn": 13,
121
+ "tn": 35
122
+ },
123
+ "java": {
124
+ "tp": 0,
125
+ "fp": 11,
126
+ "fn": 0,
127
+ "tn": 84
128
+ },
129
+ "solidity": {
130
+ "tp": 63,
131
+ "fp": 3,
132
+ "fn": 8,
133
+ "tn": 201
134
+ },
135
+ "javascript": {
136
+ "tp": 0,
137
+ "fp": 1,
138
+ "fn": 0,
139
+ "tn": 0
140
+ },
141
+ "rust": {
142
+ "tp": 0,
143
+ "fp": 0,
144
+ "fn": 1,
145
+ "tn": 1
146
+ }
147
+ }
148
+ },
149
+ "_n_real": 11558
150
+ },
151
+ "evaluate": null,
152
+ "anchors": [
153
+ {
154
+ "check": "RSA snippet \u2192 crypto",
155
+ "passed": true
156
+ }
157
+ ],
158
+ "data_source": "real"
159
+ },
160
+ {
161
+ "model": "discovery/AlgorithmPurposeClassifier",
162
+ "status": "trained",
163
+ "seconds": 5.4,
164
+ "train": {
165
+ "examples": 935,
166
+ "distribution": {
167
+ "signature": 515,
168
+ "encryption": 98,
169
+ "hashing": 242,
170
+ "key-establishment": 80
171
+ },
172
+ "has_sklearn": true,
173
+ "classes": [
174
+ "key-establishment",
175
+ "signature",
176
+ "encryption",
177
+ "hashing",
178
+ "randomness",
179
+ "certificate_handling"
180
+ ],
181
+ "epochs": 5,
182
+ "note": "sklearn TF-IDF+LogReg if available; else deterministic fallback",
183
+ "_eval": {
184
+ "accuracy": 1.0,
185
+ "macro_f1": 0.6667,
186
+ "sklearn_macro_f1": 1.0,
187
+ "per_purpose": {
188
+ "key-establishment": {
189
+ "precision": 1.0,
190
+ "recall": 1.0,
191
+ "f1": 1.0,
192
+ "support": 23
193
+ },
194
+ "signature": {
195
+ "precision": 1.0,
196
+ "recall": 1.0,
197
+ "f1": 1.0,
198
+ "support": 142
199
+ },
200
+ "encryption": {
201
+ "precision": 1.0,
202
+ "recall": 1.0,
203
+ "f1": 1.0,
204
+ "support": 41
205
+ },
206
+ "hashing": {
207
+ "precision": 1.0,
208
+ "recall": 1.0,
209
+ "f1": 1.0,
210
+ "support": 88
211
+ },
212
+ "randomness": {
213
+ "precision": 0.0,
214
+ "recall": 0.0,
215
+ "f1": 0.0,
216
+ "support": 0
217
+ },
218
+ "certificate_handling": {
219
+ "precision": 0.0,
220
+ "recall": 0.0,
221
+ "f1": 0.0,
222
+ "support": 0
223
+ }
224
+ },
225
+ "n": 294,
226
+ "has_sklearn": true
227
+ },
228
+ "_n_real": 935
229
+ },
230
+ "evaluate": null,
231
+ "anchors": [
232
+ {
233
+ "check": "RSA(sign ctx)\u2192signature, ECDH\u2192key-establishment",
234
+ "passed": true
235
+ }
236
+ ],
237
+ "data_source": "real"
238
+ },
239
+ {
240
+ "model": "graph/BlastRadius (calibrate)",
241
+ "status": "trained",
242
+ "seconds": 0.0,
243
+ "train": {
244
+ "temperature": 0.5,
245
+ "mae_before": 27.5,
246
+ "mae_after": 3.24,
247
+ "n": 1,
248
+ "_rsa": 0.09,
249
+ "_mlkem": 0.01
250
+ },
251
+ "evaluate": null,
252
+ "anchors": [
253
+ {
254
+ "check": "RSA blast (0) > ML-KEM (0)",
255
+ "passed": true
256
+ }
257
+ ],
258
+ "data_source": "synthetic"
259
+ },
260
+ {
261
+ "model": "graph/TemporalGNN",
262
+ "status": "trained",
263
+ "seconds": 14.99,
264
+ "train": {
265
+ "examples": 301,
266
+ "mae": 4.018,
267
+ "conformal_margin": 7.91,
268
+ "has_torch": true,
269
+ "hidden_dim": 64,
270
+ "_eval": {
271
+ "mae": 4.145,
272
+ "rmse": 4.946,
273
+ "mae_per_horizon": {
274
+ "30": 4.064,
275
+ "90": 2.531,
276
+ "180": 5.839
277
+ },
278
+ "n": 201,
279
+ "has_torch": true,
280
+ "conformal_margin": 7.91
281
+ }
282
+ },
283
+ "evaluate": null,
284
+ "anchors": [
285
+ {
286
+ "check": "73 \u2192 61 \u2192 50 \u2192 42 (30/90/180d)",
287
+ "passed": true
288
+ }
289
+ ],
290
+ "data_source": "synthetic"
291
+ },
292
+ {
293
+ "model": "risk/QuantumExposureModel",
294
+ "status": "trained",
295
+ "seconds": 0.33,
296
+ "train": {
297
+ "examples": 277,
298
+ "factor_weights": {
299
+ "vuln": 1.0,
300
+ "sensitivity": 1.0,
301
+ "lifetime": 1.0,
302
+ "exposure": 1.0,
303
+ "attractiveness": 1.0,
304
+ "lead_time": 1.0
305
+ },
306
+ "temperature": 1.0,
307
+ "mae": 0.0,
308
+ "conformal_margin": 0.0,
309
+ "conformal_alpha": 0.1,
310
+ "has_sklearn": true,
311
+ "note": "stub does random-search weight fitting + temp scaling + conformal; real training would use MLP/GBM",
312
+ "_eval": {
313
+ "mae": 0.0,
314
+ "rmse": 0.0,
315
+ "brier": 0.0,
316
+ "ece": 0.0,
317
+ "auroc": null,
318
+ "auprc": null,
319
+ "n": 277,
320
+ "by_level_mae": {
321
+ "CRITICAL": 0.0,
322
+ "HIGH": 0.0,
323
+ "MEDIUM": null,
324
+ "LOW": null,
325
+ "NONE": null
326
+ },
327
+ "has_sklearn": true,
328
+ "temperature": 1.0,
329
+ "conformal_margin": 0.0
330
+ },
331
+ "_n_real": 277
332
+ },
333
+ "evaluate": null,
334
+ "anchors": [
335
+ {
336
+ "check": "RSA-2048 97[CRITICAL] vs ML-KEM 0[NONE]",
337
+ "passed": true
338
+ }
339
+ ],
340
+ "data_source": "real"
341
+ },
342
+ {
343
+ "model": "migration/PQCRecommender",
344
+ "status": "trained",
345
+ "seconds": 3.97,
346
+ "train": {
347
+ "examples": 935,
348
+ "classes": [
349
+ "key-establishment",
350
+ "signature",
351
+ "encryption",
352
+ "hashing",
353
+ "randomness",
354
+ "certificate_handling"
355
+ ],
356
+ "has_sklearn": true,
357
+ "epochs": 5,
358
+ "note": "recommend() is rule-based; train() fits auxiliary purpose classifier",
359
+ "_n_real": 935,
360
+ "_eval": {
361
+ "accuracy": 1.0,
362
+ "correct": 200,
363
+ "n": 200,
364
+ "per_purpose": {
365
+ "key-establishment": {
366
+ "accuracy": 1.0,
367
+ "correct": 56,
368
+ "total": 56
369
+ },
370
+ "hashing": {
371
+ "accuracy": 1.0,
372
+ "correct": 25,
373
+ "total": 25
374
+ },
375
+ "signature": {
376
+ "accuracy": 1.0,
377
+ "correct": 87,
378
+ "total": 87
379
+ },
380
+ "encryption": {
381
+ "accuracy": 1.0,
382
+ "correct": 32,
383
+ "total": 32
384
+ }
385
+ },
386
+ "has_sklearn": true
387
+ }
388
+ },
389
+ "evaluate": null,
390
+ "anchors": [
391
+ {
392
+ "check": "RSA-sig\u2192ML-DSA-65, RSA-KEM\u2192ML-KEM-768, AES-128\u2192AES-256",
393
+ "passed": true
394
+ }
395
+ ],
396
+ "data_source": "real"
397
+ },
398
+ {
399
+ "model": "migration/MigrationCostPredictor",
400
+ "status": "trained",
401
+ "seconds": 1.15,
402
+ "train": {
403
+ "examples": 401,
404
+ "weights": {
405
+ "eng": 0.992,
406
+ "test": 0.949,
407
+ "downtime": 1.031
408
+ },
409
+ "mae": 16.094,
410
+ "conformal_margin_hours": 38.2,
411
+ "has_sklearn": true,
412
+ "_eval": {
413
+ "mae_eng": 16.726,
414
+ "rmse_eng": 23.741,
415
+ "mae_test": 6.167,
416
+ "mae_downtime": 0.551,
417
+ "mae_duration": 0.945,
418
+ "n": 201,
419
+ "has_sklearn": true
420
+ }
421
+ },
422
+ "evaluate": null,
423
+ "anchors": [
424
+ {
425
+ "check": "banking-api \u2192 86h eng / 32h test / 12d (spec \u224884/31/12)",
426
+ "passed": true
427
+ }
428
+ ],
429
+ "data_source": "synthetic"
430
+ },
431
+ {
432
+ "model": "migration/MigrationFailurePredictor",
433
+ "status": "trained",
434
+ "seconds": 0.53,
435
+ "train": {
436
+ "examples": 600,
437
+ "weights": {
438
+ "legacy incompatibility": 1.033,
439
+ "library outdated / unsupported PQC": 0.886,
440
+ "cert chain incompatibility": 0.946,
441
+ "hardware unsupported (HSM/TPM/MCU)": 0.934,
442
+ "packet size / MTU overflow": 1.057,
443
+ "latency / timeout exceeded": 1.042,
444
+ "high dependency ripple": 1.094,
445
+ "protocol mismatch / downgrade": 0.901,
446
+ "traffic surge amplifies failure": 0.981,
447
+ "app type fragile (firmware / HSM / banking)": 0.887
448
+ },
449
+ "bias": -1.284,
450
+ "train_accuracy": 0.8217,
451
+ "train_auroc": 0.6432,
452
+ "has_sklearn": true,
453
+ "_eval": {
454
+ "accuracy": 0.79,
455
+ "auroc": 0.5604,
456
+ "auprc": 0.8126,
457
+ "brier": 0.1678,
458
+ "ece": 0.0455,
459
+ "n": 300,
460
+ "has_sklearn": true,
461
+ "threshold": 0.5
462
+ }
463
+ },
464
+ "evaluate": null,
465
+ "anchors": [
466
+ {
467
+ "check": "modern 36% < legacy 93%",
468
+ "passed": true
469
+ }
470
+ ],
471
+ "data_source": "synthetic"
472
+ },
473
+ {
474
+ "model": "migration/InteroperabilityPredictor",
475
+ "status": "trained",
476
+ "seconds": 3.13,
477
+ "train": {
478
+ "examples": 505,
479
+ "bias_compat": 0.15,
480
+ "bias_latency": -0.077,
481
+ "accuracy": 0.9505,
482
+ "latency_mae": 0.934,
483
+ "failure_priors": {
484
+ "none": -1.805,
485
+ "library unsupported PQC": -0.615,
486
+ "protocol does not negotiate PQC": -3.513,
487
+ "version too old for PQ extension": -1.168,
488
+ "packet / MTU overflow": -4.425,
489
+ "HSM/TPM unsupported operation": -4.425,
490
+ "handshake timeout (latency)": -4.425,
491
+ "cert chain validation failure": -4.425,
492
+ "hybrid negotiation mismatch": -4.272,
493
+ "memory exhausted on constrained device": -4.425
494
+ },
495
+ "_eval": {
496
+ "compat_accuracy": 0.9574,
497
+ "latency_mae": 1.096,
498
+ "latency_rmse": 1.377,
499
+ "handshake_brier": 0.0466,
500
+ "auroc": 0.8988,
501
+ "n": 305,
502
+ "has_sklearn": true
503
+ }
504
+ },
505
+ "evaluate": null,
506
+ "anchors": [
507
+ {
508
+ "check": "OpenSSL3+ML-KEM-768 99.2% lat+4.6% (spec 99.1%/+4.8%); legacy 1.1.1 \u2192 incompatible",
509
+ "passed": true
510
+ }
511
+ ],
512
+ "data_source": "synthetic"
513
+ },
514
+ {
515
+ "model": "migration/MultiObjectiveRLAgent",
516
+ "status": "trained",
517
+ "seconds": 7.75,
518
+ "train": {
519
+ "episodes": 40,
520
+ "mean_reward": 0.9312,
521
+ "weights": {
522
+ "w_security": 0.28,
523
+ "w_compliance": 0.18,
524
+ "w_cost": 0.18,
525
+ "w_downtime": 0.14,
526
+ "w_failure": 0.12,
527
+ "w_perf": 0.1,
528
+ "normalize": false
529
+ },
530
+ "has_torch": true,
531
+ "presets_trained": [
532
+ "bank",
533
+ "startup",
534
+ "balanced"
535
+ ],
536
+ "_eval": {
537
+ "mean_reward": 0.995,
538
+ "mean_per_objective": {
539
+ "security": 0.85,
540
+ "compliance": 0.3895,
541
+ "cost": 0.312,
542
+ "downtime": 0.272,
543
+ "failure": 0.1581,
544
+ "perf": 0.3725
545
+ },
546
+ "n": 100,
547
+ "has_torch": true
548
+ },
549
+ "_bank_seq": [
550
+ "payment-api",
551
+ "auth-service",
552
+ "vendor-hsm",
553
+ "web-frontend",
554
+ "cheap-cache"
555
+ ],
556
+ "_startup_seq": [
557
+ "auth-service",
558
+ "payment-api",
559
+ "cheap-cache",
560
+ "web-frontend",
561
+ "vendor-hsm"
562
+ ],
563
+ "_divergence": 0.0
564
+ },
565
+ "evaluate": null,
566
+ "anchors": [
567
+ {
568
+ "check": "bank ['payment-api', 'auth-service', 'vendor-hsm', 'web-frontend', 'cheap-cache'] vs startup ['auth-service', 'payment-api', 'cheap-cache', 'web-frontend', 'vendor-hsm'] (cheap-cache 4\u21922)",
569
+ "passed": true
570
+ }
571
+ ],
572
+ "data_source": "synthetic"
573
+ },
574
+ {
575
+ "model": "monitoring/CryptoAnomalyDetector",
576
+ "status": "trained",
577
+ "seconds": 0.36,
578
+ "train": {
579
+ "n": 30,
580
+ "algos": 7,
581
+ "pqc_mean": 0.0,
582
+ "vae": "trained 5 epochs",
583
+ "mode": "provided",
584
+ "_n_real": 277,
585
+ "_eval_real": {
586
+ "tested_hosts": 56,
587
+ "alerts": 0
588
+ },
589
+ "_eval": {
590
+ "precision": 0.5,
591
+ "recall": 1.0,
592
+ "f1": 0.6667,
593
+ "n": 100,
594
+ "per_type": {
595
+ "quantum_regression": {
596
+ "tp": 18,
597
+ "fp": 0,
598
+ "fn": 0,
599
+ "tn": 0
600
+ },
601
+ "new_algorithm": {
602
+ "tp": 16,
603
+ "fp": 0,
604
+ "fn": 0,
605
+ "tn": 0
606
+ },
607
+ "rsa_spike": {
608
+ "tp": 16,
609
+ "fp": 0,
610
+ "fn": 0,
611
+ "tn": 0
612
+ },
613
+ "normal": {
614
+ "tp": 0,
615
+ "fp": 50,
616
+ "fn": 0,
617
+ "tn": 0
618
+ }
619
+ },
620
+ "baseline_n": 30
621
+ }
622
+ },
623
+ "evaluate": null,
624
+ "anchors": [
625
+ {
626
+ "check": "4 alert(s): new_algorithm; unexpected_crypto; rsa_spike",
627
+ "passed": true
628
+ }
629
+ ],
630
+ "data_source": "real"
631
+ },
632
+ {
633
+ "model": "monitoring/CryptoRegressionDetector",
634
+ "status": "trained",
635
+ "seconds": 0.02,
636
+ "train": {
637
+ "examples": 200,
638
+ "accuracy": 1.0,
639
+ "correct": 200,
640
+ "n": 200,
641
+ "note": "rule-based detector; train() validates thresholds on synthetic history",
642
+ "_eval": {
643
+ "accuracy": 1.0,
644
+ "precision": 1.0,
645
+ "recall": 1.0,
646
+ "f1": 1.0,
647
+ "n": 200,
648
+ "per_type": {
649
+ "quantum_regression": {
650
+ "tp": 61,
651
+ "fp": 0,
652
+ "fn": 0,
653
+ "tn": 0
654
+ },
655
+ "downgrade": {
656
+ "tp": 42,
657
+ "fp": 0,
658
+ "fn": 0,
659
+ "tn": 0
660
+ },
661
+ "upgrade": {
662
+ "tp": 0,
663
+ "fp": 0,
664
+ "fn": 0,
665
+ "tn": 64
666
+ },
667
+ "benign": {
668
+ "tp": 0,
669
+ "fp": 0,
670
+ "fn": 0,
671
+ "tn": 33
672
+ }
673
+ }
674
+ }
675
+ },
676
+ "evaluate": null,
677
+ "anchors": [
678
+ {
679
+ "check": "ML-KEM\u2192RSA blocked (CRITICAL)",
680
+ "passed": true
681
+ }
682
+ ],
683
+ "data_source": "synthetic"
684
+ },
685
+ {
686
+ "model": "vendor/SupplyChainRiskModel + VendorReadinessModel",
687
+ "status": "trained",
688
+ "seconds": 0.03,
689
+ "train": {
690
+ "_scm": {
691
+ "vendor_a": 91.0,
692
+ "vendor_c": 34.0
693
+ },
694
+ "_readiness": {
695
+ "vendor_a": 88.0,
696
+ "level": "READY"
697
+ },
698
+ "_scm_train": {
699
+ "examples": 16,
700
+ "weights": {
701
+ "crypto": 0.45,
702
+ "pqc": 0.35,
703
+ "hygiene": 0.2
704
+ },
705
+ "mae": 40.112,
706
+ "conformal_margin": 54.8,
707
+ "has_sklearn": true,
708
+ "_n_real": 16
709
+ },
710
+ "_readiness_train": {
711
+ "examples": 16,
712
+ "weights": {
713
+ "library": 0.42,
714
+ "vuln": 0.048,
715
+ "cert": 0.048,
716
+ "lifecycle": 0.048,
717
+ "future": 0.435
718
+ },
719
+ "mae": 66.708,
720
+ "conformal_margin": 90.25,
721
+ "has_sklearn": true,
722
+ "train_accuracy": 0.9375,
723
+ "_n_real": 16
724
+ }
725
+ },
726
+ "evaluate": null,
727
+ "anchors": [
728
+ {
729
+ "check": "supply-chain A=91 vs C=34; readiness A=88",
730
+ "passed": true
731
+ }
732
+ ],
733
+ "data_source": "real"
734
+ },
735
+ {
736
+ "model": "copilot/SecurityCopilot",
737
+ "status": "trained",
738
+ "seconds": 0.01,
739
+ "train": {
740
+ "mode": "deterministic",
741
+ "assets_scanned": 1,
742
+ "models_resolved": {
743
+ "dependency_graph": true,
744
+ "blast_radius": true,
745
+ "quantum_exposure": true,
746
+ "recommender": true,
747
+ "cost": true,
748
+ "failure": true,
749
+ "interop": true,
750
+ "temporal": true
751
+ },
752
+ "llm_provider": "deterministic",
753
+ "llm_configured": true,
754
+ "_answer": "Question: Why is our payment API critical?\n\nEvidence-backed answer to rephrase:\npayment-api is high (risk 64) because:\n \u2022 RSA-2048 is quantum-vulnerable (purpose: signature)\n \u2022 blast radius 16/100 \u2014 2 direct + 3 indirect dependents, 2 critical services, 2 sensitive datasets\n \u2022 top contributing factors: +32 quantum vulnerability +24 business criticality +18 HNDL exposure +6 compliance urgency +3.0 dependency blast radius\n \u2022 recommended replacement: ML-DSA-65 (hybrid=True)",
755
+ "_intent": "why",
756
+ "_sources": [
757
+ "dependency-graph",
758
+ "blast-radius",
759
+ "quantum-exposure",
760
+ "pqc-recommender",
761
+ "cost-predictor",
762
+ "failure-predictor",
763
+ "interop-predictor"
764
+ ],
765
+ "_eval": {
766
+ "passed": 3,
767
+ "total": 3,
768
+ "accuracy": 1.0,
769
+ "intent_map": {
770
+ "why": 1,
771
+ "danger": 1,
772
+ "general": 1
773
+ }
774
+ }
775
+ },
776
+ "evaluate": null,
777
+ "anchors": [
778
+ {
779
+ "check": "canonical answer cites RSA-2048 (sources: ['dependency-graph', 'blast-radius', 'quantum-exposure', 'pqc-recommender', 'cost-predictor', 'failure-predictor', 'interop-predictor'])",
780
+ "passed": true
781
+ }
782
+ ],
783
+ "data_source": "synthetic"
784
+ },
785
+ {
786
+ "model": "policy/PolicyEngine",
787
+ "status": "trained",
788
+ "seconds": 0.0,
789
+ "train": {
790
+ "mode": "deterministic-rules",
791
+ "rules": 9,
792
+ "constraint_types": [
793
+ "blocklist_algorithm",
794
+ "downtime_limit",
795
+ "fips_only",
796
+ "maintenance_window",
797
+ "mandatory_by",
798
+ "max_concurrent",
799
+ "ordering",
800
+ "require_approval",
801
+ "vendor_restriction"
802
+ ],
803
+ "optimizer_backend": true,
804
+ "_eval": {
805
+ "passed": 9,
806
+ "total": 9,
807
+ "accuracy": 1.0,
808
+ "expected_types": [
809
+ "blocklist_algorithm",
810
+ "downtime_limit",
811
+ "fips_only",
812
+ "maintenance_window",
813
+ "mandatory_by",
814
+ "max_concurrent",
815
+ "ordering",
816
+ "require_approval",
817
+ "vendor_restriction"
818
+ ]
819
+ }
820
+ },
821
+ "evaluate": null,
822
+ "anchors": [
823
+ {
824
+ "check": "all 9 \u00a722 policy patterns parsed",
825
+ "passed": true
826
+ }
827
+ ],
828
+ "data_source": "synthetic"
829
+ }
830
+ ],
831
+ "summary": {
832
+ "trained": 15,
833
+ "anchor_fail": 0,
834
+ "errors": 0,
835
+ "anchors_ok": 15,
836
+ "anchors_total": 15,
837
+ "wall_seconds": 327.85
838
+ }
839
+ }