Source-linked AI summary

UniSGR: Unified Framework for Semantic ID Generation and Ranking

Jiawei Sun, Jun Yang, Ziyue Guo, Dongyue Xu, Jianan Yan, Lifang Deng, Xiaoyi Zeng

arXiv:2607.04068v1cs.IR

TL;DR

Cascade recommenders optimize stages locally, and generative retrieval methods still have limited fine-grained ranking capability. UniSGR unifies semantic ID generation and multi-objective ranking through two-stage training and reports a 200% throughput improvement for STARK in industrial-scale scenarios, with evaluations validating effectiveness and scalability.

  • Problem

    Cascade architectures optimize modules for local subtasks, and existing generative retrieval methods have limited fine-grained ranking capability.

    Source: §1 · p. 1
  • Method

    UniSGR couples semantic ID generation and multi-objective ranking through multi-scenario pre-training followed by scenario-specific alignment.

    Source: §1 · p. 2
  • Results

    200% throughput improvement in industrial-scale scenarios is reported for STARK, and offline evaluations and online A/B testing validate UniSGR’s effectiveness and scalability.

    Source: §1 · p. 2
  • Takeaways & Limitations

    UniSGR incorporates ranking-oriented supervision into semantic ID generation so generated candidates better align with downstream business objectives.

    Source: §1 · p. 2

    Production statistics, including user volume, item volume, and exact traffic scale, are omitted for confidentiality reasons.

    Source: §4.1.1 · p. 6

Abstract

from arXiv · show

Recommendation systems play a pivotal role in modern e-commerce platforms. While generative retrieval has emerged as a promising paradigm for alleviating the limitations of multi-stage cascade architectures, existing methods still struggle with fine-grained multi-objective ranking. To bridge this gap, we propose UniSGR, a Unified framework for Semantic ID Generation and Ranking. UniSGR adopts a two-stage training paradigm: a multi-scenario pre-training stage that learns from mixed business-scenario data, followed by a scenario-specific alignment stage that jointly optimizes Value-Aware Parallel Multi-Token Prediction (VA-PMTP) and a unified multi-objective ranking module. To better align generation with downstream ranking, we introduce Task-Aware Tokens (TAT) guided by Funnel-Aware Contrastive Learning. Furthermore, we propose Semantic Tree Attention with Reorganized KV cache (STARK), an inference strategy that removes key efficiency bottlenecks in conventional beam search. Extensive offline experiments on a large-scale e-commerce platform demonstrate the effectiveness and scalability of UniSGR.

1 Introduction

UniSGR unifies semantic ID generation and multi-objective ranking to address generative retrieval’s limited fine-grained ranking and the objective mismatch of adding a separate ranker. Its two-stage training and STARK inference strategy align generation with business objectives and improve throughput.

1 Introduction

  • Cascade stages optimize local subtasks, while relevant items filtered during retrieval cannot be recovered by downstream rankers.Generative retrieval methods also have limited fine-grained ranking capability, and adding a separate ranker can reintroduce objective mismatch.Source: §1 · pp. 1–2
  • The two-stage paradigm combines multi-scenario pre-training with scenario-specific alignment to address heterogeneous business intents and objectives.The alignment stage uses VA-PMTP and Task-Aware Tokens to align generation with business objectives.Source: §1 · p. 2
  • UniSGR couples semantic ID generation with discriminative ranking, incorporating ranking-oriented supervision so generated candidates better align with downstream business objectives.The framework supports multi-objective optimization using click, add-to-cart, and purchase signals in one training process.Source: §1 · p. 2
  • STARK is a semantic-ID inference strategy that achieves a 200% throughput improvement in industrial-scale scenarios.Offline evaluations and online A/B testing on a real-world e-commerce platform validate UniSGR’s effectiveness and scalability.Source: §1 · p. 2

2 Related Work

Prior work spans feature-interaction and user-interest models for deep learning recommendation, as well as semantic-ID and generative recommendation methods. UniSGR builds on efforts to unify retrieval and ranking by applying multi-objective ranking directly to a semantic-ID generative decoder.

2.1 Deep Learning Recommendation Model

  • DLRM-era recommendation models progress from explicit or learned feature interactions to attention-based user-interest modeling and system-aware sparse and dense computation.Examples include Wide & Deep [6], DeepFM [11], AutoInt [21], DIN [28], DLRM [19], and LONGER [4].Source: §2.1 · p. 2

