Skip to content

Qwen3-0.6B inference (12 KB), bare-metal bootable OS (22 KB), and from-scratch Mini-GPT trainer with live Braille TUI (32 KB) in 100% pure x86-64 NASM assembly. Zero C, zero libc, zero dependencies.

13.2 KB
Raw Blame

eBPF-Jev synthetic workflow evaluation

The 3,840 test workflows come from 24 held-out families. All connections are offline records representing local fixtures. These frequencies describe this synthetic mixture. They do not estimate production prevalence or authorization.

Fixed operating point

The neural deny gate uses risk ≥192/255 and uncertainty ≤127/255. The tree and rules use risk only. The kernel policy also denies every unapproved connect after a protected open. Values in brackets are 95% family bootstrap intervals. Wilson intervals for binomial rates appear in eval_metrics.json.

Model Risk ECE before → after Risk Brier before → after Model false denies / 1,000 benign Model recall With floor, false denies / 1,000 With floor, recall Bytes
rule_fsm 0.3000 [0.3000, 0.3000] → 0.3000 [0.3000, 0.3000] 0.3000 [0.3000, 0.3000] → 0.3000 [0.3000, 0.3000] 500.0000 [500.0000, 500.0000] 1.0000 [1.0000, 1.0000] 500.0000 [500.0000, 500.0000] 1.0000 [1.0000, 1.0000] no learned artifact
rule_strict 0.4510 [0.4453, 0.4568] → 0.4510 [0.4453, 0.4568] 0.4510 [0.4453, 0.4568] → 0.4510 [0.4453, 0.4568] 751.7361 [742.1875, 761.2956] 1.0000 [1.0000, 1.0000] 751.7361 [742.1875, 761.2956] 1.0000 [1.0000, 1.0000] no learned artifact
oblivious_gbdt 0.0008 [0.0008, 0.0008] → 0.0008 [0.0008, 0.0008] 0.1000 [0.1000, 0.1000] → 0.1000 [0.1000, 0.1000] 0.0000 [0.0000, 0.0000] 0.5000 [0.5000, 0.5000] 500.0000 [500.0000, 500.0000] 1.0000 [1.0000, 1.0000] 1284
stateless_mlp 0.0089 [0.0086, 0.0092] → 0.0100 [0.0097, 0.0103] 0.1003 [0.1003, 0.1003] → 0.1005 [0.1005, 0.1005] 0.0000 [0.0000, 0.0000] 0.5000 [0.5000, 0.5000] 500.0000 [500.0000, 500.0000] 1.0000 [1.0000, 1.0000] 21280
recurrent_jev 0.0347 [0.0294, 0.0403] → 0.0386 [0.0325, 0.0454] 0.0554 [0.0539, 0.0571] → 0.0576 [0.0557, 0.0599] 0.0000 [0.0000, 0.0000] 0.7500 [0.7500, 0.7500] 500.0000 [500.0000, 500.0000] 1.0000 [1.0000, 1.0000] 21280

Head classification at probability ≥0.5

