---
title: Hierarchical Gated SSM Blocks
url: https://www.emergentmind.com/topics/hierarchical-gated-ssm-blocks
type: topic
---

# Hierarchical Gated SSM Blocks

Hierarchical gated state-space model (SSM) blocks constitute a recent advance in deep sequence and spatial modeling architectures, systematically combining multi-scale signal decomposition, input-gated state transitions, and coarse-to-fine hierarchical processing. These blocks are designed to efficiently capture both local and long-range dependencies in high-dimensional data, surpassing the memory and computational efficiency of classical transformer-based approaches in tasks such as vision, time series modeling, and autonomous driving [2508.06113], [2512.23824].

## 1. Hierarchical and Multi-Scale Decomposition

The defining principle of hierarchical gated SSM blocks is the multi-level decomposition of input sequences or tensors via cascaded, wavelet-style (or multi-resolution) convolutions. In this decompositional hierarchy, the input is split into streams corresponding to different spatial or temporal scales:
- **Fine scales** encode high-frequency, local information.
- **Coarse scales** capture global, slowly-varying structure.

In the temporal MS-SSM instance, S levels of stationary, causal, depthwise-1D dilated convolutions yield S + 2 channel streams: the original input (scale 0), S detail coefficients from each scale (scales 1...S), and a final coarse approximation (scale S + 1). This multi-resolution expansion allows parallelized and specialized SSMs to operate on information tailored to distinct scales, with each scale's SSM maintaining a separate recurrent hidden state [2512.23824].

In the spatial GM-Fusion design for BEV fusion, features are hierarchically extracted at four spatial scales (¼, ⅛, 1/16, 1/32 of input resolution), with SSM fusion operating at each resolution to exploit the unique global context and texture granularity available at each level [2508.06113].

## 2. Block Structure and Mathematical Formulation

A typical hierarchical gated SSM block proceeds through three major phases: (1) input decomposition, (2) parallel SSM updates per scale, and (3) adaptive feature mixing.

**MS-SSM Block (Temporal, 1D Case) [2512.23824]:**
- **Wavelet-style decomposition:** For sequence $x_t$ ($t = 1 \dots L$), produce $S+2$ streams $\hat{x}_t = [x_t, d_t^1, ..., d_t^S, a_t^S]$ via stacked, dilated, depthwise convolutions.
- **Parallel SSMs:** For each scale $s$, maintain hidden state $h_t^s \in \mathbb{R}^N$:
  $$
  h_t^s = \bar{A}^s h_{t-1}^s + \bar{B}_t^s \cdot u_t^s,\qquad y_t^s = C_t^s h_t^s,
  $$
  where $\bar{A}^s$ is the scale-specific transition (possibly diagonal), $\bar{B}_t^s, C_t^s$ are input-gated projections, and $u_t^s$ is the stream input for scale $s$.
- **Scale mixer:** The scale SSM outputs $[y_t^0, ..., y_t^{S+1}]$ are fused via a linear, input-dependent mixing vector $E_t = \text{Linear}_E(x_t)$, giving the composed output $z_t = E_t \cdot \mathbf{y}_t$.

**GM-Fusion (Spatial, 2D Case) [2508.06113]:**
- **Parallel input paths:** The input BEV feature map $F \in \mathbb{R}^{H \times W \times C}$ is split into a BEV positional encoding path and an identity path, fused through a logistic gating mechanism as $U = G \odot P + (1-G) \odot X$ with $G = \sigma(\text{Conv}_{1\times1}([X; P]))$.
- **Adaptive fusion:** After depthwise convolution, four parallel branches (direct path, raster-SSM, zigzag-SSM, and multi-scale fusion) are adaptively combined using learned weights $\alpha = \text{softmax}(\text{MLP}(\text{GlobalAvgPool}(\cdot)))$.
- **AwareSSM serial recurrence:** Directional, distance-weighted, and spatially-aware 1D serial SSMs operate over raster and zigzag serialized feature maps, using input decay $d_t = \exp(-\lambda \rho_t/\rho_{\max})$ and anisotropic state transitions parameterized by direction-specific $A$ matrices.

## 3. Gating, Spatial Priors, and Input-Dependence