2.2 Generative Recommendation Model

  • Generative recommendation work includes semantic tuple IDs, item and user-sequence modeling, efficiency improvements, and end-to-end generation; UniSGR adds multi-objective ranking directly on a semantic-ID decoder.The related work describes TIGER [20], HLLM [5], HSTU [25], MTGR [12], OneRec [9], OneRec-Think [17], OneRanker [22], GRank [23], and GPR [27].Source: §2.2 · p. 2

3.1 Data Arrangement

UniSGR organizes data around multi-scenario pre-training followed by target-scenario alignment. The alignment stage uses behavior-specific targets for both generation and ranking on a shared semantic ID representation.

3.1 Data Arrangement

  • Multi-scenario pre-training mixes behavior logs across business scenarios and forms next-item generation samples from chronological interaction sequences.Each sample includes user profile, scenario/context, prior interactions, and the next item’s semantic ID sequence.Source: §3.1 · p. 2
  • Scenario-specific alignment uses target-scenario candidates labeled by behavior, with VA-PMTP generation targets weighted by business value and ranking predictions for the same behaviors.Both objectives use shared generation representations, jointly optimizing the same semantic ID representation space.Source: §3.1 · p. 2
  • At serving time, the ranking module scores generated candidates without a separate item-ID-based ranking model.The encoder consumes user profile, behavior sequence, and context features, while the decoder generates semantic IDs.Source: §3.1 · p. 2

3.2 Problem Formulation

The formulation treats sequential recommendation as unified generative retrieval and multi-objective ranking over users, items, interaction histories, and semantic IDs. It specifies multi-scenario pre-training, target-scenario alignment, and serving that re-ranks generated candidates.

3.2 Problem Formulation

  • Each item is mapped to a discrete semantic ID sequence, whose length is determined by the number of semantic layers.The formulation represents a user with profile features and a chronological interaction sequence.Source: §3.2 · pp. 2–3
  • Multi-scenario pre-training learns generalizable user interests from mixed business-scenario data and serves as a pure generative retriever.The training paradigm then adapts the pre-trained model to a target scenario.Source: §3.2 · p. 3
  • Scenario-specific alignment jointly optimizes value-aware next-token prediction and multi-objective ranking, predicting click, add-to-cart, and purchase labels from semantic IDs and generative hidden states.The task-specific probabilities are conditioned on user features, interaction history, and an item’s semantic ID.Source: §3.2 · p. 3
  • Inference uses beam search to decode candidates, reuses semantic IDs and hidden states for multi-objective scores, and returns re-ranked Top-K recommendations without a separate ranking model.The serving process uses the aligned model’s generated candidates.Source: §3.2 · p. 3

3.3 Tokenizer

The tokenizer builds multimodal collaborative item embeddings from text, visual features, and behavioral interaction pairs, then quantizes them into hierarchical semantic IDs.

3.3 Tokenizer

  • Qwen3-VL is finetuned with behavioral interaction pairs to derive multimodal collaborative item embeddings from textual metadata and visual features.Interacted items are positives, exposed-but-unclicked items are hard negatives, and in-batch items are easy negatives in the InfoNCE objective.Source: §3.3 · p. 3
  • RQ-VAE with Sinkhorn-Knopp balanced assignment produces a three-layer semantic hierarchy with codebook size K=8192.Source: §3.3 · p. 3

3.4 UniSGR Framework

UniSGR uses a lightweight feature encoder and a sparse MoE decoder to generate hierarchical semantic IDs conditioned on user history and context.

3.4 UniSGR Framework

  • MemoryNet maps user profiles through an MLP and prepends them as prefix tokens to the behavior sequence, producing static memory with linear complexity O(L).Historical items include semantic ID, behavior, and position information; the design avoids quadratic self-attention over long histories.Source: §3.4 · p. 3
  • The decoder autoregressively generates semantic ID tokens from a learnable BOS token, conditioning on encoder memory through cross-attention.Token Type Embeddings distinguish semantic-ID levels, from coarse clusters to finer item discrimination and uniqueness.Source: §3.4 · p. 3
  • Grouped Query Attention reduces KV-cache cost, while shared SwiGLU-MoE layers route representations to experts specializing in semantic subspaces and user-interest modes.The shared expert captures common recommendation patterns.Source: §3.4 · p. 3
  • The framework also uses RMSNorm and QK-Norm for stable training.Source: §3.4 · p. 3

