Source-linked AI summary

Generate What You Prefer: Reshaping Sequential Recommendation via Guided Diffusion

Zhengyi Yang, Jiancan Wu, Zhicai Wang, Xiang Wang, Yancheng Yuan, Xiangnan He

arXiv:2310.20453v1cs.IR

TL;DR

Sequential recommendation commonly classifies positive and sampled negative items, while generating an oracle item from interaction history remains largely unexplored. DreamRec reframes the task as history-guided diffusion generation and consistently improves recommendation performance over compared methods.

  • Problem

    Sequential recommenders largely classify positive and sampled negative candidates, leaving oracle-item generation from historical interactions unexplored.

  • Method

    DreamRec uses a Transformer-encoded interaction history to guide diffusion denoising that generates an oracle item from noise.

  • Results

    DreamRec substantially and consistently outperforms compared sequential-recommendation models on top-K performance across three real-world datasets.

  • Takeaways & Limitations

    DreamRec supports learning-to-generate as an alternative that models user preference directly, enables unobserved oracle items, and dispenses with negative samples.

  • Takeaways & Limitations

    DreamRec’s sampling process is slow because it iterates through diffusion steps, and its training process is more time-consuming.

Abstract

from arXiv · show

Sequential recommendation aims to recommend the next item that matches a user's interest, based on the sequence of items he/she interacted with before. Scrutinizing previous studies, we can summarize a common learning-to-classify paradigm -- given a positive item, a recommender model performs negative sampling to add negative items and learns to classify whether the user prefers them or not, based on his/her historical interaction sequence. Although effective, we reveal two inherent limitations:(1) it may differ from human behavior in that a user could imagine an oracle item in mind and select potential items matching the oracle; and (2) the classification is limited in the candidate pool with noisy or easy supervision from negative samples, which dilutes the preference signals towards the oracle item. Yet, generating the oracle item from the historical interaction sequence is mostly unexplored. To bridge the gap, we reshape sequential recommendation as a learning-to-generate paradigm, which is achieved via a guided diffusion model, termed DreamRec.Specifically, for a sequence of historical items, it applies a Transformer encoder to create guidance representations. Noising target items explores the underlying distribution of item space; then, with the guidance of historical interactions, the denoising process generates an oracle item to recover the positive item, so as to cast off negative sampling and depict the true preference of the user directly. We evaluate the effectiveness of DreamRec through extensive experiments and comparisons with existing methods. Codes and data are open-sourced at https://github.com/YangZhengyi98/DreamRec.

1 Introduction

The paper reframes sequential recommendation from classifying sampled candidate items to generating an oracle item that represents user preference from historical interactions. DreamRec implements this shift with guided diffusion, adding noise to target representations and denoising history-guided noise into an oracle item.

  • 1 Introduction: Sequential recommendation predicts the next preference-matching item from a user’s historical interaction sequence, commonly using a learning-to-classify paradigm with positive and sampled negative items.
  • 1 Introduction: The classification paradigm may misrepresent users who imagine an ideal oracle item before selecting a concrete item that best matches it.
  • 1 Introduction: Sampled negatives restrict exploration and provide unreliable supervision: easy negatives contribute little, while overly difficult or false negatives add noise, obscuring the oracle preference.
  • 1 Introduction: DreamRec reshapes recommendation as learning-to-generate by modeling the distribution implied by history, generating an oracle item, and retrieving real items that best match it.
  • 1 Introduction: DreamRec progressively noises the target representation and reverses the process by denoising Gaussian noise under historical-sequence guidance to generate a tailored oracle item.

2 Related Work

Sequential recommendation has largely followed a learning-to-classify paradigm that separates positive items from sampled negatives [5] [4]. Although diffusion models are increasingly used for recommendation and other generative tasks, DreamRec instead formulates sequential recommendation as learning to generate an oracle item without negative sampling.

  • Sequential Recommendation: Most sequential recommenders classify the next item by separating a positive instance from sampled negatives based on historical interactions [5] [4].
  • Diffusion Models: Diffusion models are widely used for image synthesis, text generation, and molecule design because they approximate data-generation distributions precisely and train more stably than GANs and VAEs [25] [26] [29] [30].
  • Diffusion for Recommendation: Recent diffusion-based sequential recommenders still follow learning-to-classify training and therefore require negative sampling [37] [38] [39] [40].Li et al. [37] and Du et al. [38] use softmax cross-entropy over candidate logits, while Wang et al. [39] uses binary cross-entropy with non-target items treated as negatives.
  • DreamRec: DreamRec reshapes sequential recommendation as learning to generate by directly producing an oracle item tailored to the user’s behavior sequence, without negative sampling.This formulation transcends the concrete candidate set and encourages exploration of the underlying data distribution.

