HiSTM: Hierarchical SpatioTemporal Mamba for Spatiotemporal Forecasting of Cellular Traffic Networks
HiSTM (“High S T M” — /haɪ ɛs tiː ɛm/) is a hierarchical Mamba-based neural architecture for spatiotemporal forecasting tasks such as cellular network traffic prediction. It combines convolutional spatial encoding, state-space temporal modeling (Mamba), and temporal attention aggregation into a unified, lightweight framework.
HiSTM addresses the challenge of forecasting spatially distributed time series (e.g., traffic volumes over a 2D grid) by capturing:
- Spatial correlations via convolutional encoders
- Temporal dependencies via Mamba selective state-space models
- Dynamic relevance of time steps via a temporal attention mechanism
The model learns to predict the next-step traffic intensity at the center cell of each spatiotemporal patch.
- Hierarchical Encoding – Stacked encoder layers extract multiscale spatiotemporal features.
- Mamba Temporal Modeling – Leverages the efficient state-space dynamics of Mamba (Gu et al., 2024) to replace recurrent or attention-based temporal modules.
- Temporal Attention – Aggregates all time-step features adaptively instead of using only the last hidden state.
- Lightweight & Efficient – Comparable or superior performance to transformer baselines with fewer parameters.
Given a sequence of past spatial observations
the task is to predict the next-step traffic volume
For each spatial coordinate
and predict the next value at the center cell:
where
Each encoder layer performs:
- 2D Convolution: Captures local spatial patterns at each time step.
- Mamba SSM: Models temporal dependencies across the sequence for each spatial position independently.
The encoded temporal features at the center spatial cell are combined using attention weights:
producing a weighted context vector
A two-layer MLP maps the aggregated context vector to the final scalar prediction:
git clone https://github.com/ZineddineBtc/histm.git
cd histm
pip install -e .- Python ≥ 3.8
- PyTorch ≥ 2.0
- mamba-ssm
You can install dependencies manually:
pip install torch mamba-ssmimport torch
from histm import HiSTM
# Define input dimensions
B, T, H, W = 32, 6, 11, 11
x = torch.randn(B, T, H, W)
# Initialize model
model = HiSTM(device='cuda' if torch.cuda.is_available() else 'cpu')
# Forward pass
with torch.no_grad():
y = model(x)
print("Output shape:", y.shape) # (B, 1)HiSTM was benchmarked against several state-of-the-art spatiotemporal forecasting models:
| Model | Description |
|---|---|
| STN | CNN-based spatiotemporal forecasting network |
| xLSTM | Scalable exponential-gate LSTM |
| STTRE | Transformer with relative embeddings |
| VMRNN | Vision Mamba–LSTM hybrid |
| PredRNN++ | Recurrent memory network with spatiotemporal flow |
| PatchTST | Patch-based Transformer for time series |
| TimesNet | Time–frequency decomposition model |
| Informer | ProbSparse Transformer for efficient long forecasting |
| Autoformer | Decomposition-based auto-correlation Transformer |
If you use HiSTM in your research, please cite:
@article{Bettouche2025histm,
title={HiSTM: Hierarchical SpatioTemporal Mamba for Cellular Traffic Forecasting},
author={Zineddine Bettouche, Khalid Ali, Andreas Fischer, Andreas Kassler},
year={2025},
journal={arXiv preprint arXiv:2508.09184}
}HiSTM builds upon:
- Mamba SSM
- PyTorch
- Foundational ideas from spatiotemporal modeling and time series forecasting research.
histm/
├── histm/
│ ├── __init__.py # Exports HiSTM
│ ├── model.py # Core HiSTM architecture
│ ├── __version__.py
├── pyproject.toml
├── README.md
└── examples/
└── test_forward.py
Developed for research in spatiotemporal forecasting.