3.5 Two-Stage Training Paradigm

UniSGR first pre-trains on mixed business-scenario data, then aligns generation and multi-objective ranking for a target scenario. Its training components use parallel behavior-specific targets, shared representations, task tokens, joint losses, and funnel-aware contrastive supervision.

3.5 Two-Stage Training Paradigm

  • The two-stage paradigm combines mixed-scenario pre-training with scenario-specific alignment to target business goals.Alignment jointly uses VA-PMTP and a unified multi-objective ranking module.Source: §3.5 · p. 3

3.5.1 Multi-Scenario Pre-Training Stage.

  • Multi-scenario pre-training applies next-token prediction to mixed business-scenario data, and its resulting backbone provides a foundation for target-scenario alignment.The broad cross-scenario interests are described as particularly beneficial for sparse target scenarios that otherwise suffer poor coverage and overfitting.Source: §3.5.1 · p. 3, §3.5 · p. 3

3.5.2 Value-Aware Parallel Multi-Token Prediction.

  • VA-PMTP uses parallel semantic-ID targets for multiple items in a session and weights behavior targets by business value, producing candidates more useful for downstream ranking than standard NTP.Its mask applies causal visibility within an item, mutual invisibility across items, and a shared BOS token.Source: §3.5.2 · pp. 3–4

3.5.3 Unified Multi-Objective Ranking Module.

  • Scenario-specific alignment attaches a semantic-ID-based multi-objective ranking module to the generative decoder, reusing semantic-ID representations and decoder states rather than adding an independent item-ID ranker.Target Attention and PLE use user, semantic-ID, attention, and decoder representations for ranking.Source: §3.5.3 · p. 4

3.5.4 Task-Aware Tokens for Generation-Ranking Alignment.

  • Task-Aware Tokens prepend objective-specific signals so subsequent semantic-ID representations can condition on click, add-to-cart, and purchase preferences.The tokens follow the click-to-add-to-cart-to-purchase funnel, and their fixed prefix positions add no autoregressive inference steps.Source: §3.5.4 · pp. 4–5

3.5.5 Joint Training of Generation and Ranking.

  • Generation and ranking losses jointly drive end-to-end optimization, with ranking gradients propagating through shared decoder parameters.Generation uses VA-PMTP at sequence-token positions; ranking predicts click, add-to-cart, and purchase from decoder outputs.Source: §3.5.5 · p. 5

3.5.6 Funnel-Aware Contrastive Learning for Task Token Guidance.

  • Funnel-Aware Contrastive Learning supplies task-token outputs with auxiliary supervision against item ID embeddings, using positives and progressively harder negatives along the conversion funnel.The method is introduced because task tokens can be susceptible to weak supervision and semantic drift; FACL helps prevent semantic drift.Source: §3.5.6 · p. 5

3.6 STARK: Semantic Tree Attention with Reorganized KV Cache

STARK targets beam-search inefficiencies in semantic ID decoding by reorganizing attention and KV-cache handling around a candidate tree. It preserves standard beam-search results while improving efficiency, with a reported 200% throughput improvement in industrial-scale scenarios.

3.6 STARK: Semantic Tree Attention with Reorganized KV Cache

  • Conventional beam search duplicates KV caches and repeats attention over shared prefixes, while short semantic IDs underutilize long-sequence kernels through padding.These costs compound the efficiency bottleneck in semantic ID decoding.Source: §3.6 · p. 5
  • STARK replaces batch-dimension expansion with sequence-dimension expansion and a tree mask, preserving standard beam-search results while improving efficiency.Each candidate token attends only to its ancestor nodes and itself, keeping branches causally isolated.Source: §3.6 · pp. 5–6
  • A precomputed sequence-dimension tree attention mask eliminates redundant prefix computations and data copying.The figure caption describes the inference mechanism; the accompanying text says mask and KV-cache remapping can be prepared as lightweight index operations when depth and beam width are fixed at serving time.Source: Figure 2 · p. 6, §3.6 · p. 6
  • 200% throughput improvement in industrial-scale scenarios is reported for STARK, with Table 1 comparing end-to-end latency and throughput.The supplied caption identifies the table’s scope but does not provide its cell values.Source: Table 1 · p. 6, §3.6 · p. 6
  • STARK stores shared-prefix keys and values once and maps them to descendant nodes, so candidate expansion appends new tokens instead of copying each prefix cache.This cache organization is especially beneficial when semantic IDs are short and beam width is large.Source: §3.6 · p. 6