Central to hierarchical gated SSM blocks is the use of input-dependent gating at multiple levels:
- **Input-dependent projections:** In MS-SSM, SSM recurrence parameters ($B$, $C$, and time-step $\Delta$) are gated by a linear function of the current input, empowering the model to dynamically modulate memory updates and outputs based on local context.
- **Scale-mixing:** The fusion weights controlling which SSM scales dominate the block output are explicit learned functions of the current input in MS-SSM, providing token-wise scale adaptation.
- **Spatial priors:** In GM-Fusion, position encodings encode both distance and orientation (with interleaved sinusoidal functions in ego-centric polar coordinates), and state transitions encode directionality with bias toward forward, lateral, or backward dependencies, integrated via gated weighted sums. The distance decay factor $d_t$ locally emphasizes close-range context in spatial reasoning.

This multi-level gating enables both dynamic selection of relevant features and efficient use of global and local memory, increasing model expressivity and adaptiveness in comparison to fixed recurrent or convolutional baselines.

## 4. Sequencing Strategies and Parallelization

Hierarchical gated SSM designs exploit serialization schemes and parallelization strategies that maximize context aggregation while maintaining computational efficiency:
- **Directional sequencing:** In GM-Fusion, raster (row-major) and zigzag (snaked rows) orderings are used to serialize 2D feature maps, enabling SSMs to exploit both global directional continuity and adjacency for propagation of contextual information. The inclusion of both schemes empirically increases task performance compared to single-pattern SSMs [2508.06113].
- **Associative-scan parallelization:** In MS-SSM, the state recurrences at each scale are run in parallel using associative-scan approaches, enabling efficient computation within each block ($O(LN)$ with $L$ sequence length and $N$ SSM dim), plus $O(L K S)$ for the convolutions over $S$ scales and kernel size $K$ [2512.23824].

A plausible implication is that such sequencing and parallelization lowers the sequential bottleneck of traditional SSMs while broadening the effective receptive field.

## 5. Memory, Complexity, and Efficiency

Hierarchical gated SSM blocks achieve linear (or quasi-linear) complexity in both memory and computation with respect to sequence length or spatial extent, reflecting significant scalability advantages over quadratic transformer-based models:
- **GM-Fusion SSMs:** For each layer, $O(N D^2)$ multiply-adds, with $N = H \cdot W$ (spatial extent), $D \ll N$, and at four spatial scales. By not needing to store $N \times N$ attention maps, the memory footprint remains $O(NC) + O(D^2)$ per block [2508.06113].
- **MS-SSM blocks:** Overall cost is dominated by $O(L N S)$ for parallel SSMs and $O(L K S)$ for convolutions. The scale increase in state size is offset by specialization of SSM dynamics and efficient gating, so total cost is nearly the same as a standard SSM with (S + 2)N hidden size [2512.23824].

This efficiency permits processing of high-dimensional or high-resolution inputs that would be intractable for standard transformers.

## 6. Empirical Results, Ablations, and Impact

Ablation studies and large-scale experiments confirm the practical benefits of hierarchical gated SSMs:
- **GM-Fusion (NAVSIM autonomous driving):** Replacing transformer fusion with HCA + BEV-SSM raises performance from 88.10 to 88.69 PDMS (+0.59), with full GM-Fusion (adding channel attention) at 88.85 PDMS (+0.75 vs. transformer) [2508.06113]. Introducing dual-directional sequencing (raster + zigzag) further improves results (+0.15 PDMS). Multi-scale SSM fusion (hierarchical) versus single-scale offers a ~0.3 PDMS gain, supporting the necessity of coarse-to-fine integration.
- **MS-SSM (sequence modeling benchmarks):** Multi-resolution decomposition increases effective receptive field and recall, especially in long-range or hierarchical tasks (mean mixing distance is quadrupled over Mamba at constant total state) [2512.23824].

Taken together, these results establish hierarchical gated SSM blocks as state-of-the-art components for tasks requiring rich, scalable memory and global-local integration. Their design connects multi-scale signal processing (notably wavelet theory) with modern, gated deep SSM architectures.

## 7. Comparison to Previous and Alternative Architectures

The hierarchical gated SSM paradigm departs from classical single-scale or uniform SSMs in several respects:
- **Hierarchical SSMs** explicitly enable parallel, scale-specialized recurrence, permitting each scale to maintain memory tuned to its temporal or spatial frequency characteristics.
- **Input-dependent gating** enhances adaptivity by letting the network learn optimal scale fusion on a per-token basis, avoiding monolithic mixing or fixed averaging.
- **Transformer-based fusion**, by contrast, suffers from quadratic complexity and lacks explicit encoding of scale, directionality, or spatial priors.

This suggests that hierarchical gating, multi-scale decomposition, and contextualized mixing represent a new direction for efficient, adaptive long-range modeling in high-dimensional settings.

Source: https://www.emergentmind.com/topics/hierarchical-gated-ssm-blocks