Abstract
Sequential Recommender Systems (SRS) have emerged as a highly promising technique for capturing complex user preferences. While current SRS often employ Transformer-based models for next-item prediction, their quadratic computational complexity poses significant obstacles to real-time processing. Recently, the Mamba architecture has demonstrated exceptional effectiveness in time series prediction with linear efficiency. However, directly applying Mamba to SRS presents challenges: its unidirectional structure impedes contextual modeling, and its instability in state estimation hinders performance on short interaction sequences. To address these issues, we propose Selective Gated Mamba (SIGMA). By introducing Partially Flipped Mamba (PF-Mamba), we construct a specialized bidirectional structure. We further employ an input-dependent Dense Selective Gate (DS Gate) to weight directional information and a Feature Extract GRU (FE-GRU) to capture short-term dependencies. Experimental results across five real-world datasets demonstrate that SIGMA significantly outperforms existing baselines in both effectiveness and efficiency.
Introduction
Sequential Recommender Systems (SRS) aim to predict a user's next interaction by modeling their historical behavior. Currently, Transformer-based models (such as SASRec) dominate the field due to their powerful attention mechanisms. However, these models suffer from quadratic computational complexity ($O(N^2)$), making them increasingly inefficient as user history grows.
Mamba, a Selective State Space Model, has recently emerged as a high-performance alternative with linear scaling. Despite its promise, Mamba faces two primary "deal-breakers" in the recommendation context:
- Unidirectionality: Standard Mamba only processes sequences in one direction, missing vital "future" context within a sequence that helps capture shifting user preferences.
- Short-Sequence Instability: Mamba often struggles with "long-tail users" who have very few interactions, leading to unstable state estimation compared to simpler recurrent architectures.
The SIGMA Framework
SIGMA introduces three core architectural components designed to overcome Mamba's native limitations while preserving its efficiency.
Partially Flipped Mamba (PF-Mamba)
To achieve bidirectionality without losing the temporal signal of the most recent items, SIGMA utilizes a "partial flip" strategy. Instead of flipping the entire sequence, the model flips only the first $n$ items while keeping the last $r$ items in their original order. This allows the model to look "backwards from the future" while ensuring the most recent (and often most predictive) items remain at the end of the sequence.
Dense Selective Gate (DS Gate)
This input-dependent gating mechanism uses 1D convolutions and SiLU activation to intelligently weight the forward and partially flipped paths. It acts as a filter, focusing on relevant sequential information while suppressing noise from the bidirectional fusion.
Feature Extract GRU (FE-GRU)
Recognizing that Gated Recurrent Units (GRUs) are often more stable for very short sequences, SIGMA incorporates a parallel FE-GRU path. It uses a 1D convolution to aggregate local patterns followed by a GRU to capture short-term dependencies that the global Mamba blocks might miss.
Experimental Results
Superior Accuracy and Robustness
SIGMA was evaluated on five diverse datasets: Yelp, Amazon Beauty, Amazon Sports, Amazon Games, and MovieLens-1M. It consistently outperformed all baselines, including SASRec, BERT4Rec, and Mamba4Rec. Notably, SIGMA showed a significant improvement in Hit Rate (HR@10) of up to 8.82% on the Yelp dataset.
As shown in the performance analysis across user groups, SIGMA effectively mitigates the "short-sequence instability" problem. While standard Mamba performance dips significantly for users with 0-5 interactions, SIGMA’s FE-GRU component provides the necessary stability to maintain high recommendation quality for long-tail users.
Efficiency Gains
Beyond accuracy, SIGMA maintains the efficiency advantages of State Space Models. In inference tests on the Amazon Beauty dataset, SIGMA was nearly 2x faster than SASRec (68ms vs 123ms per batch) and required significantly less GPU memory (2.89G vs 7.58G), making it highly suitable for real-time production environments.
Conclusion
SIGMA successfully adapts the Mamba architecture for sequential recommendation by addressing its core weaknesses in contextual modeling and short-sequence stability. By hybridizing the global modeling power of Mamba with the local stability of GRUs and a novel bidirectional flipping strategy, SIGMA establishes a new state-of-the-art that balances efficiency and effectiveness. Future work will explore the sensitivity of the partial-flip hyperparameter $r$ and potential extensions into multi-modal recommendation domains.
Summary updated