Table of Contents
Fetching ...

Unified Generative Search and Recommendation

Teng Shi, Jun Xu, Xiao Zhang, Xiaoxue Zang, Kai Zheng, Yang Song, Enyun Yu

TL;DR

GenSAR addresses the mutual interference between search and recommendation by introducing a unified generative retrieval framework that encodes items with dual semantic and collaborative identifiers. It uses residual quantization with shared and task-specific codebooks, coupled with behavior-aware interactions and a suite of task-specific training objectives (NRIP, NSQP, NSIP) and identifier-language alignment to guide the model. Empirical results on Amazon and a commercial dataset show GenSAR achieving state-of-the-art performance on both tasks, outperforming traditional joint models and other generative baselines, while maintaining efficiency with a compact backbone (T5-small). This approach demonstrates how balancing semantic and collaborative signals within an LLM-based generation framework can mitigate the search-recommendation trade-off and improve overall user experience in real platforms.

Abstract

Modern commercial platforms typically offer both search and recommendation functionalities to serve diverse user needs, making joint modeling of these tasks an appealing direction. While prior work has shown that integrating search and recommendation can be mutually beneficial, it also reveals a performance trade-off: enhancements in one task often come at the expense of the other. This challenge arises from their distinct information requirements: search emphasizes semantic relevance between queries and items, whereas recommendation depends more on collaborative signals among users and items. Effectively addressing this trade-off requires tackling two key problems: (1) integrating both semantic and collaborative signals into item representations, and (2) guiding the model to distinguish and adapt to the unique demands of search and recommendation. The emergence of generative retrieval with Large Language Models (LLMs) presents new possibilities. This paradigm encodes items as identifiers and frames both search and recommendation as sequential generation tasks, offering the flexibility to leverage multiple identifiers and task-specific prompts. In light of this, we introduce GenSAR, a unified generative framework for balanced search and recommendation. Our approach designs dual-purpose identifiers and tailored training strategies to incorporate complementary signals and align with task-specific objectives. Experiments on both public and commercial datasets demonstrate that GenSAR effectively reduces the trade-off and achieves state-of-the-art performance on both tasks.

Unified Generative Search and Recommendation

TL;DR

GenSAR addresses the mutual interference between search and recommendation by introducing a unified generative retrieval framework that encodes items with dual semantic and collaborative identifiers. It uses residual quantization with shared and task-specific codebooks, coupled with behavior-aware interactions and a suite of task-specific training objectives (NRIP, NSQP, NSIP) and identifier-language alignment to guide the model. Empirical results on Amazon and a commercial dataset show GenSAR achieving state-of-the-art performance on both tasks, outperforming traditional joint models and other generative baselines, while maintaining efficiency with a compact backbone (T5-small). This approach demonstrates how balancing semantic and collaborative signals within an LLM-based generation framework can mitigate the search-recommendation trade-off and improve overall user experience in real platforms.

Abstract

Modern commercial platforms typically offer both search and recommendation functionalities to serve diverse user needs, making joint modeling of these tasks an appealing direction. While prior work has shown that integrating search and recommendation can be mutually beneficial, it also reveals a performance trade-off: enhancements in one task often come at the expense of the other. This challenge arises from their distinct information requirements: search emphasizes semantic relevance between queries and items, whereas recommendation depends more on collaborative signals among users and items. Effectively addressing this trade-off requires tackling two key problems: (1) integrating both semantic and collaborative signals into item representations, and (2) guiding the model to distinguish and adapt to the unique demands of search and recommendation. The emergence of generative retrieval with Large Language Models (LLMs) presents new possibilities. This paradigm encodes items as identifiers and frames both search and recommendation as sequential generation tasks, offering the flexibility to leverage multiple identifiers and task-specific prompts. In light of this, we introduce GenSAR, a unified generative framework for balanced search and recommendation. Our approach designs dual-purpose identifiers and tailored training strategies to incorporate complementary signals and align with task-specific objectives. Experiments on both public and commercial datasets demonstrate that GenSAR effectively reduces the trade-off and achieves state-of-the-art performance on both tasks.

Paper Structure

This paper contains 30 sections, 14 equations, 7 figures, 5 tables.

Figures (7)

  • Figure 1: Empirical analysis on the Commercial dataset: (a) A trade-off between S&R is observed in representative joint S&R methods, JSR JSR and UniSAR UniSAR. (b) The performance of the sequential recommendation model SASRec SASREC and the product search model QEM ai2019zero, using ID and text embeddings, respectively.
  • Figure 2: The joint search and recommendation identifier. We extract the semantic and collaborative embeddings for each item. These two embeddings are first concatenated and passed through the shared codebooks to learn shared codes. Then, the semantic and collaborative embeddings are separately processed through specific codebooks to learn specific codes. Finally, these codes are concatenated to form two identifiers for each item: one for semantics and one for collaboration.
  • Figure 3: Training and Inference Process of GenSAR. During training, we provide LLM with different instructions to generate corresponding responses. During inference, we append a token at the end of the instruction to indicate the type of behavior to be predicted, enabling the LLM to be applied to either search or recommendation tasks.
  • Figure 4: Performance of GenSAR using different identifiers.
  • Figure 5: Collision rate of different identifiers.
  • ...and 2 more figures