Command Palette
Search for a command to run...
Wang-Cheng Kang; Julian McAuley

Abstract
Sequential dynamics are a key feature of many modern recommender systems, which seek to capture the context' of users' activities on the basis of actions they have performed recently. To capture such patterns, two approaches have proliferated: Markov Chains (MCs) and Recurrent Neural Networks (RNNs). Markov Chains assume that a user's next action can be predicted on the basis of just their last (or last few) actions, while RNNs in principle allow for longer-term semantics to be uncovered. Generally speaking, MC-based methods perform best in extremely sparse datasets, where model parsimony is critical, while RNNs perform better in denser datasets where higher model complexity is affordable. The goal of our work is to balance these two goals, by proposing a self-attention based sequential model (SASRec) that allows us to capture long-term semantics (like an RNN), but, using an attention mechanism, makes its predictions based on relatively few actions (like an MC). At each time step, SASRec seeks to identify which items arerelevant' from a user's action history, and use them to predict the next item. Extensive empirical studies show that our method outperforms various state-of-the-art sequential models (including MC/CNN/RNN-based approaches) on both sparse and dense datasets. Moreover, the model is an order of magnitude more efficient than comparable CNN/RNN-based models. Visualizations on attention weights also show how our model adaptively handles datasets with various density, and uncovers meaningful patterns in activity sequences.
Code Repositories
Benchmarks
| Benchmark | Methodology | Metrics |
|---|---|---|
| collaborative-filtering-on-movielens-1m | SASRec | HR@10: 0.8245 HR@10 (full corpus): 0.2821 NDCG@10 (full corpus): 0.1603 nDCG@10: 0.5905 |
| collaborative-filtering-on-movielens-20m | SASRec | HR@10 (full corpus): 0.2889 nDCG@10 (full corpus): 0.1621 |
| recommendation-systems-on-amazon-beauty | SASRec | Hit@10: 0.4854 nDCG@10: 0.3219 |
| recommendation-systems-on-amazon-book | SASRec | HR@10: 0.0306 HR@50: 0.0754 NDCG@10: 0.0164 NDCG@50: 0.0260 |
| recommendation-systems-on-amazon-games | SASRec | Hit@10: 0.7410 nDCG@10: 0.5360 |
| recommendation-systems-on-steam | SASRec | Hit@10: 0.8729 nDCG@10: 0.6306 |
| sequential-recommendation-on-movielens-1m | SASRec | HR@10: 0.2137 HR@10 (99 Neg. Samples): 0.7904 HR@20: 0.3245 HR@5: 0.1374 HR@5 (99 Neg. Samples): 0.6874 MRR (99 Neg. Samples): 0.5020 NDCG@10: 0.1116 NDCG@10 (99 Neg. Samples): 0.5642 NDCG@20: 0.1395 NDCG@5: 0.0873 NDCG@5 (99 Neg. Samples): 0.5308 |
Build AI with AI
From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.