Model Head Precision Recall F1
rule_fsm exfil_risk 0.5714 [0.5714, 0.5714] 1.0000 [1.0000, 1.0000] 0.7273 [0.7273, 0.7273]
rule_fsm evasion_chain 0.3333 [0.3333, 0.3333] 1.0000 [1.0000, 1.0000] 0.5000 [0.5000, 0.5000]
rule_fsm benign_dev_workflow 1.0000 [1.0000, 1.0000] 0.5000 [0.5000, 0.5000] 0.6667 [0.6667, 0.6667]
rule_fsm uncertainty undefined 0.0000 [0.0000, 0.0000] 0.0000 [0.0000, 0.0000]
rule_strict exfil_risk 0.4700 [0.4669, 0.4732] 1.0000 [1.0000, 1.0000] 0.6395 [0.6365, 0.6424]
rule_strict evasion_chain 0.3333 [0.3333, 0.3333] 1.0000 [1.0000, 1.0000] 0.5000 [0.5000, 0.5000]
rule_strict benign_dev_workflow 1.0000 [1.0000, 1.0000] 0.2483 [0.2387, 0.2578] 0.3978 [0.3854, 0.4099]
rule_strict uncertainty undefined 0.0000 [0.0000, 0.0000] 0.0000 [0.0000, 0.0000]
oblivious_gbdt exfil_risk 0.6667 [0.6667, 0.6667] 1.0000 [1.0000, 1.0000] 0.8000 [0.8000, 0.8000]
oblivious_gbdt evasion_chain 0.6667 [0.6667, 0.6667] 1.0000 [1.0000, 1.0000] 0.8000 [0.8000, 0.8000]
oblivious_gbdt benign_dev_workflow 0.7500 [0.7500, 0.7500] 1.0000 [1.0000, 1.0000] 0.8571 [0.8571, 0.8571]
oblivious_gbdt uncertainty 1.0000 [1.0000, 1.0000] 1.0000 [1.0000, 1.0000] 1.0000 [1.0000, 1.0000]
stateless_mlp exfil_risk 0.6667 [0.6667, 0.6667] 1.0000 [1.0000, 1.0000] 0.8000 [0.8000, 0.8000]
stateless_mlp evasion_chain 0.6667 [0.6667, 0.6667] 1.0000 [1.0000, 1.0000] 0.8000 [0.8000, 0.8000]
stateless_mlp benign_dev_workflow 0.8333 [0.8333, 0.8333] 0.8333 [0.8333, 0.8333] 0.8333 [0.8333, 0.8333]
stateless_mlp uncertainty 1.0000 [1.0000, 1.0000] 1.0000 [1.0000, 1.0000] 1.0000 [1.0000, 1.0000]
recurrent_jev exfil_risk 0.7983 [0.7963, 0.8000] 1.0000 [1.0000, 1.0000] 0.8879 [0.8866, 0.8889]
recurrent_jev evasion_chain 0.9493 [0.9164, 0.9808] 1.0000 [1.0000, 1.0000] 0.9740 [0.9564, 0.9903]
recurrent_jev benign_dev_workflow 0.9932 [0.9833, 1.0000] 0.8290 [0.8177, 0.8411] 0.9037 [0.8988, 0.9082]
recurrent_jev uncertainty 1.0000 [1.0000, 1.0000] 1.0000 [1.0000, 1.0000] 1.0000 [1.0000, 1.0000]

Risk thresholds

Thresholds were selected on validation scores. The 95% recall target and false-denial budgets are validation constraints. The test ROC rows separately describe the best achievable test recall at each budget and use test labels only for that descriptive calculation. These rows evaluate risk alone, before abstention and the kernel floor.

