Source-linked AI summary
Unifying Search and Recommendation with Dual-View Representation Learning in a Generative Paradigm
Jujia Zhao, Wenjie Wang, Chen Xu, Xiuying Chen, Zhaochun Ren, Suzan Verberne
TL;DR
Joint search and recommendation modeling can enrich user-preference and item understanding, while task-specific heads in existing approaches require manual design. GenSR combines dual-view representations with prompt-guided generation, and the authors report that it outperforms strong baselines across both tasks.
Problem
Joint S&R modeling can enrich user-preference and item understanding, but task-specific heads require substantial manual design effort.
Source: §1 · p. 2Method
GenSR partitions parameter space with task-specific prompts and combines collaborative and semantic representations, contrastive alignment, and instruction-tuned generation.
Source: §1 · p. 3, §5.1.1 · p. 7Results
GenSR consistently outperforms strong discriminative and generative baselines on search and recommendation, with higher estimated mutual information and better gradient alignment.
Source: §7 · p. 21Takeaways & Limitations
The conclusion presents task-specific subspaces as a way to model distinct but complementary representations for both tasks within one unified model.
Source: §7 · p. 21Further optimization of task-specific subspaces remains a future direction, including improving their alignment and mutual information.
Source: §7 · pp. 21–22
Abstract
from arXiv · showhide
Recommender systems and search engines serve as foundational elements of online platforms, with the former delivering information proactively and the latter enabling users to seek information actively. Unifying both tasks in a shared model is promising since it can enhance user modeling and item understanding. Previous approaches mainly follow a discriminative paradigm, utilizing shared encoders to process input features and task-specific heads to perform each task. However, this paradigm encounters two key challenges: gradient conflict and manual design complexity. From the information theory perspective, these challenges potentially both stem from the same issue -- low mutual information between the input features and task-specific outputs during the optimization process. To tackle these issues, we propose GenSR, a novel generative paradigm for unifying search and recommendation (S&R), which leverages task-specific prompts to partition the model's parameter space into subspaces, thereby enhancing mutual information. To construct effective subspaces for each task, GenSR first prepares informative representations for each subspace and then optimizes both subspaces in one unified model. Specifically, GenSR consists of two main modules: (1) Dual Representation Learning, which independently models collaborative and semantic historical information to derive expressive item representations; and (2) S&R Task Unifying, which utilizes contrastive learning together with instruction tuning to generate task-specific outputs effectively. Extensive experiments on two public datasets show GenSR outperforms state-of-the-art methods across S&R tasks. Our work introduces a new generative paradigm compared with previous discriminative methods and establishes its superiority from the mutual information perspective.
1 Introduction
Jointly modeling search and recommendation can enrich user-preference and item understanding, but shared discriminative models face gradient conflict and manual task-head design. GenSR uses task-specific prompts to partition parameter space and combines dual-view representations with generative task outputs.
1 Introduction
- Jointly modeling search and recommendation can provide a more comprehensive view of user preferences and enrich item-side interaction signals [39] [55].Source: §1 · p. 2
- Different search and recommendation objectives can conflict in shared encoders, while task-specific heads require substantial manual design effort.Search emphasizes query-item relevance; recommendation emphasizes historical user preferences.Source: §1 · p. 2
- The authors argue that low mutual information in a shared parameter space may underlie both gradient conflict and the need for manually designed task heads.They link the constraint to limited shared-encoder representation capacity.Source: §1 · p. 2
- GenSR partitions parameter space with task-specific prompts, then uses dual collaborative and semantic representations and instruction tuning to generate task-specific outputs.Contrastive learning aligns the collaborative-filtering and semantic representations for the same users.Source: §1 · p. 3
S&R task unifying.
The paper frames its contributions around a mutual-information perspective on generative versus discriminative S&R and reports broad experimental evaluation of GenSR across both tasks.
S&R task unifying.
- The paper introduces a mutual-information-based perspective for comparing discriminative and generative paradigms.Source: S&R task unifying · p. 3
- Experiments on two public datasets cover S&R performance, mutual-information estimation, parameter-space visualization, gradient conflict, and module ablations.Source: S&R task unifying · p. 3
- The experiments evaluate GenSR’s effectiveness and efficiency against baselines across both search and recommendation tasks.Source: S&R task unifying · p. 3
2 Related Work
Prior work addresses S&R through task-specific integration, generative recommendation, personalized search, and generative ranking. The paper positions GenSR as a unified generative approach that uses both search and recommendation interactions.
2.1 Unifying search and recommendation
- S&R research includes search-enhanced recommendation and unified single-model approaches, while prior unified models are described as discriminative or as treating S&R data independently.GenSR instead jointly leverages S&R interactions [32].Source: §2.1 · pp. 3–4
2.2 Generative recommendation
- Generative recommendation has used pretrained models, prompts, and item-grounded or semantic outputs, but integrating search data remains underexplored.Source: §2.2 · p. 4
2.3 Personalized search
- Many personalized-search methods rely on search-side signals and overlook recommendation-side collaborative filtering, whereas GenSR integrates both behavior types in a unified generative framework.Source: §2.3 · pp. 4–5
2.4 Generative model for ranking
- Generative ranking casts query-document relevance as sequence generation, and the paper motivates recommendation data as a source of user preferences for search.Source: §2.4 · p. 5
3 Task Formulation
The task formulation places search and recommendation in one model that uses users’ interaction histories and candidate items, with a query supplied only for search. It specifies both discriminative and generative formulations.
3 Task Formulation
- The unified task predicts a user’s preference for a candidate item using historical S&R interactions, with a query present for search and empty for recommendation.The history records items and whether each interaction came from search or recommendation.Source: §3 · p. 5
- The discriminative formulation uses shared encoders and task-specific heads, with a combined cross-entropy objective whose γ parameter controls the S&R trade-off.Source: §3 · p. 5
- The generative formulation casts both tasks as conditional text generation from a unified structured prompt, producing “Yes” or “No” through constrained generation.Source: §3 · p. 5
4 Mutual Information Analysis of GenSR
The section uses mutual information between model inputs and task outputs as a measure of representational capability, then presents a theoretical argument for GenSR’s generative paradigm. Under stated assumptions, the analysis argues that the generative paradigm can enhance mutual information for search and recommendation compared with the discriminative paradigm.
4.1 Information-theoretic perspective
- Mutual information I(X;Y_t) measures input–output dependence for task t and serves as an indicator of a unified model’s representational capability.Higher mutual information means the input contains more predictive information about the task output.Source: §4.1 · p. 6
4 Mutual Information Analysis of GenSR
- Figure 2 depicts GenSR deriving collaborative-filtering and semantic history embeddings before combining them with task-specific prompts in a shared generative model.Contrastive learning aligns the views, while instruction tuning supports task-specific output generation.Source: Figure 2 · p. 7
4.2 Theoretical analysis
- Under the stated input and loss-function assumptions, the analysis argues that the generative paradigm can enhance mutual information for search and recommendation over the discriminative paradigm.The theorem assumes Gaussian input and independent Gaussian noise; the loss functions must admit second-order Taylor expansions with bounded remainders.Source: §4.2 · pp. 6–7
5 Method
GenSR unifies search and recommendation by learning collaborative-filtering and semantic representations of user history, then combining them with task-specific prompts in a shared generative model. Contrastive learning aligns the two views, while instruction tuning and a joint loss train task-specific generation.
5 Method
- GenSR has two modules: dual representation learning from collaborative-filtering and semantic views, and task unifying with contrastive learning and instruction tuning.The task-unifying module generates outputs for search and recommendation.Source: §5 · p. 7
5.1.1 Dual-view representation.
- GenSR separately captures semantic and collaborative-filtering information because search emphasizes semantic matching, whereas recommendation relies mainly on interaction-derived collaborative signals.The two views are intended to form comprehensive item representations for both tasks.Source: §5.1.1 · p. 7
5.1.2 S&R history soft filtering.
- History soft filtering selects relevant items from extensive search-and-recommendation interaction histories based on a user’s information needs.The method scores historical items against a candidate item using multi-head cross-attention before filtering.Source: §5.1.2 · pp. 8–9
5.2 S&R task unifying
- After dual representations are prepared, GenSR combines them with task-specific prompts and feeds them into a shared generative model.The prompt can incorporate the query for search, along with the user representations and candidate-item embeddings.Source: §5.2 · p. 9, §5.2.1 · p. 9
5.2.1 Training.
- Instruction tuning uses task-specific prompts to interleave user and candidate-item representations, with a query included for search, as input to the generative model.The prompt’s placeholders are replaced with learned representations and candidate-item embeddings.Source: §5.2.1 · p. 9
- Contrastive learning draws the same user’s collaborative-filtering and semantic embeddings together while pushing apart representations of different users in the batch.The loss uses cosine similarity and a temperature factor.Source: §5.2.1 · pp. 9–10
5.2.3 Loss function.
- The combined objective adds contrastive view-alignment loss to search-and-recommendation generation loss, with β controlling the contrastive-loss weight.The generation loss encourages likelihood of the correct task output sequence.Source: §5.2.3 · p. 10
6 Experiments
The experiments compare GenSR with recommendation, search, and unified baselines across two datasets, examining task performance, mutual information, gradient conflict, and component effects.
6 Experiments
- The experiments ask whether GenSR improves S&R performance, increases mutual information, mitigates gradient conflict, and benefits from its component strategies.The stated component examples include dual-view representation and S&R history soft filtering.Source: §6 · p. 10
6.1.1 Datasets.
- The study evaluates GenSR on Amazon’s Kindle Store 5-core subset and KuaiSAR, which provides authentic search and recommendation behaviors.Amazon search behaviors and queries are synthesized from recommendation data; KuaiSAR is a micro-video dataset with real user queries.Source: §6.1.1 · pp. 11–12
6.1.2 Baselines.
- Baselines cover recommendation-only, search-only, and unified S&R methods, including models that share representations or combine the two task domains.The unified methods include search-enhanced recommendation and jointly unified S&R approaches.Source: §6.1.2 · pp. 12–13
6.1.3 Experimental settings.
- Evaluation ranks the ground-truth item among 99 sampled negatives using Recall@K and NDCG@K at K = 5 and 10.GenSR uses flan-t5-base, and constrained beam search restricts its and IDGenRec’s generated results to the valid candidate set.Source: §6.1.3 · p. 13
6.2 Overall performance (RQ1)
GenSR achieves state-of-the-art results across both search and recommendation tasks on all evaluated datasets. The authors attribute this performance to its generative paradigm and two core modules.
6.2 Overall performance (RQ1)
- GenSR consistently outperforms all baselines across datasets in both recommendation and search, achieving state-of-the-art results.The authors attribute the result primarily to task-specific subspaces and the Dual Representation Learning and S&R Task Unifying modules.Source: §6.2 · pp. 13–14
- Unified S&R methods consistently outperform single-task recommendation and search models in the reported experiments.The authors connect this pattern to complementary user-behavior and item-interaction signals across the two tasks.Source: §6.2 · p. 14
- GenSR performs particularly strongly on Amazon search, where queries synthesized from item descriptions are semantically aligned with item content.The authors highlight GenSR’s semantic-view representation as suited to capturing this alignment.Source: §6.2 · p. 14
- The authors argue that semantic-only item IDs can miss collaborative preference signals, while atomic IDs lack semantic information useful for search.They cite IDGenRec and BSR as examples of these respective limitations relative to GenSR.Source: §6.2 · p. 14
6.3 Potential Application to Full Ranking (RQ1)
GenSR also performs effectively in full-corpus ranking, while analyses compare its mutual information and task-specific parameter structure with discriminative approaches. The visualization analysis uses KuaiSAR, the only real-world publicly available dataset in the study.
6.3 Potential Application to Full Ranking (RQ1)
- GenSR consistently outperforms the generative baselines across metrics and datasets in full-ranking evaluation, despite performance drops as the candidate space grows.The evaluation covers Amazon and KuaiSAR; the reported full-ranking comparison is in Table 4.Source: Table 4 · p. 15, §6.3 · pp. 15–16
- For full ranking, GenSR receives user history and, for search, the query, then generates an item ID without a candidate item input.This adaptation excludes soft filtering; constrained beam search ensures generated IDs belong to the corpus.Source: §6.3 · p. 15
6.4.1 Quantifying mutual information gains.
- MINE estimates show higher mutual information for the generative paradigm than UniSAR for both tasks on Amazon and KuaiSAR.The comparison estimates I(X;Y_t) using samples from joint and independent marginal distributions.Source: §6.4.1 · p. 16, Table 5 · p. 16
6.4.2 Parameter space visualization analysis.
- The parameter-space visualization uses KuaiSAR, KDE and t-SNE for task data distributions, and PCA to display discriminative hidden-state activations in two dimensions.The analysis is limited to KuaiSAR, identified as the only real-world, publicly available dataset in the study.Source: §6.4.2 · p. 17
- In the discriminative paradigm, search and recommendation hidden-state distributions overlap, which the authors link to entangled task information and gradient conflict.The overlap is interpreted as a limitation on representational capacity and mutual information.Source: §6.4.2 · p. 17
- The generative paradigm partitions parameter space into task-specific subspaces aligned with the distinct task distributions, which the authors associate with greater mutual information and reduced gradient conflict.The authors state that each task’s gradients can evolve independently within its subspace.Source: §6.4.2 · pp. 17–18
6.5 Gradient conflict analysis (RQ3)
GenSR shows smoother, more positive gradient similarity than the discriminative baseline, while its ablations and sensitivity analyses identify contributions from dual views, history filtering, contrastive learning, and balanced hyperparameters.
6.5 Gradient conflict analysis (RQ3)
- GenSR’s gradient similarities remain predominantly positive and smoother than UniSAR’s, whose values often dip below -0.5, indicating reduced conflict during training.The comparison uses cosine similarity between search and recommendation gradients from the same self-attention layer.Source: §6.5 · p. 18, Figure 4 · p. 19
6.6 Ablation study (RQ4)
- Using only one view drops Amazon NDCG@5 by about 26.5% for recommendation and 6.1% for search versus the full model.Similar performance drops occur on KuaiSAR; the authors attribute the result to the complementarity of collaborative-filtering and semantic information.Source: §6.6 · p. 19
- Removing history soft filtering lowers Amazon NDCG@5 by approximately 12.2% for recommendation and 3.1% for search.The authors say the strategy extracts relevant information from complex interaction histories.Source: §6.6 · pp. 19–20
- Removing contrastive learning lowers Amazon NDCG@5 by approximately 6.1% for recommendation and 1.0% for search.The authors describe cross-view alignment as integrating complementary representations in a shared embedding space.Source: §6.6 · p. 20
6.7 Hyper-parameter analysis (RQ4)
- On Amazon, recommendation NDCG@5 drops about 1.5% from peak at τ=0.01 and 0.8% at τ=0.09, indicating a performance peak within a specific temperature range.The analysis reports consistent trends on KuaiSAR but presents Amazon results for conciseness.Source: §6.7 · pp. 20–21
- Performance generally improves as β rises from 0.001, then stabilizes or slightly declines beyond an optimal range.The authors describe β as balancing contrastive alignment against the primary search and recommendation generation loss.Source: §6.7 · p. 21
7 Conclusion
GenSR unifies search and recommendation with task-specific prompt subspaces and dual-view representations. Experiments report stronger ranking performance alongside higher estimated mutual information and better gradient alignment; further optimization of the subspaces remains open.
7 Conclusion
- GenSR uses task-specific prompts to partition parameters into subspaces and combines dual-view representations with contrastive alignment and prompt-guided generation.The framework models collaborative and semantic signals from search and recommendation behaviors.Source: §7 · p. 21
- On Amazon and KuaiSAR, GenSR outperforms strong discriminative and generative baselines on search and recommendation, with higher estimated mutual information and better gradient alignment.The authors state that the analysis supports improved representation capability and mitigated gradient conflict.Source: §7 · p. 21
- Further work could optimize task-specific subspaces to improve their alignment and mutual information.The conclusion identifies optimization of the subspaces as an opportunity for further development.Source: §7 · pp. 21–22
Appendix (Proof of Theorem 5.1)
The proof compares parameter approximation in generative and discriminative models using local Taylor expansions. Under its stated assumptions, it concludes that the generative paradigm has lower approximation error and therefore higher mutual information.
Appendix (Proof of Theorem 5.1)
- The proof compares generative and discriminative parameter estimates by expanding their losses around the respective true parameters.It invokes a binary-classification relation between the discriminative parameter and the difference between generative class parameters.Source: Appendix (Proof of Theorem 5.1) · p. 22
- Under a local small-perturbation assumption and a uniform remainder bound, higher generative separability gives a smaller remainder norm for any fixed perturbation.The conclusion follows when the linear terms dominate the Taylor expansions.Source: Appendix (Proof of Theorem 5.1) · pp. 22–23
- The proof concludes that the generative paradigm has lower parameter approximation error, which implies higher mutual information under comparable noise variances.It relates estimates closer to the true parameter to mutual information approaching its theoretical upper bound.Source: Appendix (Proof of Theorem 5.1) · p. 23
Related papers
This paper cites
- Deep Unsupervised Learning using Nonequilibrium Thermodynamics2015
- Self-Attentive Sequential Recommendation2018
- BERT4Rec: Sequential Recommendation with Bidirectional Encoder Representations from Transformer2019
- LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation2020
- Deep Interest Network for Click-Through Rate Prediction2017