UnifiedSSR: A Unified Framework of Sequential Search and Recommendation

Jiayi Xie, Shang Liu, Gao Cong, Zhenzhong Chen

TL;DR

UnifiedSSR is a novel framework that bridges the gap between e-commerce search and recommendation by jointly modeling user behavior across both scenarios. By employing a dual-branch Siamese network and a self-supervised session modeling module, it captures evolving user intents and shares knowledge between queries and product interactions, setting new state-of-the-art performance benchmarks for both tasks.

What Problem Does This Paper Address?

In the world of e-commerce, search and recommendation are two sides of the same coin. While search engines respond to explicit user queries, recommendation engines infer preferences from past behavior. Despite sharing the same users, products, and vocabulary, these systems are traditionally developed in silos.

This separation leads to two major issues:

  1. Data Sparsity: Individual scenarios often lack enough data to build robust representations of user preferences.
  2. Fragmented Intent: User intent is dynamic. A user might search for "running shoes" (explicit intent) and later browse "fitness trackers" (inferred intent). Existing models struggle to capture these shifting "semantic sessions" and the correlations between unstructured queries and structured product interactions.

Methods

The authors propose UnifiedSSR, a framework designed for joint learning across scenarios. Its architecture consists of several key innovations:

  • Dual-Branch Siamese Encoder: The model features two branches—one for product sequences and one for query sequences. These branches share parameters to map both behaviors into a common latent space. For recommendation tasks, the query branch is simply deactivated, allowing the model to function seamlessly across scenarios.
  • Siamese Encoder Layers: Inspired by the Transformer, these layers use Multi-head Self-Attention to find patterns within a sequence and Multi-head Cross-Attention to capture the relationship between a user's queries and the products they ultimately clicked.
  • Intent-oriented Session Modeling (ISM): Instead of treating a history as one long string, ISM automatically discovers "semantic sessions"—subsequences of variable length driven by a specific intent. It learns to predict the offsets and lengths of these sessions dynamically.
  • Self-Supervised Learning (SSL): To guide the ISM, the authors introduce two SSL signals:
  • Discrimination: Encourages adjacent sessions in a sequence to be distinct.
  • Alignment: Ensures that a query session and its corresponding product interaction session are mapped closely together, as they represent the same underlying intent.
Figure 2: An overview of the proposed UnifiedSSR framework. (a) presents the architecture of UnifiedSSR with query branch deactivated for recommendation (left) and with entire dual branches for search (right). The information sharing mechanism is two-fold: cross-scenario parameter sharing for learning user-interacted products in two scenarios, cross-view parameter sharing for learning user-interacted products and user-issued queries in the search scenario. (b) illustrates the structure of the Siamese Encoder layer. (c) demonstrates the complete Intent-oriented Session Modeling in the search scenario.

Datasets

The model was evaluated on three large-scale datasets:

  • JDsearch: A real-world dataset from JD.com containing over 16 million interactions, including actual user queries.
  • Amazon-CL (Clothing, Shoes, and Jewelry): A standard benchmark where queries were simulated using product metadata and user reviews.
  • Amazon-EL (Electronics): Similar to Amazon-CL, used to test the model's robustness across different product categories.

Key Insights and Ideas

  • Queries as "Views": The paper treats the pair of an issued query and the interacted product as two different "views" of the same intent. Aligning these views helps the model learn better representations for unstructured text queries, which are notoriously difficult to model.
  • The Power of Joint Pre-training: A key finding is that pre-training on both search and recommendation data, followed by task-specific fine-tuning, significantly outperforms training on a single scenario. This suggests that search data contains rich intent signals that can "warm up" recommendation models, and vice versa.
  • Dynamic vs. Static Sessions: Traditional models often use fixed time windows to define sessions. UnifiedSSR proves that letting the model learn where an intent starts and ends (ISM) leads to much more accurate user modeling.

Key Results

UnifiedSSR consistently outperformed state-of-the-art baselines (including SASRec, SESRec, and HEM) across all datasets.

  • Search Scenario: On the JDsearch dataset, UnifiedSSR achieved an 8.43% improvement in HR@5 and a 9.51% improvement in NDCG@10 over the best-performing baseline.
  • Recommendation Scenario: The model showed similar gains, with a 7.67% improvement in HR@5 on JDsearch.
  • Ablation Success: Removing the Intent-oriented Session Modeling (ISM) or the joint pre-training (FT) led to noticeable performance drops, confirming that both the architecture and the training strategy are vital.
Performance comparison across different embedding dimensions

Limitations and Future Work

While UnifiedSSR is powerful, the authors note a few areas for growth:

  • Side Information: The current model focuses on behavior sequences. Incorporating user profiles (age, location) and rich product metadata (images, detailed specs) could further enhance accuracy.
  • Query Simulation: For the Amazon datasets, queries were simulated. While effective for benchmarking, real-world search behavior is often messier and more conversational, which may require further tuning of the query branch.
  • Scalability: The dual-branch cross-attention mechanism adds computational complexity; future work could explore more efficient attention variants for massive-scale production environments.

Summary updated

Abstract

In this work, we propose a Unified framework of Sequential Search and Recommendation (UnifiedSSR) for joint learning of user behavior history in both search and recommendation scenarios. Specifically, we consider user-interacted products in the recommendation scenario, user-interacted products and user-issued queries in the search scenario as three distinct types of user behaviors. We propose a dual-branch network to encode the pair of interacted product history and issued query history in the search scenario in parallel. This allows for cross-scenario modeling by deactivating the query branch for the recommendation scenario. Through the parameter sharing between dual branches, as well as between product branches in two scenarios, we incorporate cross-view and cross-scenario associations of user behaviors, providing a comprehensive understanding of user behavior patterns. To further enhance user behavior modeling by capturing the underlying dynamic intent, an Intent-oriented Session Modeling module is designed for inferring intent-oriented semantic sessions from the contextual information in behavior sequences. In particular, we consider self-supervised learning signals from two perspectives for intent-oriented semantic session locating, which encourage session discrimination within each behavior sequence and session alignment between dual behavior sequences. Extensive experiments on three public datasets demonstrate that UnifiedSSR consistently outperforms state-of-the-art methods for both search and recommendation.
BibTeX
@inproceedings{xie2023unifiedssr,
  author = {Jiayi Xie and Shang Liu and Gao Cong and Zhenzhong Chen},
  title = {{UnifiedSSR: A Unified Framework of Sequential Search and Recommendation}},
  booktitle = {The Web Conference},
  year = {2023},
}
Figure