Files
foxhunt/crates/ml
jgrusewski a24c3d2ee0 fix(dqn): regime-blended forward + per-branch action selection for full 45-action diversity
Three critical fixes for the 6/45 action diversity collapse and
RegimeConditional regime routing:

1. DQNAgentType::forward() for RegimeConditional now delegates to
   batch_q_values() which uses GPU regime classification masks to blend
   all 3 heads (trending/ranging/volatile). Previously hard-coded to
   trending head only — ranging/volatile heads were trained but never
   used during experience collection.

2. New batch_branching_q_values() on RegimeConditionalDQN: returns
   per-branch (exposure/order/urgency) Q-values blended across regime
   heads via GPU masks. Enables the GPU action selector's
   select_actions_branching() for per-branch epsilon-greedy.

3. select_actions_batch() and select_actions_batch_gpu() now support
   branching DQN for both Standard and RegimeConditional agents.
   ROOT CAUSE FIX: previously used exposure-only Q-values (0-4) with
   deterministic route_action(), limiting diversity to 6/45 actions.
   Now uses per-branch Q-values with independent epsilon per branch,
   enabling full 45-action exploration.

Tests: ml-dqn=416, ml=915, 0 failures

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 15:48:22 +01:00
..

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 aggregation
  • hyperopt — PSO-based hyperparameter optimization with per-model adapters
  • trainers — unified training loops (DQN, PPO, supervised)
  • inferenceInferenceAdapter trait for prediction
  • checkpoint — model checkpointing and restoration
  • evaluation — walk-forward evaluation pipeline

Usage

use ml::dqn::DQN;
use ml::ppo::PpoTrainer;