# MaTrRec: Uniting Mamba and Transformer for Sequential Recommendation

arXiv: https://arxiv.org/abs/2407.19239 · HTML: https://mlsanity.com/paper/2407.19239/

## Key facts

- Cited by 5 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 27 Jul 2024.

## Built on by (most cited first, 5 of 5)

- [SS4Rec: Continuous-Time Sequential Recommendation with State Space Models](https://mlsanity.com/paper/2502.08132/) (2025)
- [DSDFormer: An Innovative Transformer-Mamba Framework for Robust High-Precision Driver Distraction Identification](https://mlsanity.com/paper/2409.05587/) (2024)
- [Mamba for Scalable and Efficient Personalized Recommendations](https://mlsanity.com/paper/2409.17165/) (2024)
- [TV-Rec: Time-Variant Convolutional Filter for Sequential Recommendation](https://mlsanity.com/paper/2510.25259/) (2025)
- [Dual-Interest Sequential Product Recommendation With Multi-Granular SSM](https://mlsanity.com/paper/2609.21548/) (2026)

## Abstract (arXiv)

Sequential recommendation systems aim to provide personalized recommendations by analyzing dynamic preferences and dependencies within user behavior sequences. Recently, Transformer models can effectively capture user preferences. However, their quadratic computational complexity limits recommendation performance on long interaction sequence data. Inspired by the State Space Model (SSM)representative model, Mamba, which efficiently captures user preferences in long interaction sequences with linear complexity, we find that Mamba's recommendation effectiveness is limited in short interaction sequences, with failing to recall items of actual interest to users and exacerbating the data sparsity cold start problem. To address this issue, we innovatively propose a new model, MaTrRec, which combines the strengths of Mamba and Transformer. This model fully leverages Mamba's advantages in handling long-term dependencies and Transformer's global attention advantages in short-term dependencies, thereby enhances predictive capabilities on both long and short interaction sequence datasets while balancing model efficiency. Notably, our model significantly improves the data sparsity cold start problem, with an improvement of up to 33% on the highly sparse Amazon Musical Instruments dataset. We conducted extensive experimental evaluations on five widely used public datasets. The experimental results show that our model outperforms the current state-of-the-art sequential recommendation models on all five datasets. The code is available at https://github.com/Unintelligentmumu/MaTrRec.
