SPRec: Self-Play to Debias LLM-based Recommendation

Chongming Gao, Ruijun Chen, Shuai Yuan, Kexin Huang, Yuanqing Yu, Xiangnan He

Abstract

Large language models (LLMs) have attracted significant attention in recommendation systems. Current work primarily applies supervised fine-tuning (SFT) to adapt the model for recommendation tasks. However, SFT on positive examples only limits the model's ability to align with user preference. To address this, researchers recently introduced Direct Preference Optimization (DPO), which explicitly aligns LLMs with user preferences using offline preference ranking data. However, we found that DPO inherently biases the model towards a few items, exacerbating the filter bubble issue and ultimately degrading user experience. In this paper, we propose SPRec, a novel self-play framework designed to mitigate over-recommendation and improve fairness without requiring additional data or manual intervention. In each self-play iteration, the model undergoes an SFT step followed by a DPO step, treating offline interaction data as positive samples and the predicted outputs from the previous iteration as negative samples. This effectively re-weights the DPO loss function using the model's logits, adaptively suppressing biased items. Extensive experiments on multiple real-world datasets demonstrate SPRec's effectiveness in enhancing recommendation accuracy and fairness.

Introduction

Large Language Models (LLMs) are increasingly utilized in recommendation systems (LRSs) due to their superior contextual understanding compared to traditional collaborative filtering. Typically, these models are fine-tuned using Supervised Fine-Tuning (SFT) on historical user interactions. However, SFT focuses only on positive examples, which limits the model's ability to distinguish between subtle user preferences.

To address this, researchers have turned to Direct Preference Optimization (DPO) to align LLMs with user preferences using pairs of "chosen" and "rejected" items. While DPO improves alignment, it has been found to amplify popularity bias significantly, leading to a "filter bubble" where the model over-recommends a narrow set of popular items.

The Challenge of Popularity Bias in DPO

The mathematical formulation of DPO is inherently "mode-seeking," which causes the model's output distribution to collapse toward a few highly probable, popular items. This phenomenon results in both token-level and item-level biases.

As shown in Figure 1, token-level bias manifests as a preference for titles starting with common words like "The," while item-level bias leads to the repetitive recommendation of blockbusters (e.g., the Batman series) regardless of the user's specific niche interests.

Homogeneity issues in LLM-based recommendation results caused by token-level and item-level biases.

The SPRec Framework

To mitigate these biases, we propose SPRec, a self-play framework inspired by iterative reinforcement learning. SPRec allows the model to "unlearn" its own popularity biases by using its biased predictions as negative signals in an iterative training process.

The framework operates in three main steps per iteration:

  1. Negative Sample Generation: For every positive interaction in the training data, the current model generates its own recommendation. This predicted item, often a biased popular choice, is treated as a negative sample.
  2. SFT Step: The model undergoes a round of SFT on positive samples to maintain grounding in actual user preferences.
  3. DPO Step: The model is trained using DPO, where the ground truth is the "chosen" item and the model's own biased prediction is the "rejected" item.

By using its own outputs as negatives, the model effectively identifies and penalizes items it is over-recommending. This shifts the recommendation distribution from a narrow peak to a more balanced, diverse set of results.

Experimental Evaluation

SPRec was evaluated on four real-world datasets: MovieLens, Goodreads, Steam, and CDs and Vinyl, using Llama-3.2-1B-Instruct as the backbone. Key findings include:

  • Diversity and Fairness: SPRec significantly improved diversity metrics. On MovieLens, it nearly doubled the diversity ratio compared to standard DPO and reduced over-recommendation.
  • Accuracy: Unlike many debiasing methods that sacrifice accuracy for fairness, SPRec often improved accuracy (NDCG and HR). This suggests that removing the "easy" popular recommendations helps the model learn more meaningful user patterns.
  • Theoretical Support: The paper provides theoretical proof that standard DPO inherently favors popular items, and demonstrates how SPRec's adaptive re-weighting of the loss function suppresses these biases.

Conclusion and Future Work

SPRec demonstrates that LLMs can be debiased without additional data or manual intervention by leveraging their own skewed outputs through self-play. While effective, future research could address inherent biases in the initial SFT stage and bridge the gap between token-level generation and item-level list optimization.

For technical details and implementation, the code is available at https://github.com/RegionCh/SPRec.

Summary updated

BibTeX
@inproceedings{gao2024sprec,
  author = {Chongming Gao and Ruijun Chen and Shuai Yuan and Kexin Huang and Yuanqing Yu and Xiangnan He},
  title = {{SPRec: Self-Play to Debias LLM-based Recommendation}},
  booktitle = {The Web Conference},
  year = {2024},
}
Figure