4 Experiments

UniSGR is evaluated on Lazada’s “Guess You Like” scenario, where it outperforms semantic-ID retrieval baselines and shows gains in online business metrics. Ablations examine its training paradigm, model components, codebook size, and scaling behavior.

4.1 Experimental setup

  • The evaluation uses mixed-scenario behavior data for pre-training and target-scenario logs for alignment; it compares semantic-ID baselines and reports HR@K, AUC, and GAUC under shared embeddings and hardware.User, item, and exact traffic-scale statistics are omitted for confidentiality; decoding uses beam widths of (512, 512, 1024).Source: §4.1.1 · p. 6, §4.1.2 · p. 6, §4.1.3 · p. 7

4.2 Offline Performance

  • UniSGR-M consistently surpasses all semantic-ID baselines across evaluated offline retrieval metrics.The comparison is under identical configurations.Source: §4.2 · p. 7, Table 2 · p. 7

4.3.1 Impact of Codebook Size.

  • Increasing codebook size from 2048 to 8192 raises Clk-HR@100 from 0.2917 to 0.3266 as collision rate falls from 45.00% to 24.03%; increasing it to 10240 yields diminishing returns.The authors select the 3-layer 8192 configuration as the balance between representation capacity and retrieval accuracy.Source: §4.3.1 · p. 7, Table 4 · p. 7

4.3.2 Model Variants Ablation.

  • Removing MoE drops HR@100 from 0.2195 to 0.1725, while replacing SwiGLU with a standard feedforward network declines across all metrics.The authors attribute the MoE result to its role in expanding model capacity and capturing diverse user interests without prohibitive computational overhead.Source: §4.3.2 · p. 7, Table 5 · p. 7

4.3.3 Scaling.

  • As model size increases from 0.2B to 0.8B, UniSGR-M improves HR@100 from 0.1911 to 0.2195 (+14.86%) and HR@500 from 0.3489 to 0.3913 (+12.15%); marginal gains diminish at larger sizes.Further accuracy gains are reported at 1.2B, 1.6B, and 2.0B.Source: §4.3.3 · pp. 7–8, Table 6 · p. 8, Figure 3 · p. 8

4.3.4 Two-stage training.

  • The full two-stage training pipeline outperforms multi-scenario pre-training alone and scenario-specific alignment alone across Clk-HR, Atc-HR, and Pay-HR.The comparison is reported for the Lazada homepage “Guess You Like” scenario.Source: Table 3 · p. 7, §4.3.4 · p. 8
  • VA-PMTP brings larger gains on add-to-cart and purchase than click; adding ranking and TAT further improves retrieval or ranking outcomes across behavior objectives.The ranking module improves retrieval hit rate and ranking metrics; TAT leads to the best GAUC and AUC results across click, add-to-cart, and purchase.Source: §4.3.4 · p. 8, Table 7 · p. 8, Table 8 · p. 8

4.4 Online A/B Test

  • In online A/B testing, UniSGR improved Item Page View (IPV) by 3.36%, Transaction Count by 2.17%, and Gross Merchandise Volume (GMV) by 5.68% compared with the baseline.Source: §4.4 · p. 8, Table 9 · p. 8

5 Conclusion

UniSGR integrates semantic ID generation with multi-objective ranking in a unified framework. It combines two-stage training and ranking-aware generation with STARK inference, and the authors report evaluations validating its effectiveness and industrial scalability.

5 Conclusion

  • UniSGR integrates semantic ID generation and multi-objective ranking in one framework.The framework uses multi-scenario pre-training followed by scenario-specific alignment, with Value-Aware Parallel Multi-Token Prediction and Task-Aware Tokens guiding candidate generation toward high-value objectives.Source: §5 · p. 8
  • STARK accelerates decoding with tree attention by eliminating redundant prefix computations.Source: §5 · p. 8
  • Evaluations on a large-scale e-commerce platform validate UniSGR’s effectiveness and industrial scalability.Source: §5 · p. 8
Loading 2607.04068v1…