# results_temporal_cpc_stem

Temporal **CPC** (Oord et al.) **label-free** pretrain of `stem_ms96` encoder: causal GRU context predicts future frame latents via InfoNCE, then LODO supervised BCE FT of stem+head. Per fold: pretrain on the four train datasets only (held-out never seen). all5 for external. EMA 0.995. HMM **0.994 / 0.8**. Also **fuse w=0.5** with frozen `stem_ms96_synth_switch` (tip protocol).

**Not** VICReg/Barlow, DANN/GRL, IRM, Mixup/focal retunes, ContrastAAD speech InfoNCE, multi-stem attn.

Code: `stem_ms96_cpc_pretrain.py`. JSON: `results/research/stem_ms96_cpc_pretrain.json`. Ckpts: `models/stem_ms96_cpc/`.

Hyperparams: `PRE_STEPS=400`, `FT_STEPS=600`, batch 512, CPC offsets `{2,4,8,12,16,24}`, temp 0.1, stride 4. Random stem init (no focal tip warm-start for primary trunk).

## Smoke (held-AVGC, pre=80 ft=80)

| frame-acc | AVGC H/Acc | near_chance |
|----------:|------------|-------------|
| 0.792 | 0.7477/69.92 | **no** |

Passed chance gate (Acc≥55, H≥0.70). Continued to full LODO.

## Pure CPC→FT LODO @0.994/0.8

| Held | H | Acc |
|------|--:|----:|
| AVGC | 0.7832 | 73.17 |
| DTU | 0.8908 | 89.87 |
| KUL | 0.8594 | 81.57 |
| UHD | 0.8299 | 78.68 |
| USTC | 0.9174 | 85.80 |
| **mean** | **0.8561** | **81.82** |

AVGC vs tip fuse **0.8226/75.54**: ΔH **−0.0394**, ΔAcc **−2.37**. Miss ≥0.85/78.

## Fuse w=0.5 CPC↔synth

| Held | H | Acc |
|------|--:|----:|
| AVGC | 0.8031 | 74.49 |
| DTU | 0.9171 | 90.85 |
| KUL | 0.8787 | 82.72 |
| UHD | 0.8459 | 79.87 |
| USTC | 0.9267 | 86.93 |
| **mean** | **0.8743** | **82.97** |

AVGC fuse vs tip **0.8226/75.54**: ΔH **−0.0195**, ΔAcc **−1.05**. Below tip LODO **0.8821/83.36**. UHD fuse H **0.8459** (below 0.85).

## External (all5 CPC→FT)

| Set | pure H/Acc | fuse w=0.5 H/Acc | vs Acc tip 53.53 / Carta hp30 60.54 |
|-----|------------|------------------|-------------------------------------|
| AASD | 0.6249/**51.59** | 0.6221/**51.19** | ΔAcc ≈−2.0 vs tip; Acc>60=**NO** |
| Carta2026 | 0.5668/50.75 | 0.5581/50.13 | ≪60.54 |

## Tip moved?

**NO.** LODO/AVGC tip remains focal↔synth w=0.5 **0.8821/83.36; AVGC 0.8226/75.54**. Acc tip remains SW2↔swmix **53.53**.

## Verdict

Temporal CPC on ms stem latents (scratch encoder) then LODO FT is above chance and similar to VICReg on mean LODO, but **regresses AVGC vs tip fuse** (−0.0195 H) and does not help AASD Acc. Together with VICReg, **label-free SSL pretrain→FT on this stem** does not close the AVGC gap. Do not re-grid CPC offsets/temp or VICReg coeffs on stem_ms96.

## NEXT IDEA

Unused GPU: **spectrogram ViT Acc front-end** (patch STFT/Mel of eaP EEG → tiny ViT → antisymmetric DirectNet; swap+chance; LODO+ext) **or** **subject-conditional calibration** on frozen tip fuse / Acc tip using LODO-train subject moments only (no AASD/Carta labels). Not VICReg/CPC/Barlow SSL re-grid, not DANN/IRM/Mixup/focal, not Path A classical, not switch-schedule FT.
