arXiv:2610.10323cs.LGOct 2026

Manuscript Offprint

arXiv:2610.10323

HAN-Mamba: Hierarchical Selective State Space Networks for Multi-Scale Financial Volatility Forecasting

Mihai Bogdan Deaconu, Ioan Daniel Pop

Mihai Bogdan Deaconu 1^{1}[0009-0003-9744-6091] and Ioan Daniel Pop 1^{1}[0000-0002-3740-6579]

Faculty of Mathematics and Computer Science, Babeş-Bolyai University,

Cluj-Napoca, Romania

deaconu.mihai.bogdan@gmail.com, ioan.daniel.pop@ubbcluj.ro

Abstract. Short-horizon realized volatility forecasting requires the integration of market information that evolves at incompatible temporal resolutions, from second-level order book dynamics to weekly regime drift. Our conference work introduced HAN-T, a hierarchical architecture in which scale-specific Transformer encoders process short, mid, and long-horizon streams and a learned attention fuser weighs their contributions. This article replaces the quadratic attention encoders with selective state space (Mamba) encoders while retaining attention only in the fuser, where the input is a three-token set rather than a long sequence. The resulting hybrid, HAN-Mamba, summarizes each stream through a recurrent state whose input-dependent gating matches two structural properties of volatility: persistent but decaying memory and abrupt regime shifts. On the Optiver Realized Volatility Prediction benchmark under time-aware five-fold cross-validation, HAN-Mamba improves mean RM-SPE over HAN-T (0.1942 vs. 0.1965) with 33% fewer parameters. Its linear-time encoders further allow the high-frequency context to be extended from 60 to 240 buckets, reducing error to 0.1927 where the attention variant saturates, and support constant-time streaming updates at inference. Ablations attribute the gains to the encoder swap, confirm that the hierarchical prior transfers across sequence-model families, and show that the permutation-invariant attention fuser remains the correct mechanism for cross-scale integration.

Keywords: Volatility Forecasting · State Space Models · Mamba · Hierarchical Architectures · High-Frequency Finance · Time-Series Analysis.

1 Introduction

Realized volatility is the operative measure of short-term risk in modern electronic markets. Accurate forecasts over horizons of minutes drive option market making, execution scheduling, and intraday risk limits, and the data supporting

∗^{*} This article is a revised and extended version of our paper presented at ICAART 2026 [14].

M.B. Deaconu and I.D. Pop

such forecasts arrive as high-frequency order book and trade streams whose statistical structure spans several temporal scales at once. Volatility clusters at the daily scale, decays slowly at the weekly scale, and reacts within seconds to liquidity shocks, a combination that has long resisted single-resolution models [10, 5].

In our conference paper [14] we addressed this multi-scale structure architecturally. The proposed HAN-T processes three time-synchronized streams, a high-frequency feature sequence together with daily and weekly volatility histories, through asymmetric scale-specific Transformer encoders, and integrates the resulting summary tokens with a lightweight attention fuser. Under time-aware cross-validation on the Optiver Realized Volatility Prediction (ORVP) benchmark, HAN-T outperformed econometric, gradient boosting, and flat Transformer baselines, and ablations isolated the contribution of both the hierarchy and the learned fusion.

Limitations of Attention Encoders in This Setting. The encoders carry almost all of the sequence-processing burden in HAN-T, and self-attention is an expensive mechanism for that role. Its cost and activation memory grow quadratically with sequence length, which in practice caps the high-frequency context at 60 buckets and makes longer histories disproportionately costly. Order information must be injected through learned absolute positional embeddings, which are tied to a fixed training length and transfer poorly when the context is extended. At deployment time, each new 10-minute bucket forces a full recomputation over the entire window, since the encoder maintains no state between predictions. None of these costs purchases a needed capability: the encoder output is a single summary vector, not a token-level representation, so the all-pairs interaction structure that justifies attention is largely discarded at readout.

Selective State Spaces as Sequence Encoders. Selective state space models [17] offer a sequence operator whose inductive bias aligns with volatility dynamics rather than merely approximating attention at lower cost. A discretized state space recurrence propagates a hidden state with multiplicative decay, the natural analogue of volatility persistence with fading memory [11]. The selection mechanism of Mamba makes the state transition input-dependent, so the model can retain information through calm periods and rapidly discount stale context when a liquidity shock arrives, an architectural counterpart of regime-dependent memory. Computation is linear in sequence length, inference reduces to a constant-time state update per new observation, and the hardware-aware scan keeps the operator fast on modern accelerators [17, 13].

Our Approach. We propose HAN-Mamba, a hybrid revision of HAN-T that allocates each mechanism where its inductive bias is warranted. The three scale-specific encoders become stacks of Mamba blocks read out through their final recurrent state, which removes positional embeddings and the classification token entirely. The fuser remains a small Transformer: its input is a set of three scale summaries with no canonical ordering, so a causal scan would impose an arbitrary bias, while at length three the quadratic cost objection is vacuous and the attention weights stay directly interpretable. This selective placement follows the design logic of recent hybrid attention-SSM stacks [20], applied here at the granularity of architectural roles rather than interleaved layers. Our contributions are summarized as follows:

  1. We introduce HAN-Mamba, a hierarchical hybrid in which selective state space encoders with final-state readout replace the Transformer encoders of the conference architecture, and we motivate the swap through the correspondence between selective forgetting and regime-dependent volatility memory (Sect. 4.2).

  2. We give a set-versus-sequence analysis of cross-scale fusion, arguing that attention is the correct operator for the three-token fusion stage, and we validate the analysis with an ablation over four fusion designs, including order-sensitivity of recurrent fusers (Sect. 5.4).

  3. We exploit the linear-time encoders to extend the high-frequency context from 60 to 240 buckets, a regime the conference architecture could not usefully reach, and we characterize accuracy and cost along this axis (Sects. 5.3 and 5.5).

  4. We strengthen the econometric grounding of the framework by connecting the three-stream hierarchy to the heterogeneous-horizon cascade of the HAR model and to the stylized facts of volatility, positioning the architecture within both literatures (Sects. 2 and 6).

Relation to the Conference Version. This article extends [14]. The feature engineering pipeline, the multi-scale stream construction, the evaluation protocol, and the baseline suite are inherited from the conference version and are summarized here in condensed and rewritten form, with the original paper as the reference for full detail. New material comprises the selective state space background (Sect. 3.2), the HAN-Mamba architecture and its design analysis (Sect. 4.2), the treatment of padding under selective gating (Sect. 4.3), the Flat Mamba baseline, the context-length scaling study (Sect. 5.3), the fusion and encoder-placement ablations (Sect. 5.4), the computational efficiency analysis (Sect. 5.5), the extended related work on state space models, and the discussion of Sect. 6. All experimental results for HAN-Mamba and its variants are new.

References (32)