Root cause of Q-value saturation at +/-50 seen in train-6nbx5 after ISV v-range unification (9deda5f65,11df03785): cold-start path in `update_eval_v_range` latched `q_std_ema = q_std.max(0.01)` on the first epoch. But that first `q_std` is dominated by the +/-50 bootstrap atom-spread (scaffolding set in construct/reset), NOT by real Q-distribution spread. Result: `3*std_ema` exceeds `min_half_floor=10` and approaches `abs_half=50` immediately, atoms stay wide next epoch, next `q_std` confirms that width, EMA never escapes. Q saturated at +/-abs_half every run. Fix 1 (gpu_dqn_trainer.rs:3106-3120): seed `eval_q_std_ema = min_half_floor / 3.0` at cold start so initial `half = 3 * std_ema = min_half_floor` exactly. Adaptive-rate EMA (alpha clamped to [0.01, 0.3]) then relaxes upward only if genuine Q-spread warrants it. Breaks the self-confirming initialization. Fix 2 (training_loop.rs:479-494): remove leftover pre-clamp of reward quantiles to `config.v_{min,max}`. That was from the earlier quantile-clamp fix (d38a8cf99). Phase 2c (9deda5f65) moved the per-branch clamp inside `warm_start_atom_positions`, which reads each branch's [centre-half, centre+half] from the ISV pinned bus. An outer static clamp to the wider config bound is redundant double-clamping and hides which layer owns the support. Pass raw quantiles through to warm_start. Validated locally: SQLX_OFFLINE cargo check -p ml passes (only pre-existing warnings). Next: push + L40S validation run. Diagnostic instrumentation from423ac460bremains in place to confirm (center, half) trajectory on the next run — will be removed once validated. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ml
10-model ML ensemble for the Foxhunt HFT system, built on Candle v0.9.1.
Models
- DQN (Rainbow) — deep Q-network with prioritized replay, dueling heads, noisy nets
- PPO — proximal policy optimization with GAE, LSTM policies, clip-higher
- TFT — temporal fusion transformer for multi-horizon forecasting
- Mamba2 — state space model for sequence prediction
- Liquid Networks — biologically inspired networks for non-stationary data
- TLOB — transformer-based limit order book analysis
- KAN — Kolmogorov-Arnold networks
- xLSTM — extended LSTM architecture
- TGGN — temporal graph neural network
- Diffusion — diffusion-based generative model
Key Modules
ensemble— model ensemble coordination and confidence aggregationhyperopt— PSO-based hyperparameter optimization with per-model adapterstrainers— unified training loops (DQN, PPO, supervised)inference—InferenceAdaptertrait for predictioncheckpoint— model checkpointing and restorationevaluation— walk-forward evaluation pipeline
Usage
use ml::dqn::DQN;
use ml::ppo::PpoTrainer;