Files
foxhunt/docs
jgrusewski 9dbd8d7e9f docs(design): unify training and validation environments
Design document for the follow-up to the adaptive-learning-rootcause
session. Lays out the evidence, root cause, options considered, and
recommended path for closing the 70% structural gap between training
and validation Sharpe that remained after the distillation collapse
fix landed.

Key findings documented:
- Reward-shaping ablation (2026-04-20) closed ~30% of the gap; ~70%
  remains architectural
- Two env kernels (experience_env_step vs backtest_env_step) have
  drifted: spread scaling, fill model, saboteur noise, reward terms,
  action selection, position dynamics all differ
- Hint from history: experience_kernels.cu:1418 comment "Regime-
  adaptive scaling removed to eliminate train/eval mismatch" shows
  someone aligned *some* things previously

Recommended path (Option C, "unified env with layered reward"):
- Single unified_env_step kernel replaces both
- Core reward = pure P&L; shaping is additive and P&L-units-aligned
- Validation = training with exploration_scale=0 AND shaping_scale=0
- Scale factors are pinned device-mapped scalars (same pattern used by
  the distillation alpha fix)

Phased implementation plan with ~8-day budget and concrete success
criteria: validation Sharpe_raw within 0.05 of training Sharpe_raw by
epoch 30 on L40S production run.

Rejected alternatives: backtest-matches-training (hides real issue),
training-matches-backtest (regresses stability), two-environment with
divergence as metric (fallback only).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 00:22:05 +02:00
..