Model Selection U8 threshold Test recall False denies / 1,000
rule_fsm operating_points/high95 255 1.0000 [1.0000, 1.0000] 500.0000 [500.0000, 500.0000]
rule_fsm operating_points/budget1 256 0.0000 [0.0000, 0.0000] 0.0000 [0.0000, 0.0000]
rule_fsm operating_points/budget05 256 0.0000 [0.0000, 0.0000] 0.0000 [0.0000, 0.0000]
rule_fsm test_roc_descriptive/budget1 256 0.0000 [0.0000, 0.0000] 0.0000 [0.0000, 0.0000]
rule_fsm test_roc_descriptive/budget05 256 0.0000 [0.0000, 0.0000] 0.0000 [0.0000, 0.0000]
rule_strict operating_points/high95 255 1.0000 [1.0000, 1.0000] 751.7361 [742.1875, 761.2956]
rule_strict operating_points/budget1 256 0.0000 [0.0000, 0.0000] 0.0000 [0.0000, 0.0000]
rule_strict operating_points/budget05 256 0.0000 [0.0000, 0.0000] 0.0000 [0.0000, 0.0000]
rule_strict test_roc_descriptive/budget1 256 0.0000 [0.0000, 0.0000] 0.0000 [0.0000, 0.0000]
rule_strict test_roc_descriptive/budget05 256 0.0000 [0.0000, 0.0000] 0.0000 [0.0000, 0.0000]
oblivious_gbdt operating_points/high95 128 1.0000 [1.0000, 1.0000] 333.3333 [333.3333, 333.3333]
oblivious_gbdt operating_points/budget1 255 0.5000 [0.5000, 0.5000] 0.0000 [0.0000, 0.0000]
oblivious_gbdt operating_points/budget05 255 0.5000 [0.5000, 0.5000] 0.0000 [0.0000, 0.0000]
oblivious_gbdt test_roc_descriptive/budget1 255 0.5000 [0.5000, 0.5000] 0.0000 [0.0000, 0.0000]
oblivious_gbdt test_roc_descriptive/budget05 255 0.5000 [0.5000, 0.5000] 0.0000 [0.0000, 0.0000]
stateless_mlp operating_points/high95 128 1.0000 [1.0000, 1.0000] 333.3333 [333.3333, 333.3333]
stateless_mlp operating_points/budget1 254 0.5000 [0.5000, 0.5000] 0.0000 [0.0000, 0.0000]
stateless_mlp operating_points/budget05 254 0.5000 [0.5000, 0.5000] 0.0000 [0.0000, 0.0000]
stateless_mlp test_roc_descriptive/budget1 254 0.5000 [0.5000, 0.5000] 0.0000 [0.0000, 0.0000]
stateless_mlp test_roc_descriptive/budget05 254 0.5000 [0.5000, 0.5000] 0.0000 [0.0000, 0.0000]
recurrent_jev operating_points/high95 128 1.0000 [1.0000, 1.0000] 168.4028 [166.6667, 170.5729]
recurrent_jev operating_points/budget1 166 0.9251 [0.8880, 0.9622] 116.7535 [92.0139, 141.4931]
recurrent_jev operating_points/budget05 166 0.9251 [0.8880, 0.9622] 116.7535 [92.0139, 141.4931]
recurrent_jev test_roc_descriptive/budget1 198 0.7598 [0.7507, 0.7702] 6.5104 [0.4340, 13.4549]
recurrent_jev test_roc_descriptive/budget05 254 0.7500 [0.7500, 0.7500] 0.0000 [0.0000, 0.0000]

Synthetic slices

Each cell shows the percentage denied by the model at the fixed gate. Each slice contains 384 workflows. Histories in clean and persistent pairs differ in the intermediate executable class. The final connect and every frozen final feature match. The two ambiguous cases have identical observations throughout and opposite authorization labels.

Scenario rule_fsm rule_strict oblivious_gbdt stateless_mlp recurrent_jev
ambiguous_allow 100.00 100.00 0.00 0.00 0.00
ambiguous_deny 100.00 100.00 0.00 0.00 0.00
chain 100.00 100.00 100.00 100.00 100.00
ci 0.00 100.00 0.00 0.00 0.00
clean 100.00 100.00 0.00 0.00 0.00
direct 100.00 100.00 100.00 100.00 100.00
persistent 100.00 100.00 0.00 0.00 100.00
registry 0.00 0.00 0.00 0.00 0.00
stale_git 100.00 100.00 0.00 0.00 0.00
startup 0.00 51.04 0.00 0.00 0.00

Uncertainty and calibration

Model Overall abstention Abstention on ambiguous pairs
rule_fsm 0.0000 [0.0000, 0.0000] 0.0000 [0.0000, 0.0000]
rule_strict 0.0000 [0.0000, 0.0000] 0.0000 [0.0000, 0.0000]
oblivious_gbdt 0.0000 [0.0000, 0.0000] 0.0000 [0.0000, 0.0000]
stateless_mlp 0.2000 [0.2000, 0.2000] 1.0000 [1.0000, 1.0000]
recurrent_jev 0.2000 [0.2000, 0.2000] 1.0000 [1.0000, 1.0000]

