提出线性注意力机制,让长序列推荐更快更省资源
LinRec: Linear Attention Mechanism for Long-term Sequential Recommender Systems

- 用线性复杂度的L2归一化注意力替代传统注意力
- 在两个公开数据集上达到顶尖性能,速度和内存消耗大幅降低
- 适合需要处理超长用户行为序列的推荐系统场景
Transformer模型在序列推荐系统中表现优异,但传统点积注意力机制随序列长度呈二次增长,导致长序列推荐计算成本高昂。为此,我们提出一种新型L2归一化线性注意力机制(LinRec),理论上在保持传统注意力学习能力的同时显著提升效率。通过深入分析高效注意力机制的等价条件,证明了LinRec具有线性复杂度并保留注意力特性。进一步从统计视角揭示其潜在效率优势。在两个公开基准数据集上的大量实验表明,LinRec与Transformer结合后,在性能上可媲美或超越现有最先进模型,同时大幅提高时间与内存效率。
原文摘要 · Abstract (English)
Transformer models have achieved remarkable success in sequential recommender systems (SRSs). However, computing the attention matrix in traditional dot-product attention mechanisms results in a quadratic complexity with sequence lengths, leading to high computational costs for long-term sequential recommendation. Motivated by the above observation, we propose a novel L2-Normalized Linear Attention for the Transformer-based Sequential Recommender Systems (LinRec), which theoretically improves efficiency while preserving the learning capabilities of the traditional dot-product attention. Specifically, by thoroughly examining the equivalence conditions of efficient attention mechanisms, we show that LinRec possesses linear complexity while preserving the property of attention mechanisms. In addition, we reveal its latent efficiency properties by interpreting the proposed LinRec mechanism through a statistical lens. Extensive experiments are conducted based on two public benchmark datasets, demonstrating that the combination of LinRec and Transformer models achieves comparable or even superior performance than state-of-the-art Transformer-based SRS models while significantly improving time and memory efficiency.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。