# results_ms_feat_coral

**Claim:** `ms-feat-coral` — label-free CORAL / diagonal-affine on **24-d stem ms features** (same family as `ensemble_clf_transformer_v2.build_features` ms), then frozen `stem_ms96` SWA (+ fuse for selected) forward.

**Honesty:** Adapting with unlabeled *AASD/Carta feature moments* is stronger than train-only whitening. Still **no label leakage** (att unused for loss, selection, or moment fit). Distinct from `ext-coral-logits` (4-seed / 1-D) and 1-D online-moment.

**Compute:** Held `gpu.lock`. Cached ms24 under `models/ms_feat_coral/cache/`. Stem forward ~1–2 min/held on contended V100.

## Method

1. Build/cache 24-d ms features for LODO CORPUS + AASD/Carta.
2. Fit (per LODO held, source = non-held): CORAL s2t / CORAL t2s / train-only whiten / diagonal affine → unlabeled AASD (or pool) moments; apply map to **all** features before stem.
3. Frozen SWA `held-*` / `all5` infer; select transform by mean LODO Acc then H @ 0.994/0.8.
4. Score AASD/Carta @ same preset. Fuse IRM↔SWA w=0.5 reported for selected (identity).

Artifacts: `ms_feat_coral.py`, `results/research/ms_feat_coral.json`, `models/ms_feat_coral/`, `experiments/ms_feat_coral.log`.

## LODO (SWA; select Acc then H)

| Variant | mean H / Acc | AVGC H / Acc |
|---------|--------------|--------------|
| **identity (SELECTED)** | **0.8700 / 82.61** | **0.8015 / 74.91** |
| coral_t2s_AASD | 0.8576 / 81.09 | 0.7888 / 74.40 |
| coral_AASD (s2t) | 0.4917 / 72.21 | 0.6348 / 64.23 |
| coral_whiten | 0.5414 / 68.37 | 0.5309 / 58.59 |
| affine_diag_AASD | 0.2756 / 51.08 | 0.4570 / 57.13 |

Full s2t CORAL / diag affine / whiten **destroy** LODO H when applied through the frozen stem; t2s is closer but still below identity.

## External (preset HMM; SWA all5)

| Variant | AASD H / Acc | ΔAcc vs 53.12 | Carta H / Acc |
|---------|--------------|---------------|---------------|
| **identity (selected)** | **0.6202 / 51.08** | **−2.04** | **0.5507 / 48.68** |
| coral_t2s_AASD | 0.6146 / 50.84 | −2.28 | 0.5402 / 47.79 |
| coral_AASD | 0.6146 / 50.66 | −2.46 | 0.5620 / 50.38 |
| coral_whiten | 0.5888 / 50.45 | −2.67 | 0.5310 / 49.21 |
| affine_diag_AASD | 0.5496 / 50.71 | −2.41 | 0.5685 / 50.50 |
| fuse identity | 0.6179 / 50.94 | −2.18 | 0.5461 / 48.38 |

## Verdict

- LODO selector → **identity** (raw SWA). No adapted map improves train Acc/H.
- Selected AASD Acc **51.08** vs linear_hp30 **53.12** (Δ **−2.04**); gap to 60 remains **~−8.9**.
- Feature-space global CORAL through frozen stem is harmful on LODO and does not lift AASD Acc (all adapted ≤51.08). Bottleneck is not a global 1st/2nd-order shift of the 24-d ms stack.

## Do not repeat

Do not rerun global CORAL / diag-affine / train-whiten of **24-d ms features** through frozen stem_ms96 SWA onto AASD/Carta unlabeled moments at this HMM. Per-subject / layer-wise / online feature adapt would be a different claim.

## NEXT IDEA

**Partial / layer-wise feature adapt:** keep raw ms for the stem skip/early dilated path; apply mild diag scale only to a held-out subset of the 24 channels selected by LODO (or CORAL on the 4 raw seed channels only inside the 24-d stack). Orthogonal to global 24-d CORAL and to 1-D logit moment match.
