Self-Attentive Sequential Recommendation

Wang-Cheng Kang, Julian McAuley
8/20/2018
4,620 citations
cs.IRcs.LG
transformer-attention

No official code found. Best implementation: kang205/SASRec (1,017 stars). 4 more below.

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).

Show full abstract

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 are `relevant' 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.

View on arXivView PDF

Code Implementations(5)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
kang205/SASRecCommunity1,017–––
AaronHeee/LOCKERCommunity10–––
paddorch/SASRec.paddleCommunity6–––
nnkkmto/SASRec-tf2Community6–––
chris-tng/sasrecCommunity5–––
kang205/SASRecCommunity25%

SASRec: Self-Attentive Sequential Recommendation

1,017194
AaronHeee/LOCKERCommunity25%

Locally Constrained Self-Attentive Sequential Recommendation

101

A PaddlePaddle implementation of Self-Attentive Sequential Recommendation.

61
nnkkmto/SASRec-tf2Community25%

[Tensorflow 2.0] Self-Attentive Sequential Recommendation

63
chris-tng/sasrecCommunity25%

Implementation of Self-Attentive Sequential Recommendation (SASRec) in flax

50

Similar Papers

Cite this paper

@article{kang2018selfattentive,
  title  = {Self-Attentive Sequential Recommendation},
  author = {Wang-Cheng Kang and Julian McAuley},
  year   = {2018},
  eprint = {1808.09781},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1808.09781}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1808.09781.svg)](https://codeofpaper.com/paper/1808.09781)

Discussion