3 Preliminary

This section introduces DDPM-based diffusion modeling, which represents data generation with forward noising and reverse denoising Markov chains. Training learns the target distribution by minimizing a variational-bound objective equivalent to a KL-divergence term.

  • Diffusion Model: DDPM [32] models the data-generation distribution pθ(x0) using forward and reverse Markov chains over the target x0 and latent states x1, …, xT.The forward process progressively adds Gaussian noise, while the reverse process begins from xT ∼ N(0, I) and denoises through learned Gaussian transitions.
  • Reverse Process: The reverse transition pθ(xt−1|xt) is modeled as a Gaussian with mean and covariance determined by the current noisy state and diffusion step.Specifically, pθ(xt−1|xt) = N(xt−1; µθ(xt, t), Σθ(xt, t)).
  • Training Objective: DDPM [32] trains by optimizing the variational bound on negative log-likelihood, equivalently minimizing the KL divergence between q(x0:T) and pθ(x0:T).The objective is expressed through the diffusion-chain distributions and their latent variables.
  • Implementation: Following DDPM [32], the covariance is fixed to ˜βtI, while the architecture of ϵθ varies by task, such as U-Net for images and Transformer for text.This separates the diffusion formulation from task-specific neural-network designs.

4 Method

DreamRec reshapes sequential recommendation as oracle-item generation with a Transformer-guided diffusion model. It learns to recover observed target items without negative sampling, then retrieves nearby candidate items for recommendation.

  • Oracle Item Generation: DreamRec reframes sequential recommendation as generating an oracle item embedding from historical interactions, modeled through a conditional distribution learned with guided diffusion.The oracle item represents an idealized item users imagine before searching among tangible candidates.
  • Guided Diffusion: A Transformer encoder converts historical item embeddings into a guidance representation that conditions the diffusion denoising process for personalized generation.Unconditioned DDPM denoising would produce non-personalized items because it lacks historical-interaction guidance.
  • Training Phase: DreamRec trains by corrupting observed target-item embeddings with Gaussian noise and learning to recover the target, rather than performing negative sampling.The model predicts the target sample directly, while classifier-free guidance randomly replaces the history representation with a dummy token during training.
  • Generation Phase: During inference, DreamRec starts from Gaussian noise and denoises for T steps under historical guidance, with a hyperparameter controlling personalization strength.Increasing guidance can improve personalization but may reduce diffusion generalization and oracle-item quality.
  • Recommendation Retrieval: The generated oracle embedding is converted into a recommendation list by retrieving the K-nearest candidate items using inner-product similarity; this retrieval is excluded from training.Candidate retrieval occurs only after oracle-item generation.

5 Experiments

DreamRec is evaluated against established sequential recommenders on three real-world datasets using top-K HR and NDCG, substantially and consistently outperforming the compared models. Additional analyses examine its item-space exploration without negative sampling and the role of guidance strength in oracle-item generation.

  • Item-Space Exploration: On Zhihu, DreamRec explores most of the item space without negative sampling, whereas SASRec embeddings remain crowded or concentrated in limited regions.The comparison uses SASRec without negative sampling, SASRec with negative sampling, and DreamRec; results on other datasets are reported in Appendix C.
  • Evaluation Protocol: DreamRec is evaluated with top-K hit ratio and NDCG by generating an oracle item and retrieving its K-nearest candidate items.Classification-based recommenders instead rank candidate items using classification logits.
  • Overall Performance: DreamRec substantially and consistently outperforms the compared sequential recommendation models in overall top-K performance.Table 1 reports averages and standard deviations over five experiments.
  • Guidance Analysis: DreamRec’s classifier-free guidance strength must be tuned carefully because excessively large values can hurt diffusion generalization and produce lower-quality oracle items.The guidance-strength ablation is conducted on YooChoose, KuaiRec, and Zhihu.

6 Conclusion and Limitations

