Sequential recommendation aims to estimate the dynamic user preferences and sequential dependencies among historical user behaviors. Although Transformer-based models have proven to be effective for sequential recommendation, they suffer from the inference inefficiency problem stemming from the quadratic computational complexity of attention operators, especially for long-range behavior sequences. Inspired by the recent success of state space models (SSMs), we propose Mamba4Rec, which is the first work to explore the potential of selective SSMs for efficient sequential recommendation. Built upon the basic Mamba block which is a selective SSM with an efficient hardware-aware parallel algorithm, we incorporate a series of sequential modeling techniques to further promote the model performance and meanwhile maintain the inference efficiency. Experiments on two public datasets demonstrate that Mamba4Rec is able to well address the effectiveness-efficiency dilemma, and defeat both RNN- and attention-based baselines in terms of both effectiveness and efficiency.
翻译:序列推荐旨在估计用户动态偏好及历史行为间的序列依赖关系。尽管基于Transformer的模型在序列推荐任务中表现出色,但其注意力机制中的二次计算复杂度导致推理效率低下,尤其在处理长序列行为时尤为突出。受状态空间模型(SSMs)近期成功的启发,我们首次提出探索选择性状态空间模型在高效序列推荐中的潜力——Mamba4Rec。该方法基于具备高效硬件感知并行算法的选择性SSM基础模块Mamba block,融合一系列序列建模技术以提升模型性能的同时保持推理效率。在两个公开数据集上的实验表明,Mamba4Rec能够有效解决效能-效率困境,在有效性和效率两方面均超越基于RNN和基于注意力的基线方法。