PSSL: Self-supervised Learning for Personalized Search with Contrastive Sampling

Yujia Zhou, Zhicheng Dou, Yutao Zhu, Ji-Rong Wen

Abstract

Personalized search aims to tailor search results to individual user preferences based on historical behavior. However, neural models often struggle with data sparsity and suboptimal representations when trained solely on ranking labels. We present PSSL (Personalized Search with Self-supervised Learning), a two-stage framework that leverages contrastive sampling to pre-train robust user and text encoders. By utilizing four auxiliary self-supervised tasks—Document Pair, Query Pair, Sequence Augmentation Pair, and User Pair—PSSL captures nuanced semantic correlations from unlabeled user logs. Experimental results on large-scale datasets demonstrate that PSSL significantly outperforms state-of-the-art baselines in ranking accuracy.

Introduction

Standard search engines often fail to account for user-specific intent. For instance, a query for "Java" might refer to a programming language or a travel destination depending on the user's background. Personalized search addresses this by re-ranking results using historical interaction data. Despite its potential, neural personalized search faces two primary challenges: data sparsity, where many users have minimal interaction history, and rough representations, resulting from end-to-end training that focuses exclusively on the final ranking task, often missing deeper semantic relationships.

Methodology

PSSL addresses these challenges through a decoupled learning process: a pre-training stage using self-supervised learning (SSL) followed by a fine-tuning stage for the ranking task.

System Architecture

The framework employs two specialized encoders:

  • Sentence Encoder: A Transformer-based model that maps queries and documents into a shared semantic space.
  • Sequence Encoder: A hierarchical Transformer designed to model both long-term and short-term user history, producing query-aware user representations.
The PSSL framework architecture, showing the transition from self-supervised pre-training to the ranking task.

Contrastive Sampling and Auxiliary Tasks

The core of PSSL lies in its pre-training strategy. Using contrastive learning, the model learns to pull semantically related "positive pairs" closer while pushing unrelated "negative samples" apart. Four auxiliary tasks are defined to exploit implicit signals in user logs:

  1. Document Pair: Identifies documents clicked by the same user for the same query as semantically similar.
  2. Query Pair: Links different queries that lead to the same document click.
  3. Sequence Augmentation Pair (SAP): Encourages the sequence encoder to maintain consistent user representations despite history perturbations (e.g., reordering or deleting behaviors).
  4. User Pair: Clusters different users who exhibit similar interests for ambiguous queries.
The four contrastive sampling tasks used for self-supervised pre-training.

Experiments and Results

The model was evaluated on the public AOL Search Logs and a large-scale Commercial Dataset. In both cases, PSSL achieved state-of-the-art performance.

  • AOL Dataset: PSSL improved Mean Average Precision (MAP) by 3.3% over the previous best baseline (PEPS).
  • Commercial Dataset: The model showed a 0.8% improvement in MAP and a 1.2% increase in P-improve, indicating more reliable ranking across diverse queries.

Ablation studies highlighted that the Sequence Augmentation Pair (SAP) task was the most critical, as its removal led to the largest performance drop. This underscores the importance of learning robust, noise-resistant user behavior sequences. Furthermore, visualization confirmed that PSSL effectively disambiguates queries by tightening clusters of related intents in the vector space.

Conclusion

PSSL demonstrates that self-supervised pre-training is a powerful tool for overcoming data sparsity in personalized search. By treating user logs as a source of implicit supervision, the model builds richer representations that generalize better to the final ranking task. Future work will focus on reducing computational overhead and addressing the "cold start" problem for entirely new users.

Summary updated

BibTeX
@inproceedings{zhou2021pssl,
  author = {Yujia Zhou and Zhicheng Dou and Yutao Zhu and Ji-Rong Wen},
  title = {{PSSL: Self-supervised Learning for Personalized Search with Contrastive Sampling}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2021},
  doi = {10.1145/3459637.3482379},
}
Figure