DreamRec reshapes sequential recommendation from learning-to-classify into learning-to-generate, modeling unobserved oracle items directly and avoiding negative sampling. It achieves consistent improvements but has slow sampling and time-consuming training, motivating more efficient generation models such as consistency models.

  • Contributions: DreamRec reframes sequential recommendation as generating an unobserved oracle item rather than classifying candidates, reflecting users’ tendency to fantasize about an ideally consumable item.The oracle item need not be the dataset’s next item or belong to a predefined candidate set.
  • Contributions: By modeling the underlying data-generation distribution with diffusion, DreamRec directly models user preferences and discards negative samples, yielding consistent improvements in sequential recommendation.These improvements imply stronger modeling of user behaviors than the prior classification-based framing.
  • Limitations: DreamRec’s diffusion sampling is slow because of repeated steps, and its training is time-consuming; advanced generators such as consistency models may address these limitations.As an initial oracle-item-generation approach, DreamRec also opens opportunities for future auxiliary tasks.

7 Broader Impact · A Proving the Equivalent of Equation (9) and (14)

DreamRec may improve sequential recommendation in real-world platforms but raises privacy concerns because generated oracle-item representations could expose user preferences. The appendix proves that noise-prediction and target-prediction diffusion objectives are theoretically equivalent and adopts target prediction for oracle-item generation.

  • 7 Broader Impact: DreamRec could improve recommendation satisfaction on real-world platforms, but decoding oracle-item representations may disclose users’ preferences.The paper advises caution when using generated oracle items because vector representations might be decoded to reveal preferences explicitly.
  • A Proving the Equivalent of Equation (9) and (14): The DDPM generation task is formulated by optimizing a variational bound on negative log-likelihood, whose timestep terms are then analytically simplified.The derivation begins from the variational-bound objective and uses Gaussian posterior and model distributions with Rao-Blackwellization [32].
  • A Proving the Equivalent of Equation (9) and (14): Reparameterizing µθ and substituting the resulting expressions yields the simplified timestep objective in Equation (9).The proof introduces the DDPM reparameterization of µθ before substituting it into the preceding expression.
  • A Proving the Equivalent of Equation (9) and (14): An alternative reparameterization of µθ produces another simplified form of the diffusion objective.This derivation proceeds through an alternative parameterization and an intermediate result before simplifying the objective.
  • A Proving the Equivalent of Equation (9) and (14): Noise prediction in Equation (22) and target prediction in Equation (25) are theoretically equivalent diffusion-training objectives.The paper notes that DDPM performs well with noise prediction for image generation, whereas study finds target prediction more suitable for text generation.
  • A Proving the Equivalent of Equation (9) and (14): DreamRec adopts target prediction, equivalently Equation (14), as its objective for generating oracle items in sequential recommendation.This choice follows the theoretical equivalence while selecting the formulation considered more suitable for the application.

B Detailed Experimental Settings · B.1 Statistics of Datasets

The detailed experimental settings summarize the adopted datasets in Table 2 and visualize learned item embeddings on YooChoose and KuaiRec. DreamRec is described as exploring more of the item space without negative sampling on both datasets.

  • B.1 Statistics of Datasets: Table 2 summarizes the statistics of the adopted datasets.
  • B.1 Statistics of Datasets: The embedding visualizations compare SASRec without negative sampling, SASRec, and DreamRec.
  • B.1 Statistics of Datasets: On YooChoose, Figure 5 visualizes learned item embeddings using T-SNE.
  • B.1 Statistics of Datasets: DreamRec explores most of the YooChoose item space without requiring negative sampling.
  • B.1 Statistics of Datasets: On KuaiRec, Figure 6 visualizes learned item embeddings using T-SNE.
  • B.1 Statistics of Datasets: DreamRec explores more of the KuaiRec item space without requiring negative sampling.

C More Ablation Studies · C.1 Visualization on YooChoose and KuaiRec Datasets.

Visualization on YooChoose and KuaiRec shows that DreamRec explores the item space more effectively than SASRec without negative sampling, which can fail to distinguish items.

  • C.1 Visualization on YooChoose and KuaiRec Datasets.: DreamRec better explores the item space on YooChoose and KuaiRec by directly modeling the data-generation distribution.The visualizations are reported in Figures 5 and 6, respectively.
  • C More Ablation Studies: SASRec without negative sampling may collapse many items into limited regions, making different items difficult to distinguish.This visualization supports the necessity of negative sampling for classification-based sequential recommenders.
Loading 2310.20453v1…