Mutual Wasserstein Discrepancy Minimization for Sequential Recommendation

Ziwei Fan, Zhiwei Liu, Hao Peng, Philip S. Yu

Introduction

Sequential Recommendation (SR) systems are designed to predict a user’s future interactions based on their historical behavior. To enhance the robustness of these models, researchers frequently employ Self-Supervised Learning (SSL). This typically involves data augmentation techniques—such as random cropping or masking—to create multiple views of a user's history, which the model then learns to associate with the same underlying user profile.

The current industry standard for SSL in recommendation is the InfoNCE loss, which maximizes Mutual Information (MI) between augmented pairs. However, this approach suffers from two significant limitations:

  1. The KL-Divergence Trap: InfoNCE relies on KL-divergence, which requires large batch sizes for accurate MI estimation and can be unstable when data distributions lack sufficient overlap.
  2. Ignoring Stochasticity: Traditional models treat augmented sequences as fixed points in an embedding space, failing to account for the inherent uncertainty introduced by random augmentations.

To address these issues, we introduce MStein (Mutual WasserStein discrepancy minimization), a framework that replaces standard contrastive losses with a novel Wasserstein Discrepancy Measurement.

Methodology: From Points to Distributions

MStein shifts the paradigm from point-based embeddings to Stochastic Embeddings. Instead of representing an item or sequence as a fixed vector, MStein models them as Gaussian distributions defined by a mean and covariance. This allows the model to explicitly represent and learn from data uncertainty.

Conceptual framework of MStein: mapping augmented sequences to stochastic distributions.

Wasserstein Discrepancy Measurement (WDM)

Rather than using dot products or KL-divergence, MStein utilizes the 2-Wasserstein distance to compare sequences. The Wasserstein metric is mathematically "smoother" than KL-divergence, providing meaningful gradients even when distributions are far apart. The resulting MStein loss pulls "positive" augmented pairs together in the Wasserstein space while pushing "negative" pairs (different users) apart.

Furthermore, the authors demonstrate that using an $L_2$ norm-based Wasserstein distance helps maintain Lipschitz continuity. This property ensures the model is less sensitive to small perturbations in input data, leading to more stable training and robust performance.

Experimental Setup

MStein was evaluated on four benchmark datasets from the Amazon Review collection: Beauty, Toys and Games, Tools and Home, and Office Products. These datasets offer a diverse range of interaction densities and sequence lengths, providing a rigorous test for recommendation robustness.

Key Results and Insights

MStein achieved state-of-the-art (SOTA) performance across all datasets, outperforming strong baselines like DuoRec and CoSeRec. Improvements in metrics such as Recall@1 and Mean Reciprocal Rank (MRR) ranged from 2.24% to over 20%.

Training Efficiency and Batch Size

A key finding is MStein's remarkable efficiency. While models like CoSeRec typically require a batch size of 128 to achieve peak performance, MStein reaches superior results with a batch size as small as 16. This efficiency stems from the Wasserstein distance being a more stable estimator of mutual information than the KL-divergence used in InfoNCE.

Robustness to Noise

In stress tests involving the addition of random "noise" interactions, MStein demonstrated significantly slower performance decay compared to its competitors.

Robustness of MStein vs. CoSeRec under varying noise ratios on the Office dataset.

As shown in the figure above, MStein maintains a clear performance advantage even as the noise ratio increases, highlighting its ability to learn underlying user patterns rather than memorizing noisy samples.

Conclusion and Future Work

MStein represents a significant advancement in sequential recommendation by leveraging stochastic embeddings and Wasserstein discrepancy. While the model introduces some computational overhead due to Gaussian representations, its gains in efficiency and robustness are substantial. Future research may explore "learnable" augmentations to further refine the model's ability to capture complex user behaviors, particularly in cold-start scenarios where interaction data is sparse.

Summary updated

BibTeX
@inproceedings{fan2023mutual,
  author = {Ziwei Fan and Zhiwei Liu and Hao Peng and Philip S. Yu},
  title = {{Mutual Wasserstein Discrepancy Minimization for Sequential Recommendation}},
  booktitle = {The Web Conference},
  year = {2023},
}
Figure