experiment: validate beta selection across three seeds
This commit is contained in:
1 parent
50f2da7216
commit
6b97a0d38b
14 files changed
+1963
-150
No files matched your search
+230
-143
@@ -3,11 +3,25 @@
|
||||
This is the canonical continuation point for the next agent session. It is written to be
|
||||
readable without prior chat history, terminal scrollback, or git history.
|
||||
|
||||
Last updated: 2026-09-25 (Session 5, one paired full beta condition + validation-only
|
||||
selection). Session 5 type: **protocol-validation experiment**. Exactly one
|
||||
`(dataset, alpha, seed)` condition was run across all five beta candidates; beta was
|
||||
selected on validation only and the selected beta evaluated once on test. **No full grid
|
||||
was launched.**
|
||||
Last updated: 2026-09-25 (Session 6 + post-experiment audit). Session 6 type:
|
||||
**protocol-scaling / stability experiment**. The single Session-5 condition was extended
|
||||
from seed 0 to seeds `{0,1,2}`; beta was selected by the **pooled-across-seed validation**
|
||||
rule and the selected beta evaluated on test. **No full grid was launched; no
|
||||
alpha/dataset expansion was run.** A strict independent audit
|
||||
(`docs/research/SESSION6_AUDIT.md`) returned **PASS WITH MINOR CORRECTIONS**; `beta_star =
|
||||
0.75` was independently reproduced from validation artifacts.
|
||||
|
||||
> **Audit summary (Session 6).** Verdict: **PASS WITH MINOR CORRECTIONS**. Independently
|
||||
> recomputed `beta_star = 0.75` from `val_per_client.csv`/`val_selection.json`; all 15
|
||||
> seed×beta seed-level scores and the pooled mean/sample-std match the report exactly.
|
||||
> Validation-only selection confirmed in code (`analyze_multiseed_beta.py` reads only
|
||||
> `val_selection.json`; test read in a later block); `test_used_for_selection=false`
|
||||
> upheld. Rare-class flags match the training-derived definition for all 30 cells;
|
||||
> manifests reproduce from raw data with disjoint splits. beta=0 vs `original_protean` =
|
||||
> semantically equivalent + floating-point divergence (class B). Minor corrections:
|
||||
> persisted `artifacts/analysis/xiiotid__alpha0.5__multiseed__runtime.csv` (runtime
|
||||
> provenance) and clarified the client improve/degrade counts (unchanged/tie clients).
|
||||
> **Session 6 is safe to checkpoint.**
|
||||
|
||||
---
|
||||
|
||||
@@ -31,188 +45,253 @@ bitwise identical to the baseline (see §7).
|
||||
## 2. Authoritative source and immutability
|
||||
|
||||
- `planningawal/PROTEAN_Revisi_Lurus.md` — authoritative research specification.
|
||||
- `planningawal/` is immutable. Re-verified unchanged this session: `git status --
|
||||
planningawal` and `git diff -- planningawal` are both empty.
|
||||
- `planningawal/` is immutable. Re-verified unchanged this session: `git status --short
|
||||
planningawal/` and `git diff -- planningawal/` are both empty.
|
||||
- Raw datasets re-verified unchanged (SHA-256):
|
||||
`~/datasets/X-IIoTID/X-IIoTID-dataset.csv`
|
||||
`7b9290057ee42e784da3c0d84b781815502c9205c74175c96374e71a5ffd98a0`;
|
||||
`~/datasets/5G-NIDD/5G-NIDD.csv`
|
||||
`fa36f80859585f474504ca69eb951a079b35145537976c86b00aae3aab46ee59`.
|
||||
- Frozen baseline (`original_protean`) source unchanged; no `equal_available` mode added;
|
||||
beta candidate set unchanged (`{0, .25, .5, .75, 1}`).
|
||||
|
||||
## 3. Session 5 objective and outcome
|
||||
## 3. Session 6 objective and outcome
|
||||
|
||||
Objective: run ONE paired full condition (X-IIoTID, alpha=0.5, seed=0) across
|
||||
`beta ∈ {0, 0.25, 0.5, 0.75, 1}`, reusing the frozen manifest and training settings;
|
||||
select beta on validation only; evaluate the selected beta on test; add the direct
|
||||
prototype-effect and client-level analyses; update docs. **All acceptance items were met.**
|
||||
No commit or push was made.
|
||||
Objective: extend the validated paired protocol from one seed to seeds `{0,1,2}` for
|
||||
X-IIoTID alpha=0.50, reuse the seed-0 Session-5 results, run the two new seeds across the
|
||||
five beta candidates plus `original_protean`, select beta with **pooled validation only**,
|
||||
evaluate the selected beta on test, and produce cross-seed direct-effect / client-level /
|
||||
stability analyses + docs. **All acceptance items were met.** No commit or push was made.
|
||||
|
||||
Outcome: **PRIMARY pooled-validation selected beta = 0.75** (validation only). Per-seed
|
||||
diagnostic selections varied (0.50 / 1.00 / 0.75), and between-seed variance is comparable
|
||||
to the between-beta spread, so the selection is arithmetically clear but statistically
|
||||
weak. The protocol ran cleanly end to end.
|
||||
|
||||
## 4. Condition and pairing
|
||||
|
||||
| Field | Value |
|
||||
|---|---|
|
||||
| dataset / alpha / seed | `xiiotid` / 0.50 / 0 |
|
||||
| manifest | `artifacts/partitions/xiiotid__alpha0.5__seed0.json` (reused) |
|
||||
| manifest content hash | `e81a6538ecefcda202aa7602310ff8d8c9529031ab9dcbec4ebbabc0e63b636c` |
|
||||
| partition hash | `2465485539a3e923548dcc0c73d8acc5076d456536b78682d512897ea586e779` |
|
||||
| split hash / sizes | `d0acc0c14e3ecbeba02dfa9e6227c983da12dec2d6111df0b714002e6e03c29d` / 569,909 train, 81,414 val, 162,831 test |
|
||||
| preprocessing hash | `8580cee41c698ce43cf3269e4a2b3a01c92d6df22820f4004c0267478bd2579a` |
|
||||
| dataset / alpha / seeds | `xiiotid` / 0.50 / `{0,1,2}` |
|
||||
| runs | 15 `support_weighted` + 3 `original_protean` (seed 0 reused; 12 run this session) |
|
||||
| training | 10 clients, 10 rounds, 3 local epochs, batch 256, lr 1e-3, mu 0.1, lambda 1.0, Adam |
|
||||
| code revision | HEAD `ad9aa53ba76f60671ace991fcee85f003781f196`; only `scripts/run_baseline.py` modified (hash-object `2b469e35ecbbc6ea3dbd4b0632419993e4d5130b`) |
|
||||
| code revision | unchanged from HEAD `50f2da72166e4f609077d65b4916f745da5e8e3b`; only read-only analysis code added |
|
||||
|
||||
Pairing proof: the round-0 prototype snapshot is **byte-identical** (SHA-256 prefix
|
||||
`e27f41b3a62eb83c`) across all five beta runs and the frozen `original_protean` run;
|
||||
`train_support_Nij.csv`, `characterization.csv`, `rare_unseen.csv` are identical across
|
||||
runs. All runs are in `results/xiiotid__alpha0.5__seed0__support_weighted__beta{0,0.25,0.5,0.75,1}/`.
|
||||
Manifests (reused, never regenerated; one content hash per seed across all six runs):
|
||||
|
||||
## 5. Validation results and beta selection
|
||||
| seed | manifest | content hash | partition hash | split hash | rng seed |
|
||||
|---|---|---|---|---|---|
|
||||
| 0 | `artifacts/partitions/xiiotid__alpha0.5__seed0.json` | `e81a6538…` | `2465485539…` | `d0acc0c1…` | 2009062324 |
|
||||
| 1 | `artifacts/partitions/xiiotid__alpha0.5__seed1.json` | `54ea1df1…` | `4061c5a1…` | `880a9f82…` | 621679668 |
|
||||
| 2 | `artifacts/partitions/xiiotid__alpha0.5__seed2.json` | `be881ac6…` | `1118e7fa…` | `8e0db0be…` | 1438483982 |
|
||||
|
||||
Primary selection metric: **validation per-client-mean rare-class macro-F1** (per-client
|
||||
rare F1 on each client's validation eval partition, averaged over clients with rare
|
||||
classes). Global union-rare validation metrics also shown.
|
||||
Pairing proof: round-0 snapshot byte-identical across the five betas **and**
|
||||
`original_protean` within each seed — seed 0 `e27f41b3a62eb83c…`, seed 1
|
||||
`b7f61c995e97474c…`, seed 2 `5b749f4185e11fc7…`. `train_support_Nij.csv`,
|
||||
`characterization.csv`, `rare_unseen.csv` identical across each seed's runs.
|
||||
`manifest_reload_ok = true` everywhere.
|
||||
|
||||
| beta | val rareMacroF1 (pc mean) | val rareMacroF1 (global) | val rareRecall | val macroF1 | val acc | val wF1 |
|
||||
|---|---|---|---|---|---|---|
|
||||
| 0.00 | 0.557340 | 0.611641 | 0.884184 | 0.708929 | 0.891038 | 0.917741 |
|
||||
| 0.25 | 0.571787 | 0.629475 | 0.888488 | 0.723431 | 0.902953 | 0.925933 |
|
||||
| **0.50** | **0.585762** | **0.641709** | 0.887173 | **0.731166** | 0.897831 | **0.926005** |
|
||||
| 0.75 | 0.578003 | 0.637107 | 0.873910 | 0.726603 | 0.887894 | 0.921696 |
|
||||
| 1.00 | 0.551443 | 0.615307 | 0.847043 | 0.715951 | 0.883263 | 0.921182 |
|
||||
## 5. Validation results (USED FOR SELECTION) and pooled selection
|
||||
|
||||
**Selected beta = 0.50** (best among tested candidates under this validation condition;
|
||||
no tie; both validation readings agree). Test was **not** used for selection.
|
||||
Primary metric: validation per-client-mean rare-class macro-F1. All 10 clients eligible
|
||||
in every seed. Full per-seed table:
|
||||
`artifacts/analysis/xiiotid__alpha0.5__multiseed__validation_per_seed.csv`.
|
||||
|
||||
## 6. Final test evaluation of the selected beta
|
||||
Per-seed validation per-client-mean rare-class macro-F1:
|
||||
|
||||
| metric | original_protean | support_weighted beta=0.50 |
|
||||
|---|---|---|
|
||||
| rare-class macro-F1 | 0.609620 | 0.640829 |
|
||||
| rare-class recall | 0.871487 | 0.871583 |
|
||||
| overall macro-F1 | 0.707701 | 0.730743 |
|
||||
| accuracy | 0.890432 | 0.898158 |
|
||||
| weighted-F1 | 0.917585 | 0.926333 |
|
||||
| beta | seed 0 | seed 1 | seed 2 |
|
||||
|---|---|---|---|
|
||||
| 0.00 | 0.557340 | 0.628624 | 0.447118 |
|
||||
| 0.25 | 0.571787 | 0.636205 | 0.458310 |
|
||||
| 0.50 | 0.585762 | 0.645189 | 0.471015 |
|
||||
| 0.75 | 0.578003 | 0.655160 | 0.504937 |
|
||||
| 1.00 | 0.551443 | 0.683117 | 0.485877 |
|
||||
|
||||
All five candidates' test metrics (transparency only) are in
|
||||
`docs/research/PAIRED_BETA_VALIDATION.md` §B.2. No superiority is claimed: single
|
||||
dataset / alpha / seed.
|
||||
Pooled across seeds (`...__validation_pooled.csv`):
|
||||
|
||||
## 7. `beta = 0` equivalence result (important)
|
||||
| beta | pooled mean | std (sample) | min | max | selected |
|
||||
|---|---|---|---|---|---|
|
||||
| 0.00 | 0.544361 | 0.091447 | 0.447118 | 0.628624 | |
|
||||
| 0.25 | 0.555434 | 0.090068 | 0.458310 | 0.636205 | |
|
||||
| 0.50 | 0.567322 | 0.088539 | 0.471015 | 0.645189 | |
|
||||
| **0.75** | **0.579367** | **0.075121** | 0.504937 | 0.655160 | **yes** |
|
||||
| 1.00 | 0.573479 | 0.100450 | 0.485877 | 0.683117 | |
|
||||
|
||||
`support_weighted beta=0` vs frozen `original_protean`:
|
||||
- **PRIMARY selected beta (`beta_star`) = 0.75**, max pooled validation per-client-mean
|
||||
rare-class macro-F1; **no tie-break used**; `test_used_for_selection = false` for all 15
|
||||
runs. The secondary pooled recall is highest at beta=0.25 (recall is only a tie-break).
|
||||
- **SECONDARY per-seed diagnostics only:** seed 0 → 0.50, seed 1 → 1.00, seed 2 → 0.75.
|
||||
These are stability diagnostics, not the condition's selection rule.
|
||||
|
||||
- Same frozen manifest and split: **yes**.
|
||||
- Same initialisation/round-0 setup: **yes** (round-0 snapshot byte-identical).
|
||||
- Training behaviour: **mathematically identical, not bitwise**. `original_protean`
|
||||
computes `Σ(C_ij/count)`; `support_weighted beta=0` computes `Σ((1/count)·C_ij)`.
|
||||
Per-element difference ≤ `2.2e-16`–`4.4e-16` (~1 ULP, relative ~1e-16).
|
||||
- Validation/test metrics: **not identical** (baseline slightly lower; e.g. test
|
||||
accuracy 0.890432 vs 0.891974). The ~1 ULP aggregation difference feeds back into
|
||||
round-1 prototype-alignment training and the trajectories diverge slowly from round 1.
|
||||
- Deterministic artifacts identical: round-0 snapshot, `train_support_Nij.csv`,
|
||||
`characterization.csv`, `rare_unseen.csv`; `history.json`/per-client/per-class differ.
|
||||
## 6. Final test evaluation of the pooled-selected beta
|
||||
|
||||
This is floating-point arithmetic ordering, not a semantic change; no code was altered to
|
||||
force bitwise equality. **Conditional on the shared `S_j` reproduction assumption** and
|
||||
does not prove `beta = 0` reproduces original PROTEAN.
|
||||
`beta_star = 0.75` was fixed from pooled validation before test was read.
|
||||
|
||||
## 8. Direct prototype-effect findings (fixed round-0 snapshot, no retraining)
|
||||
| metric (test) | seed 0 | seed 1 | seed 2 | mean ± std |
|
||||
|---|---|---|---|---|
|
||||
| rare-class macro-F1 | 0.636189 | 0.671937 | 0.688381 | 0.665503 ± 0.026685 |
|
||||
| rare-class recall | 0.857543 | 0.851883 | 0.878321 | 0.862583 ± 0.013921 |
|
||||
| macro-F1 | 0.726298 | 0.729015 | 0.738194 | 0.731169 ± 0.006234 |
|
||||
| accuracy | 0.888670 | 0.925493 | 0.905012 | 0.906392 ± 0.018450 |
|
||||
| weighted-F1 | 0.922278 | 0.944734 | 0.933884 | 0.933632 ± 0.011230 |
|
||||
|
||||
At `beta = 1.0`, largest `||Cbar_j(1)-Cbar_j(0)||`:
|
||||
`Weaponization` 3.559 (rel 0.577; most support-imbalanced, cv 2.10, max/min 1,800),
|
||||
`C&C` 2.156, `Lateral_movement` 2.069, `Exploitation` 1.934, `Tampering` 1.737,
|
||||
`Exfiltration` 1.547; smallest: `Normal` 0.990 (cv 0.76), `RDOS` 1.286,
|
||||
`Reconnaissance` 1.184. Every class has `|S_j| ≥ 8` and unequal support, so no class has
|
||||
zero direct effect. Outputs:
|
||||
`artifacts/analysis/xiiotid__alpha0.5__seed0__support_weighted__beta0__prototype_snapshot__prototype_effect.csv`
|
||||
and `...__prototype_weights.csv`. Displacement is a direct-aggregation measure only, not
|
||||
a detection result.
|
||||
`original_protean` for the same seeds/condition:
|
||||
|
||||
## 9. Client-level findings (test, vs beta=0)
|
||||
| metric (test) | seed 0 | seed 1 | seed 2 | mean ± std |
|
||||
|---|---|---|---|---|
|
||||
| rare-class macro-F1 | 0.609620 | 0.655665 | 0.662275 | 0.642520 ± 0.028683 |
|
||||
| rare-class recall | 0.871487 | 0.889365 | 0.870018 | 0.876957 ± 0.010771 |
|
||||
| macro-F1 | 0.707701 | 0.709176 | 0.710017 | 0.708965 ± 0.001172 |
|
||||
| accuracy | 0.890432 | 0.900885 | 0.907045 | 0.899454 ± 0.008398 |
|
||||
| weighted-F1 | 0.917585 | 0.929132 | 0.927481 | 0.924733 ± 0.006245 |
|
||||
|
||||
Full paired table: `artifacts/analysis/xiiotid__alpha0.5__seed0__paired_client_beta_metrics.csv`.
|
||||
At `beta=0.50` six of ten clients improve; only client 3 is materially negative (−0.068).
|
||||
At `beta=0.75/1.00` several clients lose, with client 3 worst (−0.257/−0.342). The
|
||||
`min positive N_ij` vs ΔF1 relationship is **not monotonic** in this single condition:
|
||||
client 3 (`min N_ij=140`) is the worst loser while client 5 (`min N_ij=2`) is the biggest
|
||||
gainer. Descriptive only; no causal claim.
|
||||
Test columns are **descriptive only** and played no part in selection. No superiority or
|
||||
generalisation is claimed: single dataset, single alpha, three project-defined seeds, and
|
||||
between-seed spread ~ between-method difference.
|
||||
|
||||
## 7. `beta = 0` equivalence result (seeds 1 and 2)
|
||||
|
||||
For seeds 1 and 2, `support_weighted beta=0` vs frozen `original_protean`:
|
||||
|
||||
- Same manifest/split/hashes: **yes**.
|
||||
- Round-0 snapshot byte-identical: **yes** (seed 1 `b7f61c99…`, seed 2 `5b749f41…`).
|
||||
- `train_support_Nij.csv`, `characterization.csv`, `rare_unseen.csv`: **identical**.
|
||||
- Aggregation: **mathematically equivalent, not bitwise** (`Σ(C/count)` vs
|
||||
`Σ((1/count)·C)`, ~1 ULP ordering difference that feeds back through round≥1).
|
||||
- Test/history/per-client/per-class: **differ slightly**.
|
||||
- Classification: **mathematically equivalent + floating-point numerical divergence;
|
||||
no semantic discrepancy** in either seed. Same result as Session 5 seed 0.
|
||||
|
||||
Conditional on the shared `S_j` reproduction assumption; not proof `beta=0` reproduces
|
||||
original PROTEAN.
|
||||
|
||||
## 8. Direct prototype-effect findings (fixed round-0 snapshots, no retraining)
|
||||
|
||||
`||Cbar_j(1) - Cbar_j(0)||`, cross-seed mean (std):
|
||||
|
||||
- Largest means: `Lateral_movement` 2.724 (1.035), `RDOS` 2.631 (1.165),
|
||||
`Weaponization` 2.561 (1.228), `Tampering` 2.354 (1.165), `Exploitation` 2.344 (0.412).
|
||||
- Smallest: `Reconnaissance` 1.002 (0.261), `Normal` 1.557 (0.548), `C&C` 1.694 (0.505).
|
||||
- Every class moves for beta>0 (all classes have unequal support); the **rank order is
|
||||
seed-sensitive** (seed 0 top = Weaponization, seed 1 top = RDOS, seed 2 top =
|
||||
Lateral_movement). Displacement is a direct-aggregation measure only, not a detection
|
||||
result. Outputs: `...__prototype_effect_pooled.csv` and the per-seed
|
||||
`...__prototype_snapshot__prototype_effect.csv` / `..._weights.csv`.
|
||||
|
||||
## 9. Client-level findings (validation, vs beta = 0)
|
||||
|
||||
Full detail: `...__multiseed__client_validation_detail.csv`; summary:
|
||||
`...__client_validation_summary.csv`.
|
||||
|
||||
- At `beta = 0.75`, improve/degrade/**unchanged** counts are 7/3/0 (seed 0), 8/1/1
|
||||
(seed 1, tie = client 7), 8/1/1 (seed 2, tie = client 4); mean Δ is positive in all
|
||||
three (+0.021 / +0.027 / +0.058).
|
||||
- At `beta = 1.00`, seed 0 flips to 4 improve / 6 degrade / 0 unchanged, while seed 1
|
||||
improves 9/10 with 1 unchanged (client 7) — the high-beta response is seed-dependent.
|
||||
- `min positive attack N_ij` vs ΔF1 is **non-monotonic**: N=1 clients range −0.021…+0.041
|
||||
at beta=0.75; the largest gain (+0.177) is an N=10 client; low support neither
|
||||
systematically benefits nor degrades. Client ids are different realisations across
|
||||
seeds and are not treated as one population. Descriptive only.
|
||||
|
||||
## 10. Runtime / resources
|
||||
|
||||
CPU only (no GPU). Per run: 41–44 min wall-clock, ~733–740 % CPU, peak RSS ~6.21 GiB,
|
||||
no swap, exit 0. Total ~3.5 h for the five paired candidates. Preprocessing/load
|
||||
negligible.
|
||||
CPU only, no GPU, no swap, exit 0 on all 18 runs (15 new-session + reused). Per-run
|
||||
wall-clock 40:23–42:21; CPU 733–745 %; peak RSS 6.21 GiB (seed 0), 7.48 GiB (seed 1),
|
||||
6.45 GiB (seed 2). New compute this session: 12 runs, ≈ 8 h 11 m wall-clock, run
|
||||
sequentially (8 cores; concurrent runs would not reduce total CPU work).
|
||||
Seed-0 numbers were reused and not re-run. Machine-readable per-run values:
|
||||
`artifacts/analysis/xiiotid__alpha0.5__multiseed__runtime.csv` (added by the audit;
|
||||
seed 0 sourced from Session-5 docs, seeds 1–2 from `/usr/bin/time -v` logs).
|
||||
|
||||
## 11. Methodological decisions / assumptions
|
||||
|
||||
1. **`S_j` participant/denominator rule** (`S_j = {i | N_ij > 0 and valid C_ij}`, equal
|
||||
weights in the baseline) is a **REPRODUCTION ASSUMPTION**, not verified original
|
||||
behaviour; material in 53/162 class-condition cells (32.7 %), 15/18 conditions
|
||||
(`docs/baseline/BASELINE_VALIDATION.md` §D). Carry this caveat in all reporting.
|
||||
weights in the baseline) is a **REPRODUCTION ASSUMPTION**; material in 53/162
|
||||
class-condition cells (32.7 %), 15/18 conditions (`BASELINE_VALIDATION.md` §D).
|
||||
Carry this caveat in all reporting.
|
||||
2. `N_ij` is class-specific sample support, not prototype quality.
|
||||
3. Beta is one value for all classes/clients; candidates frozen at `{0,.25,.5,.75,1}`.
|
||||
4. `lambda=1.0`, Adam, lr 1e-3, batch 256 remain PROJECT DECISIONS.
|
||||
5. **New this session (protocol clarification, documented in
|
||||
`EXPERIMENT_PROTOCOL.md` §8):** candidate validation metric = final-model validation
|
||||
metrics; primary selection = per-client-mean rare-class macro-F1 using a deterministic
|
||||
Dirichlet validation eval partition (mirrors the existing test per-client procedure);
|
||||
tie-break = higher val rare macro-F1 → higher val rare recall → smaller beta.
|
||||
6. No `equal_available` mode was added.
|
||||
4. **PRIMARY selection = pooled validation across clients and seeds**; per-seed selection
|
||||
is secondary stability diagnostics; test used only after the pooled beta is fixed.
|
||||
Documented in `EXPERIMENT_PROTOCOL.md` §8 (updated this session).
|
||||
5. The union of rare classes (and global rare support) differs by seed because partitions
|
||||
differ; only the per-client-mean metric is directly comparable across seeds.
|
||||
6. `lambda=1.0`, Adam, lr 1e-3, batch 256 remain PROJECT DECISIONS. No `equal_available`
|
||||
mode was added.
|
||||
|
||||
## 12. Unresolved questions / blockers
|
||||
|
||||
1. `S_j` reproduction ambiguity — unresolved; no official PROTEAN code exists.
|
||||
2. `beta = 0` is not bitwise identical to `original_protean` (float ordering). Whether the
|
||||
thesis should report this explicitly, or whether an equivalence check should use a
|
||||
tolerance, is a documentation decision for later.
|
||||
3. Single condition only; no multi-seed/multi-alpha evidence yet.
|
||||
2. **Pooled beta selection is statistically weak here:** pooled means span only
|
||||
0.544→0.579 while within-beta across-seed std is 0.075–0.100; three seeds give a
|
||||
standard error of the same order as the between-beta spread. The beta effect is small
|
||||
relative to seed variance.
|
||||
3. `beta = 0` is not bitwise identical to `original_protean`; documentation decision on how
|
||||
to report this remains open.
|
||||
4. Session-2 manifests still store `preprocessing_hash = null` / `config_hash = null`.
|
||||
5. Only alpha=0.50, X-IIoTID, three seeds measured.
|
||||
|
||||
**Audit status (see `docs/research/SESSION6_AUDIT.md`).** No unresolved issue that could
|
||||
change `beta_star` or the scientific interpretation. One inherent audit limitation: the
|
||||
trained model is not persisted, so per-client prediction metrics cannot be recomputed
|
||||
without retraining (forbidden); they were verified via defining source code, exact
|
||||
agreement of their mean with `val_selection.json`, and exact agreement of the global
|
||||
union-rare metric recomputed from `val_confusion_matrix.json`. Pooled std uses the
|
||||
**sample** convention (ddof=1), labelled "(sample)" in the report.
|
||||
|
||||
## 13. Git status
|
||||
|
||||
No commit or push was made. `git status --short`:
|
||||
No commit or push was made. `git status --short` (results/ is ignored):
|
||||
|
||||
```
|
||||
M scripts/run_baseline.py
|
||||
?? artifacts/analysis/xiiotid__alpha0.5__seed0__paired_client_beta_metrics.csv
|
||||
?? artifacts/analysis/xiiotid__alpha0.5__seed0__support_weighted__beta0__prototype_snapshot.json
|
||||
?? artifacts/analysis/xiiotid__alpha0.5__seed0__support_weighted__beta0__prototype_snapshot__prototype_effect.csv
|
||||
?? artifacts/analysis/xiiotid__alpha0.5__seed0__support_weighted__beta0__prototype_snapshot__prototype_weights.csv
|
||||
?? artifacts/analysis/xiiotid__alpha0.5__seed0__support_weighted__beta0.25__prototype_snapshot.json
|
||||
?? artifacts/analysis/xiiotid__alpha0.5__seed0__support_weighted__beta0.5__prototype_snapshot.json
|
||||
?? artifacts/analysis/xiiotid__alpha0.5__seed0__support_weighted__beta0.75__prototype_snapshot.json
|
||||
?? artifacts/analysis/xiiotid__alpha0.5__seed0__support_weighted__beta1__prototype_snapshot.json
|
||||
M docs/handoff/SESSION_HANDOFF.md
|
||||
M docs/research/EXPERIMENT_PROTOCOL.md
|
||||
?? docs/research/MULTISEED_BETA_VALIDATION.md
|
||||
?? docs/research/SESSION6_AUDIT.md
|
||||
?? scripts/analyze_multiseed_beta.py
|
||||
?? artifacts/analysis/xiiotid__alpha0.5__multiseed__*.csv / __selection_summary.json
|
||||
?? artifacts/analysis/xiiotid__alpha0.5__seed{1,2}__*__prototype_snapshot.json
|
||||
?? artifacts/analysis/xiiotid__alpha0.5__seed{1,2}__support_weighted__beta0__prototype_snapshot__{prototype_effect,prototype_weights}.csv
|
||||
?? artifacts/analysis/xiiotid__alpha0.5__seed0__support_weighted__beta{0.25,0.5,0.75,1}__prototype_snapshot.json (pre-existing from Session 5)
|
||||
```
|
||||
|
||||
`planningawal/` and both raw datasets are unchanged; `results/` and
|
||||
`artifacts/processed/` are ignored; `artifacts/analysis/` is tracked.
|
||||
`planningawal/` and both raw datasets are unchanged; `results/` is gitignored.
|
||||
`HEAD = 50f2da72166e4f609077d65b4916f745da5e8e3b`. No commit or push was made.
|
||||
|
||||
## 14. Files created / modified this session
|
||||
|
||||
Created:
|
||||
|
||||
- `docs/research/PAIRED_BETA_VALIDATION.md`
|
||||
- `artifacts/analysis/xiiotid__alpha0.5__seed0__paired_client_beta_metrics.csv`
|
||||
- five `artifacts/analysis/...__support_weighted__beta*__prototype_snapshot.json`
|
||||
- two `artifacts/analysis/...__prototype_snapshot__prototype_effect.csv` / `__prototype_weights.csv`
|
||||
- `docs/research/MULTISEED_BETA_VALIDATION.md`
|
||||
- `docs/research/SESSION6_AUDIT.md` (post-experiment audit)
|
||||
- `scripts/analyze_multiseed_beta.py`
|
||||
- `artifacts/analysis/xiiotid__alpha0.5__multiseed__*` (validation per-seed/pooled,
|
||||
client summary/detail/deltas, prototype-effect pooled, test descriptive, selection
|
||||
summary, and `...__runtime.csv` added by the audit)
|
||||
- seed-1/seed-2 `results/...` run dirs (gitignored) and their snapshots / effect CSVs
|
||||
|
||||
Modified:
|
||||
|
||||
- `scripts/run_baseline.py` (added validation-only evaluation artifacts; test/training paths untouched)
|
||||
- `docs/research/EXPERIMENT_PROTOCOL.md` (§8 Session-5 clarification)
|
||||
- `docs/research/EXPERIMENT_PROTOCOL.md` (§8 selection hierarchy clarified)
|
||||
- `docs/handoff/SESSION_HANDOFF.md` (this file)
|
||||
|
||||
Reused (not regenerated): all seed-0 Session-5 runs and artifacts.
|
||||
|
||||
## 15. Exact recommended next phase
|
||||
|
||||
**Recommendation: B — checkpoint Session 5, then proceed to a controlled
|
||||
multi-seed/multi-alpha experiment.** The protocol ran cleanly (validation/test separation
|
||||
held, artifacts reproducible, pairing proven by byte-identical round-0 snapshots, no test
|
||||
leakage into selection), so the next step is to scale to seeds `{0,1,2}` at a small alpha
|
||||
set, still paired. Do **not** run the entire `dataset × alpha × seed × beta` grid at once;
|
||||
grow it in controlled, inspectable increments.
|
||||
**Session 6 is safe to checkpoint** (audit PASS WITH MINOR CORRECTIONS; no issue affects
|
||||
`beta_star`). The protocol is **mechanically** ready to scale, but Session 6 shows the beta
|
||||
effect at alpha=0.50 is small relative to seed-to-seed variance. Recommended, in order:
|
||||
|
||||
Before scaling: decide how to report the float-level `beta = 0` vs `original_protean`
|
||||
non-identity (§7), and whether to re-run `original_protean` per condition with the new
|
||||
validation artifacts (the existing baseline run predates the validation-artifact change).
|
||||
1. **Do not treat beta=0.75 as a settled optimum.** Report it as "best among tested
|
||||
candidates under pooled validation for X-IIoTID alpha=0.50".
|
||||
2. Before expanding alpha, decide the interpretation question: is the goal to characterise
|
||||
small beta effects against seed noise (requires more seeds), or to run alpha=0.25/0.75
|
||||
as a paired characterisation (accepting the same weak-effect caveat)?
|
||||
3. If expanding, run alpha=0.25 then alpha=0.75 for seeds `{0,1,2}`, the five betas each,
|
||||
reusing frozen manifests, sequentially (~8 h per alpha), with the same pooled
|
||||
validation-only selection. Extend `scripts/analyze_multiseed_beta.py` with `--alpha`.
|
||||
4. Do **not** launch 5G-NIDD or the full grid until the alpha results are inspected.
|
||||
|
||||
## 16. Important commands
|
||||
|
||||
@@ -220,14 +299,18 @@ validation artifacts (the existing baseline run predates the validation-artifact
|
||||
# Tests (75 expected)
|
||||
.venv/bin/python -m pytest
|
||||
|
||||
# One full paired beta run (CPU, ~42 min, ~6.2 GiB)
|
||||
.venv/bin/python scripts/run_baseline.py --dataset xiiotid --alpha 0.5 --seed 0 \
|
||||
# One full paired beta run (CPU, ~41 min, ~6.5-7.5 GiB)
|
||||
.venv/bin/python scripts/run_baseline.py --dataset xiiotid --alpha 0.5 --seed 1 \
|
||||
--clients 10 --rounds 10 --local-epochs 3 \
|
||||
--aggregation-mode support_weighted --beta 0.5
|
||||
|
||||
# Pooled multi-seed validation analysis (read-only, no retraining)
|
||||
.venv/bin/python scripts/analyze_multiseed_beta.py --dataset xiiotid --alpha 0.5 \
|
||||
--seeds 0 1 2
|
||||
|
||||
# Direct prototype-effect analysis (no retraining)
|
||||
.venv/bin/python scripts/analyze_prototype_effect.py \
|
||||
--snapshot artifacts/analysis/xiiotid__alpha0.5__seed0__support_weighted__beta0__prototype_snapshot.json \
|
||||
--snapshot artifacts/analysis/xiiotid__alpha0.5__seed1__support_weighted__beta0__prototype_snapshot.json \
|
||||
--class-names "C&C,Exfiltration,Exploitation,Lateral_movement,Normal,RDOS,Reconnaissance,Tampering,Weaponization" \
|
||||
--output-dir artifacts/analysis
|
||||
```
|
||||
@@ -235,13 +318,13 @@ validation artifacts (the existing baseline run predates the validation-artifact
|
||||
## 17. Recommended next-session prompt
|
||||
|
||||
```
|
||||
You are continuing the perdalam-protean research repository (Session 6).
|
||||
You are continuing the perdalam-protean research repository (Session 7).
|
||||
|
||||
FIRST, read completely:
|
||||
1. docs/handoff/SESSION_HANDOFF.md
|
||||
2. docs/research/PAIRED_BETA_VALIDATION.md
|
||||
3. docs/research/EXPERIMENT_PROTOCOL.md
|
||||
4. docs/research/BETA_AGGREGATION_IMPLEMENTATION.md
|
||||
2. docs/research/MULTISEED_BETA_VALIDATION.md
|
||||
3. docs/research/SESSION6_AUDIT.md
|
||||
4. docs/research/EXPERIMENT_PROTOCOL.md
|
||||
5. docs/baseline/BASELINE_VALIDATION.md
|
||||
|
||||
Critical rules:
|
||||
@@ -253,18 +336,22 @@ Critical rules:
|
||||
- Do NOT add an executable equal_available mode.
|
||||
- Do NOT launch the full alpha x seed x dataset x beta grid.
|
||||
- Beta selection uses validation metrics only; test never influences selection.
|
||||
- PRIMARY selection is pooled across clients and seeds; per-seed selection is
|
||||
diagnostic only.
|
||||
|
||||
Context: Session 5 ran one paired full condition (xiiotid, alpha=0.5, seed=0) across
|
||||
beta in {0,0.25,0.5,0.75,1}. Selected beta = 0.50 on validation per-client-mean
|
||||
rare-class macro-F1; test rare-class macro-F1 0.640829 vs original_protean 0.609620.
|
||||
beta=0 is mathematically but not bitwise equal to original_protean (~1 ULP aggregation
|
||||
ordering). scripts/run_baseline.py now writes validation-only artifacts.
|
||||
Context: Session 6 completed X-IIoTID alpha=0.50 for seeds {0,1,2} across beta in
|
||||
{0,0.25,0.5,0.75,1}. Seed 0 was reused from Session 5. Pooled validation selected
|
||||
beta=0.75 (val per-client-mean rare macro-F1 0.579367); per-seed diagnostics were
|
||||
0.50/1.00/0.75. Pooled-selected test rare macro-F1 0.665503 +/- 0.026685 vs
|
||||
original_protean 0.642520 +/- 0.028683. beta=0 is mathematically but not bitwise equal
|
||||
to original_protean (float ordering), no semantic discrepancy. Between-seed variance is
|
||||
comparable to the between-beta spread, so the selection is weak. A strict independent
|
||||
audit (docs/research/SESSION6_AUDIT.md) returned PASS WITH MINOR CORRECTIONS and
|
||||
independently reproduced beta_star=0.75 from validation artifacts alone.
|
||||
|
||||
Task: scale the paired protocol to a controlled multi-seed/multi-alpha set (e.g. seeds
|
||||
{0,1,2} at alpha 0.50, reusing frozen manifests; grow only as compute allows), keeping
|
||||
validation-only beta selection and reporting all candidates. Decide/document how to
|
||||
report the beta=0 vs original_protean float non-identity. Update docs and
|
||||
docs/handoff/SESSION_HANDOFF.md. Measure runtime before scaling further.
|
||||
|
||||
Use .venv/bin/python for all Python commands. Do not commit or push unless asked.
|
||||
Task: decide and document the alpha-expansion plan (recommended: alpha=0.25 then 0.75,
|
||||
seeds {0,1,2}, five betas each, sequential, reusing frozen manifests, pooled
|
||||
validation-only selection) OR argue for more seeds at alpha=0.50 first. Do not launch
|
||||
5G-NIDD or the full grid. Update docs and docs/handoff/SESSION_HANDOFF.md. Use
|
||||
.venv/bin/python. Do not commit or push unless asked.
|
||||
```
|
||||
Reference in new issue
Block a user