Empirical data from commit61ab27ff3across 14 captured epochs of the TD-propagation smoke test: HEALTH_DIAG[N]: ... gems [g6_branch_indep=X g10_temporal=Y g12_predictive=Z] G10 temporal_consistency: 0.000000 to 0.000002 (essentially zero) G6 branch_independence: 0.000102 to 0.000273 (~1e-4) G12 predictive_coding: 0.07 to 9657.83 (real signal) Verdict by V7-gem methodology — when an existing mechanism already covers the signal, wiring backward adds gradient noise without value: G10: spectral_norm (already wired on all 12 weight tensors) enforces a global Lipschitz constraint that subsumes per-pair Lipschitz on similar-state pairs. Cosine similarity between consecutive h_s2 samples is almost never > 0.95 anyway. Penalty value is below floating-point noise. G6: NoisyNets injects different parameter noise per layer; the 4 advantage branches are already 99.99% diverse. Penalty value is 4 orders of magnitude smaller than G12's working signal. G12: KEEP — backward already wired in commite72885e8b, demonstrably reduced Best Sharpe variance from [13, 22] to [17.99, 19.56] (~6× tighter). Real gem. Changes: - Removed compute_branch_independence + compute_temporal_consistency calls from submit_aux_ops (no per-step kernel launches for G6/G10) - Removed g6/g10 columns from HEALTH_DIAG (kept g12) - Added comment block in submit_aux_ops documenting WHY they were measured-then-removed (V7 methodology trail for future-readers) What stays for now (deletable in a follow-up cleanup): - branch_independence_penalty kernel + branch_indep_kernel field + branch_indep_penalty_buf alloc - temporal_consistency_penalty kernel + temporal_consistency_kernel field + temporal_per_sample_buf + temporal_penalty_buf allocs - branch_indep_loss_value() / temporal_loss_value() readback methods - read_gem_losses() pass-through (now returns (g6=0, g10=0, g12=value)) - compute_branch_independence + compute_temporal_consistency Rust fns Keeping these as scaffolding means: if future evidence (different env, different scale, different model) shows the underlying signal IS material in some regime, re-wiring is just adding the call back to submit_aux_ops. The measurement infrastructure stays in place. Files touched: crates/ml/src/trainers/dqn/fused_training.rs (-12 / +14) crates/ml/src/trainers/dqn/trainer/training_loop.rs (-13 / +9) Verified: cargo check passes. Smoke test should now match the G12-only baseline variance of [17.99, 19.56] (next session can verify). 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;