Naga: Vedic Encoding for Deep State Space Models
Abstract
This paper presents Naga, a deep State Space Model (SSM) encoding approach inspired by structural concepts from Vedic mathematics. The proposed method introduces a bidirectional representation for time series by jointly processing forward and time-reversed input sequences. These representations are then combined through an element-wise (Hadamard) interaction, resulting in a Vedic-inspired encoding that enhances the model's ability to capture temporal dependencies across distant time steps. We evaluate Naga on multiple long-term time series forecasting (LTSF) benchmarks, including ETTh1, ETTh2, ETTm1, ETTm2, Weather, Traffic, and ILI. The experimental results show that Naga outperforms 28 current state of the art models and demonstrates improved efficiency compared to existing deep SSM-based approaches. The findings suggest that incorporating structured, Vedic-inspired decomposition can provide an interpretable and computationally efficient alternative for long-range sequence modeling.
Figures & tables
| Criterion | Naga (Ours) | S-Mamba [ 23 ] | LTSMamba | Mamba-2 [ 2 ] |
|---|---|---|---|---|
| Cell Structure | Mamba2-like block applied at feature level using Vedic decomposition. | Mamba Block with parametrized SSM-kernels, bidirectional. | Mamba2-Cell with SSD matrices, TDB, ICB. | SSD-based Mamba2Cell with semi-separable attention kernel. |
| Selectivity | ✓ Adaptive, token-wise feature selection via element-wise decomposition. | ✓ Dynamic kernel selection, token-wise adaptive. | ± Gated forget mechanism + adaptive channel re-ranking. | ✓ Grouped-value attention with selective SSD-state spaces. |
| Bidirectionality | ✓ Bidirectional Vedic encoding. | ✓ Bidirectional Mamba Blocks. | ✓ Bidirectional TDB and ICB structures with attention. | ± Theoretically bidirectional (configurable). |
| Inter-Channel Awareness | ± Moderate – features processed individually, easing interaction learning. | ✗ Weak (standard multivariate input). | ✓ Strong via ICB and adaptive re-ranking. | ± Medium (grouped-value attention). |
| Output Head | Linear head over last Mamba2 time steps. | Feedforward reconstructor layer. | TDB/ICB fused with feedforward and ranking outputs. | LayerNorm followed by linear readout. |
| Efficiency | ✓ Lightweight – element-wise, parallelizable multiplication. | ✓ Lightweight, , dependent on SSM efficiency. | ✗ Heavier due to TDB+ICB complexity. | ✓ Highly efficient due to optimized SSD structure. |
| Dataset | Pred. length | Epochs | Runtime [s] | MSE (Naga) |
|---|---|---|---|---|
| ETTh1 | 96 | 16 | 131.02 | 0.124 |
| ETTh2 | 720 | 73 | 213.31 | 0.139 |
| ETTm1 | 720 | 35 | 2145.10 | 0.117 |
| ETTm2 | 96 | 23 | 275.82 | 0.119 |
| Weather | 96 | 45 | 812.64 | 0.089 |
| Traffic | 96 | 38 | 1150.77 | 0.006 |
Sequence Modeling
Sequence modeling studies how to represent, predict, classify, and generate ordered data such as text, time series, events, and biological sequences.
See all 249 papers