AsianPlayer/TriDrive / code /train /stages_joint.yaml
AsianPlayer's picture
download
raw
9.4 kB
# cwm3 joint-model stage registry (plan §3 I / F; docs/plan_2026-09-10.md claims B2, B3). train/train_cwm3_joint.py --stage S --variant v --seed k
# Base branches (seed k BEST checkpoints of the week-1 stages, results/runs/<STAGE>_<variant>_s<k>): V = V0/can4s by default (config field; can8s = 8 s CAN @5 Hz, x8_ok rows only),
# U = U0/kin_can_noK (chains-only driver GRU; the K residual head is added on the DETACHED trunk in the joint model), E = E0/tok8s (region tokens,
# needed for the road -> driver cross-attention). One model for both regimes (mode embedding). Standardisation statistics come from the base
# checkpoints (train-only), never recomputed.
# recipe: batch, rows_per_epoch, max_epochs, patience, lr (new modules), lr_base_mult (base branches = lr * mult; 0 = frozen), weight_decay,
# sched (warmcos|none), val_rows (all). Selection objective = validation sum of chain NLLs of all three branches + 0.1 L_F
# (models/heads.selection_objective over the merged parts); V terms are masked to x8_ok rows.
# lambda: hz (steer_phase chain weight in V), K (detached K head), F (future latent).
defaults:
regimes: [manual, engaged]
seeds: [0, 1, 2]
minutes: 18
amp: true
grad_clip: 1.0
pred_splits: [test, val]
base: {V: [V0, can4s], U: [U0, kin_can_noK], E: [E0, pooled]} # every base is a CONFIG FIELD (--base-v / --base-e override). V: can4s covers every row, can8s only x8_ok rows (43 % of manual test; 386/512 gold anchors). E: pooled >= region tokens on 2 seeds (Exp3) -> pooled chains / F are the independent E; the region token bank feeds only the road->driver attention
tok_source: region # keys of the road->driver cross-attention: region = raw region token bank via RegionTokenEmbed (default) | enc = the E encoder's own token states
i_hidden: 640
dropout: 0.1
stages:
I1:
recipe: {batch: 1024, rows_per_epoch: 800000, max_epochs: 15, patience: 4, lr: 3.0e-4, lr_base_mult: 0.1, weight_decay: 0.01, sched: warmcos, val_rows: all}
lambda: {hz: 0.5, K: 0.5, F: 0.1}
decoder: direct
variants:
indep: {interactions: [], no_train: true} # the assembled base branches, NO training: the exact independent-branch comparator (ep_p / w composed identically)
none: {interactions: []} # fine-tuning control: same recipe, no interaction modules
all: {interactions: [road2drv, env2veh, drv2veh]}
road2drv: {interactions: [road2drv]}
env2veh: {interactions: [env2veh]}
drv2veh: {interactions: [drv2veh]}
frozen: {interactions: [road2drv, env2veh, drv2veh], recipe: {lr_base_mult: 0.0}} # base branches frozen, only I + K head train
naive: {interactions: [], naive: true} # CONTROL: concatenated trunks -> shared MLP, non-zero init (cwm2-style fusion)
all_enc: {interactions: [road2drv, env2veh, drv2veh], tok_source: enc} # ablation: cross-attention over the (pooled) E encoder states instead of the region bank
naive_fresh: {interactions: [], naive: true, fresh_trunks: true, recipe: {lr_base_mult: 1.0}} # CONTROL 2: naive fusion with ALL trunks / heads randomly initialised (cwm2-style joint training from scratch; trunks at full LR because they start random), same 15-epoch schedule
# 2026-09-11 (coordinator, B2 re-adjudication on v2): the candidate survivor interaction set — env->vehicle + driver->vehicle only (the v1 attribution
# showed road->driver adds nothing to the driver endpoints and is the only path that can touch one); zero-init as before. Dirs I1_all_minus_road2drv_s<k>_v2.
all_minus_road2drv: {interactions: [env2veh, drv2veh]}
# lambda_F = 0 arms (registered for the aligned-F-target hypothesis; variant-level `lambda` replaces the stage lambda, so hz / K are restated)
all_lf0: {interactions: [road2drv, env2veh, drv2veh], lambda: {hz: 0.5, K: 0.5, F: 0.0}}
indep_lf0: {interactions: [], no_train: true, lambda: {hz: 0.5, K: 0.5, F: 0.0}}
# 2026-09-16 (WP3 reviewer controls, pre-registered 06:46:35Z in docs/decisions.md; train/mtl.py): multi-task balancing of the three branch losses instead of the
# plain sum — `mtl` key = uw (Kendall 2018 learned log-variances) | famo (Liu 2023) | pcgrad (Yu 2020 gradient surgery on the shared parameters). On the
# from-scratch naive fusion (all three trunks shared through the fusion MLP) and on the FINAL interaction set (U / E trunks shared with the vehicle loss).
# Everything else = the parent variant's recipe verbatim; dirs I1_<variant>_s<k>_final.
naive_fresh_uw: {interactions: [], naive: true, fresh_trunks: true, mtl: uw, recipe: {lr_base_mult: 1.0}}
naive_fresh_famo: {interactions: [], naive: true, fresh_trunks: true, mtl: famo, recipe: {lr_base_mult: 1.0}}
naive_fresh_pcgrad: {interactions: [], naive: true, fresh_trunks: true, mtl: pcgrad, recipe: {lr_base_mult: 1.0}}
all_minus_road2drv_pcgrad: {interactions: [env2veh, drv2veh], mtl: pcgrad}
# 2026-09-17 (R2 WP4 batch 2 C4 — task-oriented LOW-DIM multi-horizon latent auxiliary objective; models/latent_aux.py; pre-registration docs/decisions.md 2026-09-16T06:46:35Z
# + the C4 lane row of 2026-09-17): the FINAL interaction set + `latent_aux` = {lam, d_z 16, d_hidden 256, d_enc 64, ema 0.99, var_coef 1.0, rec_coef 1.0, horizons [5, 10, 15]}.
# Predictor LN-MLP on the post-interaction trunks -> one 16-d latent per horizon (1 / 2 / 3 s); target = EMA encoder of the 13-d physically / state-supervised future
# vector (lead dRel / vRel / vLead / lane offset / 1/TTC from results/targets_road_dyn, 6 P occupancy bits, hands_on / head_turned occupancy) with validity mask;
# anti-collapse = VICReg variance term + linear read-back (no SimNorm). lam 0 -> train_cwm3_joint.latent_enabled is False: the module is NOT built and the run is
# the parent all_minus_road2drv path bit for bit (the pre-registered control = a re-training of the ECAN main). lam selected on VALIDATION onset PR-AUC.
# Run dirs I1_all_minus_road2drv_lat{0,01,03}_s<k>_final_ecan (train/queue_r2_c4_s<k>.txt: the ECAN main command line with --variant / --out swapped).
all_minus_road2drv_lat0: {interactions: [env2veh, drv2veh], latent_aux: {lam: 0.0, d_z: 16, d_hidden: 256, d_enc: 64, ema: 0.99, var_coef: 1.0, rec_coef: 1.0, horizons: [5, 10, 15]}}
all_minus_road2drv_lat01: {interactions: [env2veh, drv2veh], latent_aux: {lam: 0.1, d_z: 16, d_hidden: 256, d_enc: 64, ema: 0.99, var_coef: 1.0, rec_coef: 1.0, horizons: [5, 10, 15]}}
all_minus_road2drv_lat03: {interactions: [env2veh, drv2veh], latent_aux: {lam: 0.3, d_z: 16, d_hidden: 256, d_enc: 64, ema: 0.99, var_coef: 1.0, rec_coef: 1.0, horizons: [5, 10, 15]}}
# 2026-09-18 (owner question 'front video + driver only, CAN missing'; pre-registration docs/decisions.md 2026-09-18T03:34:28Z): the vehicle branch treated as a MISSING
# modality — `mask_V: true` -> prep_joint zeroes the V input and marks no row V-valid (V losses / selection terms vanish, valid_V = 0 in every pack), CWM3Joint.trunk_V
# returns exact zeros; no interaction module (env2veh / drv2veh are V-side residuals). U + visual-only E (--base-dir-e E0_pooled_P_s<k>_v2), FINAL recipe otherwise.
# Run dirs I1_ue_noV_s<k>_final (train/queue_ue_nov_s<k>.txt). Default off everywhere else -> every older variant bit for bit.
ue_noV: {interactions: [], mask_V: true}
experiment: "B2: every branch's own endpoints not worse than indep AND >= 1 cross-leg endpoint (C1 / C2) improves; naive fusion as the control"
F1:
recipe: {batch: 1024, rows_per_epoch: 800000, max_epochs: 15, patience: 4, lr: 3.0e-4, lr_base_mult: 0.1, weight_decay: 0.01, sched: warmcos, val_rows: all}
lambda: {hz: 0.5, K: 0.5, F: 0.1}
decoder: chunked
variants:
chunked: {interactions: [road2drv, env2veh, drv2veh], decoder: chunked} # 5 chunks x 1 s, deterministic latent advance, parameter-matched
direct_fresh: {interactions: [road2drv, env2veh, drv2veh], decoder: direct_fresh} # the same model with re-initialised flat 25-step heads (fair fresh-vs-fresh pair)
# 2026-09-12 (GPU-baselines agent, experiment E — cwm3-native world-model baseline; models/decoders_rssm.py; results/tables/stage_F_rssm.md): RSSM-style
# STOCHASTIC latent rollout decoder (prior / posterior Gaussian latent per 1-s chunk, GRU transition fed by the model's own expected emissions, KL with
# 1-nat free bits, teacher forcing annealed to free rollout over 4,000 steps, 32 prior samples with Rao-Blackwellised hazards at prediction), parameter-
# matched ±5 % to the direct head; its fresh-direct control with the SAME interaction set = the FINAL main model's (env2veh + drv2veh). Trained on the
# final bases with train/train_cwm3_rssm.py (train_cwm3_joint as a library: KL term + target context; `direct_fresh_am` runs on the plain joint trainer).
rssm: {interactions: [env2veh, drv2veh], decoder: rssm}
direct_fresh_am: {interactions: [env2veh, drv2veh], decoder: direct_fresh}
experiment: "B3: chunked decoder F not worse than the direct 25-step decoder on all endpoints and >= 1 endpoint improves (also vs I1/all = pretrained direct heads)"

Xet Storage Details

Size:
9.4 kB
·
Xet hash:
a05413858fa7c80971c8b143a70020069ad43fd09316c2a8f93a1cc638ef528a

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.