# Sequential Recommendation via Stochastic Self-Attention

arXiv: https://arxiv.org/abs/2201.06035 · HTML: https://mlsanity.com/paper/2201.06035/

## Key facts

- Cited by 37 papers in the map (data through 14 Oct 2026).
- Builds on 30 of its 63 references that are in the map.
- First posted on arXiv 16 Jan 2022.

## Builds on (most cited first, 30 of 30)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding](https://mlsanity.com/paper/1810.04805/) (2018)
- [Adam: A Method for Stochastic Optimization](https://mlsanity.com/paper/1412.6980/) (2014)
- [Self-Attentive Sequential Recommendation](https://mlsanity.com/paper/1808.09781/) (2018)
- [LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation](https://mlsanity.com/paper/2002.02126/) (2020)
- [Graph Convolutional Neural Networks for Web-Scale Recommender Systems](https://mlsanity.com/paper/1806.01973/) (2018)
- [BERT4Rec: Sequential Recommendation with Bidirectional Encoder Representations from Transformer](https://mlsanity.com/paper/1904.06690/) (2019)
- [Personalized Top-N Sequential Recommendation via Convolutional Sequence Embedding](https://mlsanity.com/paper/1809.07426/) (2018)
- [Deep Gaussian Embedding of Graphs: Unsupervised Inductive Learning via Ranking](https://mlsanity.com/paper/1707.03815/) (2017)
- [Bias and Debias in Recommender System: A Survey and Future Directions](https://mlsanity.com/paper/2010.03240/) (2020)
- [Fusing Similarity Models with Markov Chains for Sparse Sequential Recommendation](https://mlsanity.com/paper/1609.09152/) (2016)
- [Hierarchical Gating Networks for Sequential Recommendation](https://mlsanity.com/paper/1906.09217/) (2019)
- [Word Representations via Gaussian Embedding](https://mlsanity.com/paper/1412.6623/) (2014)
- [Personalizing Session-based Recommendations with Hierarchical Recurrent Neural Networks](https://mlsanity.com/paper/1706.04148/) (2017)
- [Translation-based Recommendation](https://mlsanity.com/paper/1707.02410/) (2017)
- [Continuous-Time Sequential Recommendation with Temporal Graph Collaborative Transformer](https://mlsanity.com/paper/2108.06625/) (2021)
- [Federated Social Recommendation with Graph Neural Network](https://mlsanity.com/paper/2111.10778/) (2021)
- [Augmenting Sequential Recommendation with Pseudo-Prior Items via Reversely Pre-training Transformer](https://mlsanity.com/paper/2105.00522/) (2021)
- [Latent Relational Metric Learning via Memory-based Attention for Collaborative Ranking](https://mlsanity.com/paper/1707.05176/) (2017)
- [CosRec: 2D Convolutional Neural Networks for Sequential Recommendation](https://mlsanity.com/paper/1908.09972/) (2019)
- [Attentional Graph Convolutional Networks for Knowledge Concept Recommendation in MOOCs in a Heterogeneous View](https://mlsanity.com/paper/2006.13257/) (2020)
- [An Inductive Bias for Distances: Neural Nets that Respect the Triangle Inequality](https://mlsanity.com/paper/2002.05825/) (2020)
- [Modeling Sequences as Distributions with Uncertainty for Sequential Recommendation](https://mlsanity.com/paper/2106.06165/) (2021)
- [DSKReG: Differentiable Sampling on Knowledge Graph for Recommendation with Relational GNN](https://mlsanity.com/paper/2108.11883/) (2021)
- [Pre-training Graph Neural Network for Cross Domain Recommendation](https://mlsanity.com/paper/2111.08268/) (2021)
- [MZET: Memory Augmented Zero-Shot Fine-grained Named Entity Typing](https://mlsanity.com/paper/2004.01267/) (2020)
- [Probabilistic Metric Learning with Adaptive Margin for Top-K Recommendation](https://mlsanity.com/paper/2101.04849/) (2021)
- [From Intrinsic to Counterfactual: On the Explainability of Contextualized Recommender Systems](https://mlsanity.com/paper/2110.14844/) (2021)
- [Recommending Podcasts for Cold-Start Users Based on Music Listening and Taste](https://mlsanity.com/paper/2007.13287/) (2020)
- [Gaussian Word Embedding with a Wasserstein Distance Loss](https://mlsanity.com/paper/1808.07016/) (2018)

## Built on by (most cited first, 30 of 37)

- [DiffuRec: A Diffusion Model for Sequential Recommendation](https://mlsanity.com/paper/2304.00686/) (2023)
- [Sparse Meets Dense: Unified Generative Recommendations with Cascaded Sparse-Dense Representations](https://mlsanity.com/paper/2503.02453/) (2025)
- [INCREASE: Inductive Graph Representation Learning for Spatio-Temporal Kriging](https://mlsanity.com/paper/2302.02738/) (2023)
- [RDRec: Rationale Distillation for LLM-based Recommendation](https://mlsanity.com/paper/2405.10587/) (2024)
- [ContrastVAE: Contrastive Variational AutoEncoder for Sequential Recommendation](https://mlsanity.com/paper/2209.00456/) (2022)
- [Graph Masked Autoencoder for Sequential Recommendation](https://mlsanity.com/paper/2305.04619/) (2023)
- [MELT: Mutual Enhancement of Long-Tailed User and Item for Sequential Recommendation](https://mlsanity.com/paper/2304.08382/) (2023)
- [GraphPro: Graph Pre-training and Prompt Learning for Recommendation](https://mlsanity.com/paper/2311.16716/) (2023)
- [Data Scarcity in Recommendation Systems: A Survey](https://mlsanity.com/paper/2312.10073/) (2023)
- [Personalized Behavior-Aware Transformer for Multi-Behavior Sequential Recommendation](https://mlsanity.com/paper/2402.14473/) (2024)
- [Multi-Modal Multi-Behavior Sequential Recommendation with Conditional Diffusion-Based Feature Denoising](https://mlsanity.com/paper/2508.05352/) (2025)
- [End-to-end Learnable Clustering for Intent Learning in Recommendation](https://mlsanity.com/paper/2401.05975/) (2024)
- [Sequential Recommendation with Diffusion Models](https://mlsanity.com/paper/2304.04541/) (2023)
- [Exploiting Session Information in BERT-based Session-aware Sequential Recommendation](https://mlsanity.com/paper/2204.10851/) (2022)
- [ELECRec: Training Sequential Recommenders as Discriminators](https://mlsanity.com/paper/2204.02011/) (2022)
- [Sequential Recommendation with Auxiliary Item Relationships via Multi-Relational Transformer](https://mlsanity.com/paper/2210.13572/) (2022)
- [Episodes Discovery Recommendation with Multi-Source Augmentations](https://mlsanity.com/paper/2301.01737/) (2023)
- [Mutual Wasserstein Discrepancy Minimization for Sequential Recommendation](https://mlsanity.com/paper/2301.12197/) (2023)
- [Unleashing the Potential of Two-Tower Models: Diffusion-Based Cross-Interaction for Large-Scale Matching](https://mlsanity.com/paper/2502.20687/) (2025)
- [Flow Matching based Sequential Recommender Model](https://mlsanity.com/paper/2505.16298/) (2025)
- [Deep Stable Multi-Interest Learning for Out-of-distribution Sequential Recommendation](https://mlsanity.com/paper/2304.05615/) (2023)
- [Generative Diffusion Models for Sequential Recommendations](https://mlsanity.com/paper/2410.19429/) (2024)
- [Sequential Recommendation with Probabilistic Logical Reasoning](https://mlsanity.com/paper/2304.11383/) (2023)
- [Sequential Recommendation with Controllable Diversification: Representation Degeneration and Diversity](https://mlsanity.com/paper/2306.11986/) (2023)
- [Capturing Popularity Trends: A Simplistic Non-Personalized Approach for Enhanced Item Recommendation](https://mlsanity.com/paper/2308.08799/) (2023)
- [Graph-enhanced Optimizers for Structure-aware Recommendation Embedding Evolution](https://mlsanity.com/paper/2310.03032/) (2023)
- [CrimeAlarm: Towards Intensive Intent Dynamics in Fine-grained Crime Prediction](https://mlsanity.com/paper/2404.06756/) (2024)
- [Alleviating User-Sensitive bias with Fair Generative Sequential Recommendation Model](https://mlsanity.com/paper/2506.19777/) (2025)
- [Eval4DiRec: A Unified and Systematic Evaluation Framework for Diffusion-based Recommender Systems](https://mlsanity.com/paper/2609.34404/) (2026)
- [G-STO: Sequential Main Shopping Intention Detection via Graph-Regularized Stochastic Transformer](https://mlsanity.com/paper/2306.14314/) (2023)

## Abstract (arXiv)

Sequential recommendation models the dynamics of a user's previous behaviors in order to forecast the next item, and has drawn a lot of attention. Transformer-based approaches, which embed items as vectors and use dot-product self-attention to measure the relationship between items, demonstrate superior capabilities among existing sequential methods. However, users' real-world sequential behaviors are textituncertain rather than deterministic, posing a significant challenge to present techniques. We further suggest that dot-product-based approaches cannot fully capture textitcollaborative transitivity, which can be derived in item-item transitions inside sequences and is beneficial for cold start items. We further argue that BPR loss has no constraint on positive and sampled negative items, which misleads the optimization. We propose a novel STOchastic Self-Attention~(STOSA) to overcome these issues. STOSA, in particular, embeds each item as a stochastic Gaussian distribution, the covariance of which encodes the uncertainty. We devise a novel Wasserstein Self-Attention module to characterize item-item position-wise relationships in sequences, which effectively incorporates uncertainty into model training. Wasserstein attentions also enlighten the collaborative transitivity learning as it satisfies triangle inequality. Moreover, we introduce a novel regularization term to the ranking loss, which assures the dissimilarity between positive and the negative items. Extensive experiments on five real-world benchmark datasets demonstrate the superiority of the proposed model over state-of-the-art baselines, especially on cold start items. The code is available in urlhttps://github.com/zfan20/STOSA.
