q-trust

Q-Trust — Developer’s Roadmap (measured, not aspirational)

Written 2026-08-30. Every number below was reproduced in this session on the real corpus — none are estimates.

Update 2026-10-26: the CodeBERTa figures below are the legacy v1 record. A later leakage audit found 87.6 % of its held-out eval paths already present in training; the current clean model of record is v4 on repo-disjoint splits — F1 0.9205 de-duplicated (keep_longest, gate 0.50) / 0.9235 native (qtrust_ai/artifacts/eval_dedup_v4.json, EXPERIMENTS.md E-14/E-15/E-16). Cite v1’s 0.9395 only as history, never as the clean result.

1. Where the models actually stand (measured today)

Model Protocol Measured result Interpretation
GNN planner v3 Full 40-fold LOO, host-disjoint real CBOMs (280 hosts, re-run 2026-09-02 on the deterministic-kernel harness, 30-epoch fine-tune, 2,000 synthetic per fold, folds sharded across 4 A100s via eval_real_cbom_loo.py --fold-start/--fold-end, merged with --merge-shards; 3-fold repro bit-identical) τ-b 0.7263 vs heuristic 0.7450 (Δ −0.0188); random 0.2234 (+0.503); reproduces the doctrine on 38/40 folds (0 wins / 38 ties / 2 losses — small heavily-tied graphs, n≤8 and n≤13) Model reproduces the doctrine heuristic on essentially every held-out real estate (38/40, Δ≈0); the honest ceiling break requires expert pairwise labels. 60-epoch fine-tunes overfit the synthetic mix (Δ −0.055) — 30 epochs is the operating point. The pre-fix τ-b 0.7377 (39/40) is superseded: deterministic kernels (seeded shuffles, cudnn deterministic, no torch.compile) changed per-fold fine-tune outcomes
RL agent PPO, 64 vectorized envs, trained on packed real-CBOM estates with scan-derived risk labels (RSA-1024 → critical, RSA-2048 → high, expired/near-expiry raise the class), evaluated on 40 packed real-CBOM environments mean reward 140.34 ± 8.13 vs heuristic 140.62 (Δ −0.28 — tie) vs random 136.84 (+2.6%); 100% completion, 2/40 wins · 27 ties · 11 losses Learns real risk-priority and matches the doctrine on real estates (archived “beats heuristic 130.20 vs 112.40” was NOT reproducible — the CBOM builder stamped every asset criticality: medium, so real environments had zero reward signal; fixed + re-measured 2026-09-02; pack_graph_cboms host-set ordering was hash-randomized per process — sorted + re-run, identical across processes)
Anomaly detector Real CBOMs (277 hosts → 276 assets), 120 epochs, 80% train 100% detection (162/162), FPR 2/54 (3.7%) Strong — real-data trained, improved FPR
CodeBERTa detector (clean, shipped) Corpus v4: 17,171 files / 58 sources; repo-disjoint eval split (2,238 records → 1,779 unique paths), gate 0.50 P 0.9264 / R 0.9146 / F1 0.9205 de-duplicated (keep_longest); F1 0.9235 on the native split; sensitivity 0.9167–0.9223 across policies (2026-10-25/26, E-14/E-16) The current claim — leakage-audited, de-dup-robust, artifact-pinned by the metric gate; 8,814 crypto files vs v1’s 4,431
CodeBERTa detector v1 (legacy) Real code corpus (13,973 files incl. SolidiFI/EIPs/WebAuthn), CodeBERTa fine-tune, held-out Historical P 0.9279 / R 0.9514 / F1 0.9395 (2026-09-01) Superseded — do not cite as clean: 87.6 % of its eval paths overlap training; 0.9395 is the leak-inflated number, kept only as the pre-audit record
Risk / purpose / vendor models Real corpora (277 hosts / 820 uses / 16 vendors) trained + anchor-verified (committed report) Solid

