# results_stem_stochdepth

DropPath / stochastic depth fine-tune of `stem_ms96` from SWA checkpoints. Patches PyTorch `TransformerEncoderLayer` residuals (FFN + attention) with per-sample keep-prob DropPath; linear depth schedule layer *i* uses `p·(i+1)/N`. Absolute `pos` + dilated stem + 24-d ms / w96 unchanged. Distinct from v4 `rel_ms` relative-bias local attention (already used stochdepth 0.1). Init `models/stem_ms96_swa/{held-*,all5}.pt` with causal `-inf` mask restored. EMA 0.995 eval. Smoke p∈{0.05,0.1,0.2} (40 steps, held-AVGC) → **p=0.1** (all frame-acc 0.914; lowest loss). Full run 1000 steps, batch 512, ATTN_DROP=1. HMM preset p_stay 0.994 scale 0.8. Also scored causal tau-30 high-pass (`hp30`; corpus emissions). Never used AASD/Carta labels.

Code: `stem_ms96_stochdepth.py`. Checkpoints: `models/stem_ms96_stochdepth/`. JSON: `results/research/stem_ms96_stochdepth.json`. Log: `experiments/stem_ms96_stochdepth.log` / `stem_ms96_stochdepth_console.log`.

## LODO (preset)

| Held-out | Stoch H | Stoch Acc % | stem_ms96 | SWA | IRM↔synth fuse | hp30 H | hp30 Acc % |
|---|---:|---:|---|---|---|---:|---:|
| AVGC | 0.8149 | 75.38 | 0.7945/74.06 | 0.8015/74.91 | **0.8192/75.52** | 0.7769 | 70.84 |
| DTU | 0.9013 | 89.35 | 0.9061/89.85 | 0.9003/89.52 | — | 0.8179 | 69.58 |
| KUL | 0.8690 | 81.99 | 0.8755/82.33 | 0.8769/82.35 | — | 0.8460 | 74.10 |
| UHD | 0.8528 | 80.43 | 0.8407/79.47 | 0.8553/80.09 | **0.8614**/— | 0.8108 | 72.67 |
| USTC | 0.9206 | 86.32 | 0.9219/86.36 | 0.9161/86.19 | — | 0.8255 | 70.30 |
| **mean** | **0.8717** | **82.69** | **0.8677/82.42** | **0.8700/82.61** | **0.8790/83.11** | | |

## External (preset)

| Set | Stoch H | Stoch Acc % | linear_hp30 | SW2/swmix best | Stoch_hp30 H/Acc |
|---|---:|---:|---|---|---|
| AASD | 0.6203 | 51.07 | 0.6422/53.12 | **53.53** | 0.5896/50.71 |
| Carta2026 | 0.5413 | 48.19 | 0.6520/60.54 | 59.71 | 0.5626/49.35 |

## Targets

| Target | Result |
|---|---|
| AVGC H≥0.85 and Acc≥78 | miss (0.8149/75.38); +0.0134 H / +0.47 Acc vs SWA; −0.0043 H / −0.14 Acc vs IRM↔synth fuse; still open |
| UHD H≥0.85 | met (0.8528); already met under SWA/fuse |
| AASD Acc>60 with H>0.63 | miss (0.6203/51.07); Acc flat vs SWA, below linear_hp30 53.12 / SW2-swmix 53.53 |
| Carta vs linear_hp30 | moved away (0.5413/48.19) |

## Notes

- Smoke p=0.05/0.1/0.2: identical frame-acc 0.914; p=0.1 slightly lowest train loss → selected.
- Mean LODO ≈ SWA/SAM; AVGC is a small lift vs SWA but does not clear 0.85/78 and does not beat IRM↔synth fuse AVGC.
- No open target flipped. Do not rerun DropPath/stochdepth grids on abs-pos stem_ms96 SWA.
