Abstract
Sequential recommendation systems aim to predict users' next preferences based on their interaction histories, but existing approaches face critical limitations in efficiency and multi-scale pattern recognition. While Transformer-based methods struggle with quadratic computational complexity, recent Mamba-based models improve efficiency but fail to capture periodic user behaviors, leverage rich semantic information, or effectively fuse multimodal features. To address these challenges, we propose M2Rec, a novel sequential recommendation framework that integrates multi-scale Mamba with Fourier analysis, Large Language Models (LLMs), and adaptive gating. First, we enhance Mamba with Fast Fourier Transform (FFT) to explicitly model periodic patterns in the frequency domain, separating meaningful trends from noise. Second, we incorporate LLM-based text embeddings to enrich sparse interaction data with semantic context from item descriptions. Finally, we introduce a learnable gate mechanism to dynamically balance temporal (Mamba), frequency (FFT), and semantic (LLM) features, ensuring harmonious multimodal fusion. Extensive experiments demonstrate that M2Rec achieves state-of-the-art performance, improving Hit Rate@10 by 3.2% over existing Mamba-based models while maintaining 20% faster inference than Transformer baselines.
Introduction
Sequential recommendation systems are designed to predict a user's future actions by analyzing their historical interaction sequence. While Transformer-based architectures like BERT4Rec have set high performance benchmarks, their quadratic computational complexity poses a significant bottleneck as sequence lengths increase.
Recent State Space Models (SSMs), specifically Mamba, have emerged as a linear-time alternative. However, standard Mamba-based models struggle with three core issues:
- Multi-scale Noise: User behavior is inherently rhythmic (daily, weekly, or monthly), and raw interaction data is often too noisy for standard temporal models to isolate these periodic signals.
- Semantic Sparsity: Relying solely on abstract Item IDs ignores the rich semantic relationships between items (e.g., different types of athletic gear).
- Feature Interference: Naively combining temporal, frequency, and semantic data can lead to conflicting signals that degrade model performance.
Methodology: The M2Rec Framework
M2Rec addresses these limitations through a multi-scale architecture that combines the efficiency of Mamba with the precision of frequency-domain analysis and the semantic depth of LLMs.
The framework is built around three primary components:
- Adaptive Fast Fourier Transform Powered Mamba (AFFM) Block: This block transforms interaction data into the frequency domain using FFT. By applying learnable filters, the model can "mute" high-frequency noise and "amplify" meaningful periodic signals before returning to the temporal domain via Inverse FFT for Mamba-based modeling.
- LLM-Augmented Embeddings: To capture semantic context, M2Rec utilizes a pre-trained LLM (
bge-large-en-v1.5) to encode item metadata (names, categories, descriptions). This allows the model to understand item relationships beyond simple ID-based co-occurrence. - Gated Fusion Mechanism: A learnable gate dynamically weighs the contributions of temporal, frequency, and semantic features. This ensures that the most relevant signal dominates based on the specific recommendation context.
Multi-scale Pattern Analysis
A key innovation of M2Rec is its ability to treat user interaction history as a signal that can be decomposed into various scales, such as daily browsing or weekly shopping habits.
By analyzing interactions in the frequency domain, the model identifies distinct peaks corresponding to daily and weekly rhythms. This mathematical separation allows M2Rec to distinguish between random "one-off" interactions and genuine, recurring user preferences, significantly improving the robustness of the recommendations.
Experimental Results
The model was evaluated on several large-scale benchmarks, including MovieLens (ML-1M), Amazon Beauty, and location-aware datasets from New York, California, and Texas.
Performance and Efficiency
- Accuracy: M2Rec achieved state-of-the-art results, outperforming existing Mamba-based models by 3.2% in Hit Rate@10.
- Inference Speed: The model maintained the linear complexity of Mamba, delivering 20% faster inference than popular Transformer baselines like SASRec and BERT4Rec.
- Robustness: In denoising experiments involving added Gaussian noise, M2Rec demonstrated superior stability compared to baselines, validating the effectiveness of the FFT-based filtering.
- Memory Footprint: M2Rec exhibited higher GPU memory efficiency, making it suitable for large-scale industrial deployment.
Conclusion
M2Rec demonstrates that combining frequency-domain analysis with semantic understanding and adaptive fusion can significantly enhance sequential recommendation. By leveraging the linear efficiency of Mamba, the model provides a scalable solution for processing long interaction histories without sacrificing accuracy. Future work will explore the integration of additional modalities, such as visual features, and the impact of different LLM architectures on semantic extraction.
Summary updated