Papers
Topics
Authors
Recent
Search
2000 character limit reached

Spatio-Temporal Semantic Mamba-Attention

Updated 16 January 2026
  • The paper introduces STS-MA, which integrates semantic graph convolution with temporal state-space modeling for enhanced spatio-temporal forecasting.
  • It employs dual temporal encoders—local masked attention and Mamba SSM—to effectively capture long-range dependencies and transfer semantic patterns.
  • Empirical results demonstrate improved prediction accuracy and robustness in urban accident risk and traffic flow forecasting under noisy conditions.

Spatio-Temporal Semantic Mamba-Attention (STS-MA) is an advanced architectural module designed to model complex, long-range dependencies in spatio-temporal data, combining selective state-space memory with attention-based mechanisms. Its origins trace to recent developments in multi-task urban accident risk forecasting and efficient traffic flow prediction, prominently within the MLA-STNet and ST-MambaSync frameworks. STS-MA’s central innovation is the fusion of semantic graph convolution with temporal Mamba-style state-space modeling and local masked attention, resulting in high interpretability, scalability, and empirical robustness in spatio-temporal forecasting tasks (Fang et al., 9 Jan 2026, Shao et al., 2024).

1. Principle Architecture and Pipeline Integration

STS-MA operates as a specialized branch in dual-stream spatio-temporal forecasting pipelines. In MLA-STNet, it complements the Spatio-Temporal Geographical Mamba-Attention (STG-MA) grid branch with a semantic node-centric approach. Specifically, STS-MA ingests per-node, per-timestep semantic features Xsem∈RT×N×FsemX^{sem}\in\mathbb R^{T\times N\times F_{sem}} alongside multi-type, city-specific support graphs, assembling them into a block-diagonal global adjacency A∈RN×NA\in\mathbb R^{N\times N} with N=∑kNkN=\sum_k N_k across CC cities. This design enables multi-task training with shared weights while preserving individual semantic spaces—critical for cross-city accident risk prediction (Fang et al., 9 Jan 2026).

In traffic flow prediction (ST-MambaSync), STS-MA functions as the "ST-Mamba block" after joint spatio-temporal Transformer attention, consuming mixed context matrices and enhancing sequence modeling via linear state-space recurrence (Shao et al., 2024).

2. Semantic Embedding and Multi-Graph Convolution

STS-MA’s input features undergo two successive 1×11\times1 convolutions (nodewise MLPs) to produce latent embeddings Hsem∈RT×N×DH^{sem}\in\mathbb R^{T\times N\times D}:

Hsem=Conv1×1(2)(ReLU(Conv1×1(1)(Xsem)))H^{sem} = \mathrm{Conv}_{1\times1}^{(2)}\bigl(\mathrm{ReLU}(\mathrm{Conv}_{1\times1}^{(1)}(X^{sem}))\bigr)

It aggregates structural information from heterogenous semantic supports—road, risk (historical crash co-occurrence), POI (points-of-interest), and a learnable "adaptive" low-rank support:

Aadp=Softmaxrow(ReLU(E1E2T))A^{adp} = \mathrm{Softmax}_{\text{row}}(\mathrm{ReLU}(E_1 E_2^T))

Normalized supports A^j\widehat{A}_j are input to LL layers of multi-graph GCN (weights shared across cities):

A∈RN×NA\in\mathbb R^{N\times N}0

This yields temporally stratified node embeddings A∈RN×NA\in\mathbb R^{N\times N}1. Such multi-graph convolution allows transfer of risk-inducing semantic patterns while respecting local road structures via block-diagonal adjacencies (Fang et al., 9 Jan 2026).

3. Temporal Modeling: Fusion of Local Attention and Mamba SSM

STS-MA applies two parallel temporal encoders to node sequences:

  • Local Masked Multi-Head Attention (LMA): For each node A∈RN×NA\in\mathbb R^{N\times N}2 and time A∈RN×NA\in\mathbb R^{N\times N}3, attention is restricted to a sliding causal window A∈RN×NA\in\mathbb R^{N\times N}4:

A∈RN×NA\in\mathbb R^{N\times N}5

A∈RN×NA\in\mathbb R^{N\times N}6

  • Spatio-Temporal Mamba State-Space Model (STM): Independently for each node, selective memory is computed via:

A∈RN×NA\in\mathbb R^{N\times N}7

  • Channel-wise Fusion: Local and global signals are fused with adaptive gating and layer normalization:

A∈RN×NA\in\mathbb R^{N\times N}8

Only the latest timestep A∈RN×NA\in\mathbb R^{N\times N}9 is retained for spatial projection (Fang et al., 9 Jan 2026).

In ST-MambaSync, STS-MA efficiently models long-range dependencies by running a selective SSM recursion mapped via parameter projections from a linearly transformed context embedding. It is formally equivalent to an attention-weighted sum plus a residual skip connection (Shao et al., 2024).

4. Spatial Projection and Output Fusion

After temporal modeling, node-level features N=∑kNkN=\sum_k N_k0 are projected back onto the spatial grid via a city-block-diagonal mapping N=∑kNkN=\sum_k N_k1:

N=∑kNkN=\sum_k N_k2

For each city, N=∑kNkN=\sum_k N_k3 is fused with the geographical branch output N=∑kNkN=\sum_k N_k4 using a learned sigmoid gate, followed by a N=∑kNkN=\sum_k N_k5 convolutional output head to generate risk maps (Fang et al., 9 Jan 2026). In ST-MambaSync, the STS-MA output is projected back from sequence to grid shape, added to the residual, normalized, and passed to a regression head (Shao et al., 2024).

5. Parameter Sharing and Semantic Separation

All primary learnable weights—including Mamba kernels, attention projections, GCN weights, fusion, and adaptive adjacency matrices—are shared globally. However, city-specific semantics are maintained via independent blocks for road-topology, crash, and POI graphs, and mapping matrices. No cross-city adjacency connections are created, thus each city retains localized semantic representation and structural heterogeneity, while benefiting from shared modeling of patterns (Fang et al., 9 Jan 2026).

6. Training Procedures and Hyperparameterization

STS-MA modules are trained using Adam optimizer with L2 weight decay, sliding window input of N=∑kNkN=\sum_k N_k6 (forecasting horizon N=∑kNkN=\sum_k N_k7), masked MSE loss excluding missing grid cells, and dropout on MLP layers (N=∑kNkN=\sum_k N_k8). Typical hyperparameters are N=∑kNkN=\sum_k N_k9, adaptive adjacency rank CC0, attention window CC1, GCN depth CC2, and CC3 attention heads. In ST-MambaSync, input horizon and output horizon are matched (CC4 timesteps), with hidden dimension CC5, and ST-Mamba inner dimension CC6 (Fang et al., 9 Jan 2026, Shao et al., 2024).

7. Empirical Impact, Robustness, and Applicability

Empirical studies demonstrate the STS-MA’s substantial impact:

  • MLA-STNet: Removal of STS-MA yields degraded predictive accuracy: for Chicago, RMSE rises CC7, Recall drops by CC8, MAP by CC9; for NYC, RMSE increases slightly (Table 6). Multi-city joint training with STS-MA achieves RMSE 1×11\times10 (NYC), 1×11\times11 (Chicago), robust Recall/MAP, and the cross-city performance gains disappear if STS-MA is omitted (Table 4b) (Fang et al., 9 Jan 2026).
  • STS-MA improves hotspot localization, suppressing spurious predictions characteristic of grid-only or ablated models (Fig 13).
  • Robustness: MLA-STNet with STS-MA maintains 1×11\times12 variation in RMSE/Recall/MAP under 1×11\times13 Gaussian feature noise, whereas alternatives degrade steadily.
  • ST-MambaSync: Hybrid attention-Mamba models outperform pure attention (STAEformer) or pure Mamba (ST-SSMs) in accuracy and computational efficiency; the 1×11\times14 hybrid achieves lowest RMSE/MAE/MAPE, cuts FLOPS by 1×11\times15 versus deep attention models (PEMS08: MAE 1×11\times16 vs. 1×11\times17, RMSE 1×11\times18 vs. 1×11\times19) (Shao et al., 2024).
  • Explainability: The explicit per-step weights in the Mamba recurrence, with interpretable attention and memory components, offer diagnostic transparency beyond conventional RNNs.
  • Applicability: STS-MA generalizes to modeling spatio-temporal processes in climate, video, biomedical signals, IoT sensors, and financial networks requiring efficient long-sequence handling and joint global-local context modeling (Shao et al., 2024).

STS-MA’s integration of multi-graph semantic modeling, efficient selective memory, and cross-domain transfer makes it a foundational component for robust, interpretable, and scalable spatio-temporal forecasting frameworks.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Spatio-Temporal Semantic Mamba-Attention (STS-MA).