HieraMamba: Video Temporal Grounding via Hierarchical Anchor-Mamba Pooling

Joungbin An, Kristen Grauman

TL;DR

HieraMamba introduces a linear-time, hierarchical state-space architecture designed for video temporal grounding in long, untrimmed videos. By leveraging novel Anchor-MambaPooling (AMP) blocks and tailored contrastive losses, it efficiently captures both broad global context and fine-grained local details without the quadratic computational burden of traditional transformers. The model achieves new state-of-the-art performance across major benchmarks (Ego4D-NLQ, MAD, TACoS) while dramatically reducing computational overhead.

What Problem Does This Paper Address?

Video temporal grounding (VTG) is the task of localizing the exact start and end times of a natural language query within an untrimmed video (e.g., answering "When did I turn the stove on?"). While existing models perform well on short clips, long-form videos (spanning minutes to hours) present a severe computational bottleneck.

Traditional transformer-based models rely on self-attention, which scales quadratically ($O(N^2)$) with sequence length. To cope with this, current methods resort to aggressive uniform downsampling or fixed sliding windows. However, downsampling throws away fine-grained details needed to catch brief moments, and sliding windows risk fragmenting long-range context. HieraMamba addresses this dilemma by providing a multi-scale architecture that preserves temporal fidelity across extended sequences in linear time ($O(N)$).

Figure 1. HieraMamba enables hierarchical, linear-time tempo- ral grounding in long untrimmed videos. Top row: a cooking clip and two queries—Q1’s answer spans a long interval, Q2’s a short one. Middle left: uniform downsampling (gray squares) drops frames and loses evidence for the queries. Bottom left: fixed slid- ing windows split segments at window boundaries but risk frag- menting (red dashed lines). Right: HieraMamba stacks Anchor- MambaPooling (AMP) blocks to build a multi-scale temporal hi- erarchy that, unlike traditional feature pyramids, uses Mamba to compress and refine information at each level, enabling efficient fine-to-coarse abstraction and precise, query-specific localization. For example, the brief ‘stove on’ moment in Q2 is captured by fine-scale embeddings in the first layer, while Q1’s broader ‘prep- ping ingredients’ context is naturally represented by the coarser embeddings at the top layer.

Methods

HieraMamba replaces standard self-attention mechanisms with a hierarchical framework built on State Space Models (SSMs), specifically leveraging Mamba's selective scanning capability. The core components include:

  • Anchor-MambaPooling (AMP) Blocks: Instead of naive pooling, HieraMamba stacks AMP blocks to build a multi-scale temporal pyramid. At each layer, the model generates compact "anchor tokens" initialized from local frame windows. These anchors are interleaved with the video frames and processed together via Mamba's selective scan, allowing bidirectional information flow between coarse summaries and fine-grained frame details.
  • Global-Local Encoding: The architecture explicitly decouples context modeling. It utilizes a bidirectional Mamba scan (Hydra) to capture long-range global context efficiently, paired with a narrow-window local Transformer to refine short-range, fine-grained temporal patterns.
  • Anchor-Conditioned Contrastive (ACC) Loss: A self-supervised objective applied at every layer. It forces anchor tokens to tightly compress the information within their respective local windows while remaining highly distinct from temporally distant anchors.
  • Segment-Pooled Contrastive (SPC) Loss: A supervised objective that aggregates ground-truth video segments into a single prototype token, contrasting it against non-ground-truth moments to enhance the discriminability of localized event representations.
Overview of the HieraMamba architecture, the AMP block, and the contrastive loss formulations.

Datasets

The authors evaluated HieraMamba on three long-video temporal grounding benchmarks:

  • Ego4D-NLQ: An egocentric video dataset with clips ranging from 3.5 to 20 minutes. It represents a challenging "needle-in-a-haystack" scenario where target actions account for only ~2% of the total video duration.
  • MAD (v1 & v2): A massive movie dataset containing full-length films averaging 110 minutes, testing the model's capacity for hour-scale video processing.
  • TACoS: A cooking video dataset (averaging 4.8 minutes) characterized by highly complex, compositional, and fine-grained sequential actions.

Key Insights and Ideas

  • Content-Aware Abstraction via Mamba: Rather than treating Mamba simply as a faster attention layer, the authors uniquely exploit its selective scanning to perform token-level compression. This allows the network to dynamically decide what information to propagate up the hierarchy.
  • Preserving Intra-Segment Diversity: A key design choice in the SPC loss is pooling ground-truth segments into a single prototype rather than forcing every individual frame token to map to the exact same vector. This prevents diverse sub-motions within a single activity (e.g., reaching, grasping, and cutting during a "chopping" event) from collapsing into a single, non-descriptive representation.
  • Decoupled Context is Better: Combining linear-time global scanning with restricted local self-attention achieves a superior accuracy-compute trade-off compared to unified hybrid models.

Key Results

HieraMamba consistently outperformed prior state-of-the-art methods across all three benchmarks:

  • Ego4D-NLQ: Achieved an average recall of 25.66%, outperforming strong baselines like SnAG (+2.58 pp) and RGNet (+3.85 pp).
  • MAD-v2: Reached an average recall of 18.05%, yielding a +2.80 pp improvement over the closest competitor.
  • Efficiency Gains: When compared against a global variant of SnAG utilizing full non-local self-attention, HieraMamba improved average recall by +2.52% while requiring roughly 2.5× fewer FLOPs, successfully pushing the Pareto frontier for long-video understanding.

Limitations and Future Work

Currently, HieraMamba uses a fixed temporal stride to instantiate anchors at each layer. The authors note that a compelling direction for future work is adaptive anchor generation, where the model dynamically allocates temporal resolution based on the visual complexity of the content—allocating more anchor tokens to fast-paced, dense actions and fewer to static or repetitive scenes.

Summary updated

BibTeX
@inproceedings{an2026hieramamba,
  author = {Joungbin An and Kristen Grauman},
  title = {{HieraMamba: Video Temporal Grounding via Hierarchical Anchor-Mamba Pooling}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=WYVEqAEE3P},
}
Figure