StrataNet vs LSTM vs GRU¶
Design Comparison¶
| LSTM | GRU | StrataNet | |
|---|---|---|---|
| Domain | General | General | Market trading only |
| Hidden state | Opaque N-dim | Opaque N-dim | 4-dim interpretable |
| State bounds | None | None | Hard bounds per dim |
| Gates | Input, forget, output | Update, reset | Update, reset + market projection |
| Output | Raw logits | Raw logits | LONG/SHORT/HOLD + regime + confidence |
| Parameters (default) | ~12,000 | ~9,000 | ~5,000 |
| Label source | Future price required | Future price required | Auto from STRATA teacher |
| Interpretable at inference | No | No | Yes — always |
Hidden State Comparison¶
# LSTM hidden state — 32-dim opaque
h_lstm = [-0.12, 0.34, -0.07, 0.89, ...] # What does dim-3 mean? Unknown.
# GRU hidden state — 32-dim opaque
h_gru = [0.41, -0.22, 0.15, -0.63, ...] # Same problem.
# StrataNet hidden state — 4-dim, always interpretable
h_strata = {
"bias": 0.82, # bullish conviction (0.82 > 0 = bullish)
"momentum": 0.45, # moderate breakout energy
"trap_risk": 0.18, # low trap risk — safe to act
"uncertainty": 0.31, # moderate uncertainty
}
Benchmark Results (Synthetic OHLCV)¶
Trained and tested on 5,000 synthetic OHLCV bars with realistic regime shifts. Labels generated by STRATA state machine teacher (same labels for all models = fair comparison).
| Model | Test Accuracy | Sharpe | Max DD | Params |
|---|---|---|---|---|
| LSTM | ~75% | varies | varies | ~12,000 |
| GRU | ~74% | varies | varies | ~9,000 |
| StrataNet | ~79% | varies | varies | ~5,000 |
Full benchmark notebook:
notebooks/benchmark_stratanet_vs_lstm_gru.ipynb
Why StrataNet Uses Fewer Parameters¶
StrataNet's 4-dim hidden state is an inductive bias — it forces the network to compress all market information into 4 meaningful dimensions rather than spreading across 32+ opaque units.
This is similar to how domain-specific architectures (e.g. ResNet for vision, Transformer for language) outperform generic MLPs by encoding domain knowledge into the architecture itself.
Teacher-Student Training¶
StrataNet uses knowledge distillation from the STRATA rule-based engine:
- Rule-based STRATA processes each OHLCV window and generates action + regime labels
- StrataNet learns to replicate these decisions as a differentiable neural network
- Result: generalises the teacher's pattern recognition, faster at inference
This means no manual labeling — any OHLCV history you have is sufficient for training.