simonmorley commited on
Commit
ec8e321
·
verified ·
1 Parent(s): 215671c

Card fixes: correct inference_example record-2 to TPU-QUIC (not the excluded RPC class); name the eval metric (binary ROC-AUC) and cite the dataset card's held-out-chain macro-F1 in the LOCO section

Browse files
Files changed (2) hide show
  1. README.md +3 -3
  2. inference_example.py +5 -2
README.md CHANGED
@@ -109,9 +109,9 @@ Diagnostic ML checks (the corpus of faithfully-modelled public attacks is the de
109
  secondary). Reproduced by `scripts/known_class_loco_eval.py` + `scripts/corpus_quality.py`.
110
 
111
  - **Corpus** (public-CVE cut): 1084/1084 distinct vectors, 0 duplicate rows; 2 Cleanlab review-flags — both deliberately-stealthy low-volume `gossipsub_subscribe_flood` captures that legitimately resemble benign (labels correct, not mislabels).
112
- - **Within-corpus held-out — GroupKFold by primitive (66 groups, leakage-clean): ROC 0.9082.** `corpus_sha256 known-class-v10-publiccve`.
113
- - **Leave-one-attack-primitive-out within Bitcoin (leak-clean, disjoint-benign):** all 20 Bitcoin primitives ≥ 0.969. Detection is on traffic *shape*, not deep wire-semantics.
114
- - **Leave-one-chain-out (HARD zero-shot transfer — *not* a deployment metric):** Cosmos / Ethereum / Litecoin 1.00, Dogecoin 0.995, Bitcoin 0.934, libp2p 0.844, Solana 0.688, Sui 0.661, **Monero 0.592**. Chains with few public-CVE primitives (Monero's unique Levin protocol; Sui/Solana with 3 each) have the fewest cross-chain near-neighbours, so zero-shot transfer to them is hardest — reported honestly, not spun.
115
 
116
  ## Intended uses
117
 
 
109
  secondary). Reproduced by `scripts/known_class_loco_eval.py` + `scripts/corpus_quality.py`.
110
 
111
  - **Corpus** (public-CVE cut): 1084/1084 distinct vectors, 0 duplicate rows; 2 Cleanlab review-flags — both deliberately-stealthy low-volume `gossipsub_subscribe_flood` captures that legitimately resemble benign (labels correct, not mislabels).
112
+ - **Within-corpus held-out — binary attack-vs-benign ROC-AUC, GroupKFold by primitive (66 groups, leakage-clean): 0.9082.** `corpus_sha256 known-class-v10-publiccve`.
113
+ - **Leave-one-attack-primitive-out within Bitcoin (binary ROC-AUC, leak-clean disjoint-benign):** all 20 Bitcoin primitives ≥ 0.969. Detection is on traffic *shape*, not deep wire-semantics.
114
+ - **Leave-one-chain-out — binary attack-vs-benign ROC-AUC (HARD zero-shot transfer, *not* a deployment metric):** Cosmos / Ethereum / Litecoin 1.00, Dogecoin 0.995, Bitcoin 0.934, libp2p 0.844, Solana 0.688, Sui 0.661, **Monero 0.592**. Note this is the *easier* binary (attack-vs-benign) signal: the companion [`nr-bundles-public`](https://huggingface.co/datasets/NullRabbit/nr-bundles-public) dataset card reports the *stricter* held-out-chain **7-class family macro-F1 of 0.17 (Sui) / 0.35 (Solana)** against a ~0.14 random floor — i.e. cross-chain *family recovery* does not transfer yet. Chains with few public-CVE primitives (Monero's unique Levin protocol; Sui/Solana with 3 each) have the fewest cross-chain near-neighbours. Cross-chain transfer is a hard, open problem here — reported honestly, not a deployment claim.
115
 
116
  ## Intended uses
117
 
inference_example.py CHANGED
@@ -3,11 +3,14 @@
3
 
4
  Runs real `network-v1` feature vectors (captured from the lab corpus and shipped in
5
  `example_records.json`) through the detector:
6
- 1. a Bitcoin Core P2P attack (INVDoS flood, CVE-2018-17145) -> should FIRE
7
- 2. a Solana RPC attack (getProgramAccounts amplification) -> should FIRE
8
  3. a benign Bitcoin peer (same message types, normal rate) -> benign
9
  4. an out-of-domain record (no network signal) -> scoreable=False
10
 
 
 
 
11
  Run from the model repo dir: python inference_example.py
12
  """
13
  import json
 
3
 
4
  Runs real `network-v1` feature vectors (captured from the lab corpus and shipped in
5
  `example_records.json`) through the detector:
6
+ 1. a Bitcoin Core P2P attack (real CVE) -> should FIRE
7
+ 2. a Solana TPU-QUIC attack (Neodyme Firedancer audit) -> should FIRE
8
  3. a benign Bitcoin peer (same message types, normal rate) -> benign
9
  4. an out-of-domain record (no network signal) -> scoreable=False
10
 
11
+ The exact primitive behind each record is in `example_records.json` and is printed as its
12
+ label at runtime (source of truth), so this list stays correct across corpus regenerations.
13
+
14
  Run from the model repo dir: python inference_example.py
15
  """
16
  import json