Stochastic Sampling for Contrastive Views and Hard Negative Samples in Graph-based Collaborative Filtering

Chaejeong Lee, Jeongwhan Choi, Hyowon Wi, Sung-Bae Cho, Noseong Park

Abstract

SCONE (Stochastic sampling for COntrastive views and hard NEgative samples) is a unified framework leveraging score-based generative models (SGMs) to address data sparsity and the negative sampling gap in graph-based collaborative filtering. By utilizing a stochastic positive injection process during the generative denoising phase, SCONE synthesizes high-quality contrastive views and informative "hard" negative samples. Empirical evaluations across six benchmark datasets demonstrate that SCONE consistently outperforms state-of-the-art baselines, particularly for long-tail items and cold-start users, while maintaining computational efficiency.

Introduction

Graph-based Collaborative Filtering (CF) has become a cornerstone of modern recommendation systems. However, it faces two significant challenges: Data Sparsity and the Negative Sampling Gap. Data sparsity occurs because users typically interact with only a fraction of available items, leading to poor representations for "cold-start" users or "long-tail" items. The negative sampling gap refers to the difficulty in selecting informative negative samples; random sampling often yields "easy" negatives that fail to provide a strong training signal. Existing Contrastive Learning (CL) methods often rely on heuristic augmentations that may distort the underlying data distribution.

Methodology: The SCONE Framework

SCONE addresses these issues by employing Score-based Generative Models (SGMs) to synthesize data within the embedding space. The framework uses LightGCN as its backbone encoder to generate initial user and item embeddings.

Contrastive Views via Diffusion

Instead of applying random noise, SCONE utilizes the SGM's forward and reverse processes. The forward process gradually adds noise to the embeddings, while the reverse process learns to denoise them. By sampling from this learned distribution, SCONE creates "stochastically plausible" augmented views that provide a robust training signal without destroying the node's unique characteristics.

A stochastic process for generating contrastive views using the SGM's forward and reverse processes.

Stochastic Positive Injection

The core innovation for negative sampling is Stochastic Positive Injection. To generate a "hard" negative sample, the model takes a standard negative sample and, during the generative denoising process, injects a portion of the positive item's embedding. This pulls the negative sample closer to the positive one in the embedding space, creating a synthetic sample that is difficult for the model to distinguish from a true positive. This forces the model to learn sharper decision boundaries.

The stochastic positive injection process for synthesizing hard negative samples.

Experimental Evaluation

SCONE was evaluated on six diverse benchmark datasets: Douban, ML-1M, Gowalla, Tmall, Amazon-CDs, and Yelp2018. These datasets represent various domains (movies, e-commerce, social networks) and varying levels of sparsity.

Key Results

  • State-of-the-Art Performance: SCONE consistently outperformed top-tier baselines like SimGCL and MixGCF. Notably, it achieved a 1.70% improvement in Recall@20 on the Douban dataset.
  • Improved Uniformity: SCONE achieves higher uniformity in the embedding space, preventing embeddings from collapsing into a single cluster and allowing for better differentiation of user interests.
  • Robustness to Sparsity: The model showed the most significant gains for the bottom 80% of users (those with the fewest interactions), indicating its effectiveness in addressing the cold-start problem.
  • Efficiency: Despite the use of generative models, SCONE is computationally efficient, often outperforming traditional hard negative sampling methods that require extensive sorting of the item catalog.

Conclusion

SCONE demonstrates that generative models can move beyond simple heuristics to provide a more principled approach to data augmentation in recommendation systems. By synthesizing informative contrastive views and hard negative samples through stochastic positive injection, SCONE significantly improves the accuracy and robustness of graph-based collaborative filtering, particularly in sparse data scenarios. Future work includes extending SCONE to sequential recommendation tasks and automating hyperparameter tuning.

Summary updated

BibTeX
@inproceedings{lee2025stochastic,
  author = {Chaejeong Lee and Jeongwhan Choi and Hyowon Wi and Sung-Bae Cho and Noseong Park},
  title = {{Stochastic Sampling for Contrastive Views and Hard Negative Samples in Graph-based Collaborative Filtering}},
  booktitle = {WSDM},
  year = {2025},
  doi = {10.1145/3701551.3703522},
}
Figure