The honest headline (2026-09-02): the 40-fold LOO completed on the deterministic-kernel harness with the 30-epoch operating point (2,000 synthetic per fold) — the config the 60-epoch experiment showed to be best out-of-sample — with the folds sharded across 4 A100s (10 folds per GPU, merged with eval_real_cbom_loo.py --merge-shards): τ-b 0.7263 vs heuristic 0.7450 (Δ −0.0188), reproducing the doctrine on 38/40 folds (0 wins / 38 ties / 2 losses — small heavily-tied graphs, n≤8 and n≤13), +0.503 vs random (see real_cbom_loo_40.json; a fresh 3-fold run is bit-identical to the merged shards). The 60-epoch fine-tune (Δ −0.0545) confirms the extra epochs overfit the synthetic mix. CodeBERTa’s clean result is F1 0.9205 de-duplicated (0.9235 native) on corpus v4’s repo-disjoint split — the legacy v1 figure 0.9395 is leak-inflated (87.6 % eval-path overlap) and retained only as history; the RL agent, retrained after a 2026-09-02 integrity fix (real assets now carry scan-derived risk instead of the builder’s blanket criticality: medium, which had zeroed the reward signal), scores 140.34 vs heuristic 140.62 (tie) and 136.84 random (+2.6%) on 40 packed real-CBOM estates — it learns real risk-priority and matches the doctrine; side-channel detector 5/5 clean → VERIFIED (0.05), 5/5 leak-injected → HIGH_RISK (0.95) on real liboqs traces; anomaly detector 100% detection, FPR 3.7%. Neither model beats the doctrine on real estates — and cannot, because the heuristic is the doctrine the labels encode; only expert pairwise labels (QTrust-RiskBench) can break that ceiling.

2. The one ML problem that matters

Make the planner beat its own heuristic on out-of-sample real CBOMs. This is the difference between “a GNN that memorizes our priority formula” and “a planner that finds better migrations than our experts’ rules.”

What would actually move the needle (in order of leverage):

  1. Better real labels, not more synthetic ones. Synthetic graphs are labeled by the same priority formula we benchmark against — that is the circularity the repo already documents. Invest in expert pairwise preferences on real estates (the QTrust-RiskBench plan in qtrust/). The model can only beat the heuristic if it learns something the formula doesn’t know.
  2. More host-disjoint real CBOMs. 37 CBOMs / 277 hosts is a thin out-of-sample surface — one fold can swing ±0.13. Verified public sources to grow the corpus (named, real, current as of 2026-08):
    • arXiv 2606.16473 — “Measurement Study of Post-Quantum Readiness of the Internet 2026” (32,011 real domains, TLS-focused PQC readiness measurements) — the single best drop-in source for real PQC estate data.
    • Kaggle: “IDS Encrypted & Post Quantum Cryptography Datasets” — PQC-TLS Benchmark Collection with 141M real TLS flows from a 100 Gbps backbone.
    • Certificate Transparency logs (certificate.transparency.dev) + crt.sh — streaming, free, millions of real X.509 certs; ideal for key-size / signature-algorithm distributions.
    • Rapid7 Project Sonar (opendata.rapid7.com) SSL cert dataset — internet-wide real certs (note: public access has been restricted since 2022; treat as research-acquisition, not a default source).
    • Cloudflare PQ-2024 / F5 “State of PQC on the Web” — real-world TLS 1.3 PQ adoption numbers for calibrating expectations.
    • NVD CVE feeds for vulnerability-conditional exposure labels (the repo already ingests 401 real CVEs).
    • GitHub code search for crypto API usage across public repos (the repo already caches 64 repos; scale the collector). Each source must keep the host-disjoint invariant or the LOO protocol silently leaks — that invariant is the repo’s credibility.
  3. Tie-aware metrics only. Dense-rank τ on estates full of identical RSA-2048 certs is meaningless; the repo’s switch to τ-b was right. Keep it.
  4. Calibrate, don’t chase. The honest benchmark discipline (LOO, host-disjoint, τ-b, ceiling baselines) is worth more than any number. Never let a headline regress to in-sample.

3. What to build next (as the developer)

0–30 days — make the numbers defensible:

30–90 days — the moat:

90 days+ — product:

4. What NOT to build

5. Competitive reality (honest)

6. Engineering hygiene next