BitBootcampBitBootcamp ← all explainers 🔄 Review ⚙ Settings

PAPERS-11-008 · Paper — SASRec — Self-Attentive Sequential Recommendation

The paper

SASRec — Self‑Attentive Sequential Recommendation, authored by Wang, He, Felfernig, and others in 2018, was presented at the 2018 ACM Conference on Recommender Systems. It is considered a landmark because it introduced the transformer’s self‑attention mechanism to the sequential recommendation problem, reshaping how next‑item predictions are made.

Before this paper

Before SASRec, most recommender systems treated each user as a static bag of preferences, ignoring the order in which items were consumed. This meant that the models could not capture the importance of recent actions or the temporal dynamics of user behavior. As a result, they struggled to distinguish between long‑term interests and short‑term intent, limiting recommendation relevance.

The key idea

The core insight of SASRec is to apply self‑attention over a user’s interaction sequence, letting the model automatically decide which past items are most relevant for predicting the next one. By weighting earlier actions according to their relevance to the current step, the approach captures both long‑term preferences and recent intent in a unified way. This simple yet powerful idea replaces handcrafted temporal features with learned attention patterns.

How it works

SASRec first embeds each item in the user’s history into a dense vector. These embeddings are fed into a stack of transformer self‑attention layers, where each layer computes attention scores between every pair of positions in the sequence. The attention scores determine how much each past item contributes to the representation of the current step. After the attention layers, a final linear projection maps the resulting context vector to scores over all candidate items, and the top‑scoring item is taken as the next‑item prediction. The whole architecture is trained end‑to‑end with a standard ranking loss, making it both effective and computationally efficient.

See it — attend over what you did

flowchart LR
  A["Your item history"] --> B["Self-attention"]
  B --> C["Weigh relevant<br/>past items"]
  C --> D["Predict next item"]

What they showed

The authors showed that SASRec outperformed earlier sequential models such as Markov chains and recurrent networks on next‑item recommendation tasks, while also being faster to train and infer.

What it changed

By bringing the transformer architecture into sequential recommendation, SASRec sparked a wave of attention‑based models that now dominate the field. It demonstrated that self‑attention can capture complex temporal patterns better than traditional sequential methods, leading researchers to adopt and extend the approach for various recommendation scenarios. This shift has made attention‑driven models the default choice for modern feed and ‘up next’ systems. Next: the frontier — large-scale & LLM-based recommendation.

The one-line takeaway

Self‑attention lets a recommender focus on the most relevant past actions, dramatically improving next‑item predictions.

Read it / meet it

Reading the original SASRec paper offers a clear, accessible example of how transformers can be adapted for recommendation. Its influence is visible today in the attention‑based models that power many online feeds and suggestion engines.