Trajectory Mamba: Efficient Attention-Mamba Forecasting Model Based on Selective SSM

Yizhou Huang, Yihua Cheng, Kezhi WangCVPR 2025

Introduction

Predicting the future trajectories of dynamic agents—vehicles, pedestrians, and cyclists—is a fundamental requirement for the safe operation of autonomous driving systems. Current state-of-the-art approaches predominantly rely on Transformer-based architectures, leveraging multi-head self-attention to model complex interactions between agents and static map features. However, the quadratic computational complexity ($O(N^2)$) of the attention mechanism poses significant challenges for real-time deployment, particularly in dense urban environments with a high number of interacting entities.

To address these limitations, we present Trajectory Mamba (Tamba), a novel motion forecasting framework that replaces traditional attention mechanisms with a Selective State-Space Model (SSM). By adopting the Mamba architecture, Tamba achieves linear time complexity ($O(N)$) while maintaining the high predictive accuracy required for safety-critical applications.

Methodology

The Tamba architecture is designed to efficiently process heterogeneous data from urban driving scenes, including static map polylines and dynamic agent states.

Attention-Mamba Encoder

The core of the Tamba encoder is the integration of selective SSMs. Unlike standard Transformers, the selective SSM allows the model to dynamically prioritize or discard information along a sequence, effectively capturing long-range dependencies with linear complexity. The encoder is structured into three specialized branches:

  1. Temporal Encoder: Processes the historical motion of individual agents.
  2. Traffic Encoder: Captures interactions between dynamic agents and traffic control elements.
  3. Scene Encoder: Models the relationship between agents and the static road geometry.
The Tamba encoder architecture utilizes shared and independent embedders followed by Mamba-based temporal, traffic, and scene encoders.

A key innovation in the encoding process is Joint Polyline Encoding. Recognizing that pedestrian behavior is intrinsically linked to traffic light states, Tamba jointly encodes these two categories. This functional grouping allows the model to learn implicit traffic rules more effectively than treating them as isolated entities.

Cross-Tamba Decoder

To generate multimodal trajectory predictions, Tamba employs a Cross-Tamba decoder. Inspired by query-based detection frameworks, the decoder uses independent query tensors to produce a set of potential future paths. This approach accounts for the inherent uncertainty in human behavior, providing a distribution of likely outcomes rather than a single deterministic path.

Experimental Results

Tamba was rigorously evaluated on the industry-standard Argoverse 1 and Argoverse 2 motion forecasting benchmarks. These datasets provide a diverse range of urban scenarios, with Argoverse 2 featuring up to 11-second windows and 10 distinct object classes.

Performance and Efficiency

Tamba demonstrates superior performance compared to existing high-capacity models while significantly reducing computational overhead. On the Argoverse 2 benchmark, Tamba achieved a b-minFDE of 1.89, surpassing the previous state-of-the-art model, QCNet.

Comparative results on the Argoverse 2 dataset highlight Tamba's superior accuracy (b-minFDE) and significantly lower parameter count compared to leading models.

As shown in the results table, Tamba utilizes only 4.54 million parameters, representing a 40% reduction in model size compared to QCNet (7.66M). Furthermore, the model demonstrated a four-fold reduction in FLOPs compared to existing state-of-the-art methods, making it significantly more viable for deployment on resource-constrained edge hardware within autonomous vehicles.

Conclusion

Trajectory Mamba represents a significant step forward in efficient motion forecasting. By transitioning from quadratic attention to linear selective SSMs, Tamba proves that high-fidelity trajectory prediction can be achieved with substantially lower computational costs. The success of functional grouping in joint polyline encoding further suggests that semantic relationships are as critical as geometric ones in understanding complex driving environments. Future work will focus on refining multimodal ranking strategies and testing the model's robustness in extreme edge-case scenarios.

Summary updated

BibTeX
@inproceedings{huang2025trajectory,
  author = {Yizhou Huang and Yihua Cheng and Kezhi Wang},
  title = {{Trajectory Mamba: Efficient Attention-Mamba Forecasting Model Based on Selective SSM}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.01126},
}
Figure