Social-Mamba: Socially-Aware Trajectory Forecasting with State-Space Models
Abstract
Human trajectory forecasting is crucial for safe navigationin crowded environments, requiring models that balance accuracy withcomputational efficiency. Efficiently modeling social interactions is key toperformance in dense crowds. Yet, most recent methods rely on attentionmechanisms, which are effective at capturing complex dependencies, butincur quadratic computational costs that scale poorly with the grow-ing number of neighbors. Recently, Selective State-Space Models haveprovided a linear-time alternative; however, their inherently sequentialdesign is misaligned with the unstructured and dynamic nature of socialinteractions. To address this challenge, we propose Social-Mamba, a fore-casting architecture that reformulates social interactions as structuredsequential processes. At its core is the Cycle Mamba block, a novel mod-ule that enables continuous bidirectional information flow. Social-Mambaorganizes agents on an egocentric grid and introduces social triplet fac-torization, which decomposes interactions into temporal, egocentric, andgoal-centric scans. These are dynamically integrated through a learnablesocial gate and global scan to generate accurate and efficient trajectorypredictions. Extensive experiments on five trajectory forecasting bench-marks show that Social-Mamba achieves state-of-the-art accuracy whileoffering superior parameter efficiency and computational scalability. Fur-thermore, embedding Social-Mamba into a flow-matching framework fur-ther enhances both accuracy and efficiency, establishing it as a flexibleand robust foundation for future trajectory forecasting research. Thecode is publicly available: https://github.com/vita-epfl/Social-Mamba.