NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

DiffuRec: A Diffusion Model for Sequential Recommendation

Zihao Li, Aixin Sun, Chenliang Li

TL;DR

DiffuRec is the first framework to adapt diffusion models for sequential recommendation, moving beyond traditional fixed-vector embeddings. By representing items and user interests as probability distributions rather than static points, it effectively captures the inherent uncertainty and multi-faceted nature of human preferences, significantly outperforming state-of-the-art baselines like SASRec and BERT4Rec.

What Problem Does This Paper Address?

Most sequential recommendation (SR) systems represent items as fixed embedding vectors. While efficient, this approach struggles with four key realities of real-world e-commerce and media:

  1. Multiple Latent Aspects: An item isn't just one thing. A movie like Life is Beautiful spans both "Romance" and "War" genres. A single vector often fails to capture these overlapping "latent aspects."
  2. Diverse User Interests: User preferences are rarely singular or static; they shift based on context and mood.
  3. Uncertainty: Human behavior is stochastic. A user might click an item out of curiosity, not just deep-seated preference.
  4. Target Item Guidance: Standard models often ignore the "supervised signal" of the target item during the representation learning phase of training.

The authors argue that a generative approach—specifically a diffusion model—is better suited to model these "distributions" of interests and aspects.

Methods

DiffuRec adapts the standard Denoising Diffusion Probabilistic Model (DDPM) pipeline to the recommendation space through three main components:

  • The Diffusion Phase (Training): The model takes the "target" item (the one the user actually clicked next) and gradually adds Gaussian noise to its embedding over several steps. This "noised" target is then used to help generate distribution-based representations for the user's historical items.
  • The Approximator (The "Brain"): Instead of the U-Nets common in computer vision, DiffuRec uses a Transformer as its approximator. It takes the historical sequence and the noised target as input and attempts to reconstruct the original, clean target item embedding.
  • The Reverse Phase (Inference): To make a recommendation, the model starts with pure Gaussian noise. It then iteratively "denoises" this noise over multiple steps, conditioned on the user's history, until it arrives at a continuous representation of the predicted next item.
  • Rounding Operation: Since the diffusion process happens in a continuous high-dimensional space, the authors use a "rounding" function (calculating the inner product against all candidate item embeddings) to map the final denoised vector back to a discrete item ID.

Datasets

The model was evaluated on four diverse, real-world datasets commonly used in the SR field:

  • Amazon Beauty & Amazon Toys: Sparse datasets representing e-commerce interactions.
  • Movielens-1M: A classic benchmark for movie recommendations with high density.
  • Steam: A large-scale dataset of video game interactions and reviews.

Key Insights and Ideas

  • Distributions over Vectors: The "aha moment" here is treating a user's interest as a "cloud" or distribution. This allows the model to be "user-aware"—the same item might be represented differently depending on which of its latent aspects a specific user is currently interested in.
  • Noise as a Feature, Not a Bug: Injecting noise during the diffusion process acts as a powerful regularizer. It forces the model to learn more robust, discriminative embeddings, which helps it handle "long-tail" (unpopular) items better than deterministic models.
  • Iterative Refinement: Unlike Variational Auto-Encoders (VAEs), which try to jump to a distribution in one step, the iterative nature of diffusion allows the model to "reveal" the user's current interest more precisely through gradual refinement.

Key Results

DiffuRec demonstrated substantial improvements over nine strong baselines (including SASRec, BERT4Rec, and TiMiRec):

  • Massive Gains on Sparse Data: On the Amazon Beauty dataset, DiffuRec improved HR@5 by 57.26% and NDCG@5 by 56.72% over the best-performing baseline.
  • Consistency: It outperformed all baselines across all six metrics (HR@{5,10,20} and NDCG@{5,10,20}) on all four datasets.
  • Diversity: Qualitative analysis showed that DiffuRec recommends a wider variety of item categories compared to models like SASRec, which tend to get "stuck" in a single category.
  • Robustness: The model proved more resilient to "noisy" interaction data than standard Transformers, likely due to the uncertainty modeling inherent in the diffusion process.

Limitations and Future Work

The primary trade-off for this performance is inference speed. Because the reverse phase requires multiple iterative steps (the authors found 32 steps to be a "sweet spot"), it is computationally more expensive than the "one-shot" prediction of a standard Transformer.

The authors suggest that future work could focus on:

  • Optimizing the number of reverse steps to improve real-time serving.
  • Applying the diffusion paradigm to other tasks like Click-Through Rate (CTR) prediction or session-based recommendation.
  • Exploring different "noise schedules" to further refine how uncertainty is injected into the system.

Summary updated

BibTeX
@article{li2024diffurec,
  author = {Zihao Li and Aixin Sun and Chenliang Li},
  title = {{DiffuRec: A Diffusion Model for Sequential Recommendation}},
  journal = {ACM Trans. Information Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=vatrC8Jaf3},
}
Figure