Skip to content
The Plain Paper

Method

SASRec

SASRec is a self-attention model for sequential recommendation: it uses a user’s ordered interaction history to predict the next item. Its causal attention lets each prediction use earlier interactions without looking at later ones.

What it is

Sequential recommendation predicts what item a user will interact with next, using the order of the user’s past interactions. SASRec adapts the Transformer’s self-attention approach to this task. At each sequence position, it learns which earlier items are relevant to predicting the next one.12

SASRec is designed to balance two approaches to sequence modeling. Like a recurrent neural network, it can draw on long-term patterns; like a Markov-chain model, it can base a prediction on a relatively small number of relevant past actions.21

How it works

The model turns each item in a user’s history into an embedding, a learned vector representation. It adds a learned position embedding to each item embedding so the model can distinguish where items occur in the sequence. It keeps the most recent items up to a set maximum length, and pads shorter sequences on the left.1

Self-attention lets each position combine information from earlier positions. It forms queries, keys and values from the sequence representations, then computes attention as softmax of the query–key dot products divided by the square root of the dimension, multiplied by the values. A causal mask prevents a position from using items that come after it.13

Training uses shifted sequences: the input contains a user’s interactions up to a position, and the target is the next item at that position. The model applies this next-item prediction at each position, using only the preceding interactions. Its resulting sequence representations are used to score candidate items.13

Where it came from

Wang-Cheng Kang and Julian McAuley introduced SASRec in 2018 in “Self-Attentive Sequential Recommendation.” They positioned it between Markov-chain methods, which use only the last or a few recent actions, and recurrent neural networks, which can represent longer-term patterns but are less efficient.21

Versions and relatives

BERT4Rec is a related self-attentive sequential recommender, but it uses bidirectional attention and predicts masked items rather than training on shifted next-item targets. SASRec instead uses unidirectional, causal attention.34

AutoCDSR is a cross-domain extension that can be incorporated into transformer-based recommenders, including SASRec. It modifies self-attention to support knowledge transfer across domains; AutoCDSR+ is a more performant version with a small additional cost.5

Strengths and limits

SASRec can focus on long-range dependencies in denser datasets and more recent activities in sparser ones. The original work reports that its self-attention block can be parallelized and that the model was an order of magnitude faster than comparable CNN- and RNN-based models in its experiments.12

SASRec models the order of interactions rather than their timestamps. The original work distinguishes this from temporal recommendation, which explicitly models when interactions occurred.1

How recent papers use it

LQ-Rec compares against SASRec as a transformer-decoder baseline with self-attention and causal masking.6

X-split ARGUS compares against SASRec, describing it as predicting the next item with causal self-attention.7

ReflectRec includes SASRec as a trained recommender baseline in its cross-method comparisons.8

VerRec compares against a traditional self-attention recommender that weights a user’s historical interactions.9

EE-Motion extends SASRec with an affective adapter that uses affective proxy coordinates to steer music recommendations.10

Papers that mention SASRec

  1. 18 Nov 2026Compared against

    LQ-Rec: Late Quantization for Sequential Recommendation

    A transformer decoder baseline using self-attention and causal masking.

  2. 18 Nov 2026Compared against

    X-split Argus: Learning Reusable History Tokens for Efficient CTR Prediction

    It predicts the next item using causal self-attention.

  3. 18 Nov 2026Compared against

    ReflectRec: Cycle-Consistency Preference Verification for LLM-based Recommendation

    A trained recommender baseline included in the cross-method comparisons.

  4. 17 Nov 2026Compared against

    More Than a Score: Reinforcement Learning with Verbalized Feedback for Generative Recommendation

    A traditional recommender using self-attention to weight historical interactions.

  5. 16 Nov 2026Used

    EE-Motion: An EEG-based Web Architecture for Live Affective Music Recommendation

    SASRec is a sequential recommendation model that the paper extends with its affective adapter.

Sources

  1. 1Self-Attentive Sequential Recommendationarxiv.org
  2. 2Self-Attentive Sequential RecommendationPaper abstract on arXiv
  3. 3RecSys Transformer Models Tutorial — RecTools documentationrectools.readthedocs.io
  4. 4Your Causal Self-Attentive Recommender Hosts a Lonely Neighborhoodarxiv.org
  5. 5Revisiting Self-attention for Cross-domain Sequential RecommendationPaper abstract on arXiv
  6. 6LQ-Rec: Late Quantization for Sequential RecommendationPaper explained on this site
  7. 7X-split Argus: Learning Reusable History Tokens for Efficient CTR PredictionPaper explained on this site
  8. 8ReflectRec: Cycle-Consistency Preference Verification for LLM-based RecommendationPaper explained on this site
  9. 9More Than a Score: Reinforcement Learning with Verbalized Feedback for Generative RecommendationPaper explained on this site
  10. 10EE-Motion: An EEG-based Web Architecture for Live Affective Music RecommendationPaper explained on this site

Every paragraph above was checked against the sources it cites before it was published.