NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

LazUnirec: Unifying Retrieval and Ranking in Multi-scenario Industrial Recommendation

Xiaodong Li, Junfeng Zhang, Shichao Nie, Ziyue Guo, Yiming Liu, Xinxin Xu, Xurong Li, Jinyuan Dang, Zhanming Ou, Jianan Yan, Tao Luo, Xiaoyi ZengarXiv 2026

TL;DR

Industrial recommendation engines usually split the job of suggesting items into two separate, resource-redundant steps: fishing out broad candidates (retrieval) and scoring the best ones (ranking). Combining them into a single Transformer saves massive compute, but their conflicting mathematical goals normally cause a destructive "tug-of-war" during training. LazUnirec solves this conflict using specialized shared-and-private parameter paths and a "reliability compass" for gradient updates, boosting live e-commerce revenue by over 4% while slashing redundant computation.

What Problem Does This Paper Address?

Every time you open an e-commerce app, a two-stage relay race happens in milliseconds. First, retrieval sifts through millions of products to grab a few hundred candidates. Second, ranking carefully scores those candidates to predict exact probabilities—like whether you will click (CTR) or buy (CVR).

Historically, these stages have been completely separate models, even though both read the exact same user history. That means encoding long user sequences twice, wasting compute, and optimizing for disconnected goals.

Recently, engineers started merging both tasks into a single Transformer backbone. The catch? Gradient conflict. Retrieval uses a broad contrastive objective (sampled softmax), while ranking uses precise binary classification (log-likelihood). Because their mathematical goals differ, they frequently push the shared Transformer weights in opposite directions.

Figure 1: Statistics on the percentage distribution of gradient conflicts for retrieval and ranking within Transformer back- bone, including Attention and FFN components.

As the authors show above, retrieval and ranking gradients clash (cosine similarity < 0) nearly 46% to 48% of the time across both Attention and Feed-Forward Network (FFN) layers. Furthermore, when a clash happens across diverse app scenarios (like a homepage feed vs. a "related items" carousel), the model has no way of knowing which task's gradient is actually trustworthy enough to follow.

Methods

LazUnirec unifies multi-scenario retrieval and ranking into one Transformer while giving the two tasks enough breathing room—and smart refereeing—to cooperate.

Figure 2: The overall framework of LazUnirec.

Here is how the architecture works:

  • Unified Sequence Tokenization & Masking: A user's history, a scenario "trigger" token (indicating whether the user clicked an item to get here or is browsing a general feed), learnable retrieval queries, and candidate ranking items are packed into a single sequence. A custom attention mask ensures user history flows forward to the tasks, while keeping individual retrieval queries and ranking candidates strictly isolated from peeking at one another.
  • LoRA-Modulated Attention: Instead of forcing retrieval and ranking to fight over the exact same Query, Key, and Value matrices, LazUnirec keeps the base attention weights shared (used by user history) and attaches lightweight, task-private LoRA (Low-Rank Adaptation) adapters specifically for retrieval and ranking tokens.
  • Task-Adaptive Sparse MoE: In the FFN layers, the authors replace standard dense networks with a Mixture-of-Experts (MoE). Each task gets one dedicated "private" expert that is always active, plus access to top-$k$ "shared" experts chosen dynamically by a router conditioned on user profile, scenario, and task.
  • Uncertainty Estimation (The Novel Referee): To decide which way to step when gradients clash, the model periodically probes a subset of shared weights and tracks the historical directional variance of each task's gradients using Exponential Moving Averages (EMA). Wildly fluctuating gradients are flagged as "uncertain" and down-weighted; historically steady gradients are rewarded with higher loss multipliers.
  • List-wise Knowledge Distillation: Because the ranking head sees fine-grained item features, its predictions act as a "teacher" to softly guide the "student" retrieval representations via KL-divergence, creating a one-way street for knowledge transfer.
  • Serving Optimizations: In production, LazUnirec reuses user history KV caches across stages and requests, fuses GPU kernels (Grouped GEMM), applies selective FP8 quantization, and batches requests across different app scenarios simultaneously.

Datasets

The authors evaluate LazUnirec on large-scale proprietary industrial logs from Alibaba International Digital Commerce Group (25 consecutive days for training, 1 day for testing). The dataset spans over a dozen real-world e-commerce scenarios, divided into trigger-free (e.g., main homepage) and trigger-based (e.g., item detail page recommendations). No new public benchmarks are introduced.

Key Insights and Ideas

  • Blocking gradients hurts more than helping them cooperate: A recent baseline ($\text{UniR}^2$) tried solving gradient conflict by simply blocking ranking gradients from updating the shared Transformer. It ended up performing worse on ranking than a vanilla Transformer. LazUnirec proves that letting both tasks update the core—buffered by private LoRA/MoE capacity—is vastly superior.
  • Stability is a proxy for reliability: By measuring variance in normalized gradient directions (ignoring magnitude), LazUnirec dynamically dampens noisy updates during training without needing expensive second-order optimization math.
  • Multi-scenario training rescues the "long tail": Training one unified model across a dozen app scenarios acts as massive data augmentation. Smaller, data-sparse scenarios piggyback on the rich user representations learned from high-traffic feeds.

Key Results

  • Crushing Gradient Conflict: Compared to a vanilla shared Transformer, LazUnirec reduces severe ("robust") gradient conflicts relatively by 13.23% in Attention and a massive 37.76% in FFN layers.
  • Offline Gains: Across three major scenarios, LazUnirec beats all unified baselines (including OneTrans-V2 and UniPinRec), improving retrieval Hit Rate (HR@100) by +2.47% to +8.19% and ranking GAUC by up to +0.69% (in industrial ranking, even a 0.1%–0.2% lift is considered significant). Long-tail scenario retrieval jumped from 0.3086 to 0.3686 (HR@100) thanks to multi-scenario sharing.
  • System Speedups: Online Queries Per Second (QPS) jumped via KV caching (+20%), kernel fusion (+44%), FP8 SwiGLU (+5%), and cross-scenario batching (+59%).
  • Live Business Impact: In a week-long online A/B test serving 10% of live platform traffic, LazUnirec drove +5.75% more orders and +4.01% Gross Merchandise Volume (GMV) in trigger-free scenarios, and +4.64% orders / +3.06% GMV in trigger-based scenarios.

Limitations and Future Work

Not explicitly discussed in a dedicated section by the authors. However, an apparent architectural detail in Section 3.5 notes that despite unified training and shared KV caches, online inference still deploys two separate model instances to serve retrieval and ranking independently (likely due to distinct latency SLAs and candidate pool sizes in live traffic). Exploring end-to-end single-instance serving or public benchmark reproducibility remains open.

Summary updated

BibTeX
@misc{li2026lazunirec,
  author = {Xiaodong Li and Junfeng Zhang and Shichao Nie and Ziyue Guo and Yiming Liu and Xinxin Xu and Xurong Li and Jinyuan Dang and Zhanming Ou and Jianan Yan and Tao Luo and Xiaoyi Zeng},
  title = {{LazUnirec: Unifying Retrieval and Ranking in Multi-scenario Industrial Recommendation}},
  year = {2026},
  eprint = {2611.32590},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.32590},
}
Figure