All heads share one temperature fitted by binary cross entropy on 1,920 calibration workflows. The test ECE uses 15 equal-width bins. eval_metrics.json also gives before/after ECE and Brier scores by head. Calibration describes probability accuracy on this fixture distribution. Identically observed ambiguous pairs impose irreducible label uncertainty. Abstentions count as non-denials in the model-only columns. The floor still denies ambiguous protected-to-unapproved connections.

Reproducibility and limits

Run generate_dataset.py followed by train_and_eval.py from ml with CPU PyTorch and NumPy. Fixed random seeds control template allocation, sampling and training. The original split sizes are 7,680 train, 1,920 cal, 1,920 val and 3,840 test. Alignment adds 3,072 application training workflows with paired endpoint approvals, different port buckets, and same-process or child service connections. Legacy replay preserves the original model logits during fitting. Checkpoint selection uses both validation populations; the original calibration population supplies the shared temperature. Each family uses a distinct projected four-step preparation sequence. Repository IDs and tool catalogs are disjoint across splits. Common policy scenarios, OS hook types and file classes deliberately recur. The generator simulates fork inheritance along one active lineage. It does not replay kernel events.

Both neural models use straight-through INT8 weight rounding, integer activation shifts and validation checkpoint selection across 24 epochs. The stateless model shares the trained embedding and receives only the final connect at prediction. Socket embeddings are zero. The trees share final structured features and use 32 symmetric depth-four trees. The deployed tree map stores risk leaves only. Auxiliary heads use separate offline INT16 leaf banks under the same splits. The deterministic rule exposes risk in the kernel. Its chain and benign columns are explicit offline proxies (inherited execution after a rule match, and inverse rule match). Its uncertainty score is always zero.

The strict rule treats class 30 as approved loopback-equivalent under the frozen feature mapping. Its private destinations incur denials after a protected read. The benchmark encodes allowlisted external registries in class 30 as the kernel extractor does. Aggregate slices cannot measure behavior on new policies, unrelated tasks sharing a process, or unseen attack families.

Confidence intervals resample 24 entire families 1,000 times with replacement. Zero-width cluster intervals can occur when family proportions agree. The JSON also reports workflow-level Wilson intervals for simple rates. Precision is undefined if the model never predicts the head.

Fixed-point verification

500/500 native C callback vectors matched NumPy for pooled embeddings, next state, logits and LUT outputs. The pack is 21,280 bytes. Vectors include 100 five-step blocks, zero and signed-extreme inputs, long strings, 251 hidden-state saturation cases and 369 clipped endpoint cases. This checks the compiled user-space kernel callbacks. Actual BPF hook execution belongs to the testbed.

recurrent_jev FP32 master → fixed-point accuracy delta by head (percentage points, contract order): -0.104, -1.068, -0.599, +0.000. All 15,360 test fake-quantized FP32 logits matched the integer implementation.

stateless_mlp FP32 master → fixed-point accuracy delta by head (percentage points, contract order): +0.000, +0.000, +0.000, +0.000. All 15,360 test fake-quantized FP32 logits matched the integer implementation.

Comparative interpretation

  • On clean, oblivious_gbdt, stateless_mlp, recurrent_jev achieved the best fixed-gate result (0.00% denied).
  • On persistent, rule_fsm, recurrent_jev achieved the best fixed-gate result (100.00% denied).
  • On chain, rule_fsm, oblivious_gbdt, stateless_mlp, recurrent_jev achieved the best fixed-gate result (100.00% denied).
  • On ci, rule_fsm, oblivious_gbdt, stateless_mlp, recurrent_jev achieved the best fixed-gate result (0.00% denied).
  • On stale_git, oblivious_gbdt, stateless_mlp, recurrent_jev achieved the best fixed-gate result (0.00% denied).
  • On ambiguous_deny, rule_fsm achieved the best fixed-gate result (100.00% denied).

Application holdout

The exported recurrent model on 1536 additional held-out workflows had 0.0000 [0.0000, 0.0000] false denies per 1,000 benign, 1.0000 [1.0000, 1.0000] recall and risk ECE 0.0025 [0.0024, 0.0026]. The floor-inclusive metrics measure the deployed protected-to-unapproved rule and the learned decision together.