TransRetrieval: Scaling Transformer-Based Retrieval for Industrial Recommendation (CIKM 2026 Oral)
Alibaba Mama and Renmin University propose TransRetrieval, a scalable Transformer-based retrieval model for industrial recommendation that addresses heterogeneous feature aggregation, compute budget constraints, and multi-scenario modeling via Weighted Mean aggregation, Target Token Compression, and Domain Embedding, achieving 65.7% Recall@2000 on a 40B-interaction dataset and a 2.53% revenue lift in a month-long A/B test.
Reading font
Problem Background: Why Scaling Retrieval Models Is Hard
Retrieval must select candidates from tens of millions of ads within tens of milliseconds. Traditional two-tower models encode user and ad separately and use dot-product for efficient retrieval, but richer feature interactions improve matching at the cost of compute. The prior NANN work used a model-driven HNSW search where a neural scorer guides graph traversal. TransRetrieval extends this paradigm by scaling the scoring network, tackling three challenges:
Scalable architecture for heterogeneous features : User attributes, behavior sequences, and ad attributes differ in cardinality, weight, and distribution. After embedding, token norms can vary up to 10×, causing attention to focus on high-norm tokens and making deeper/wider Transformers degrade online metrics.
Compute budget under massive candidates : Even after HNSW reduces scoring candidates to ~40k, per-candidate cost repeats per request. The per-candidate FLOPs formula is 2 * D^2 * L * (N_user + N_target) * 4 * K (where D=dimension, L=layers, N_user/target=token counts, K=candidates). Scaling D and L increases capacity, but N_target offers direct compression leverage.
Multi-scenario data reuse : Industrial systems serve multiple scenarios with different distributions and data volumes. Joint training must share parameters while preserving per-scenario distinctions.
TransRetrieval Model Design
The model follows a standard Pre-LN Transformer with ReLU FFN. User and target tokens feed into a multi-layer Transformer; the target token attends to user context across layers, and an MLP head outputs the retrieval score. Three core innovations:
2.1 Weighted Mean Aggregation: Fixing Scale Imbalance at Input
ID features are represented as (id, weight) pairs. The common Weighted Sum aggregation accumulates norm with total weight. TransRetrieval uses Weighted Mean: divide the weighted sum by total weight, preserving relative weights while suppressing norm growth. On the industrial dataset (64D-5L), Weighted Mean achieves 61.8% Overall Recall@2000 vs. 60.8% for Weighted Sum, 59.3% for Weighted Sum+LayerNorm, and 57.1% for Max Pooling — a 1.0pt gain over Weighted Sum across four domains (Table 1).
2.2 Target Token Compression: Freeing Budget for Deeper/Wider Backbones
A Target Compressor fuses concatenated ad fields into a single token via a 3-layer MLP (output dims 8D → 4D → D, with PReLU and LayerNorm). This reduces per-candidate FLOPs linearly in N_target. In a 64D-3L setup, compressing 8 tokens to 1 cuts per-candidate FLOPs from 3.04 to 0.45 MFLOPs (~85% reduction) with a 2.1pt Recall drop (62.4% → 60.3%). Reinvesting the budget into a 128D-5L backbone yields 65.7% Recall at 1.91 MFLOPs — a 3.3pt net gain over the original 8-token 64D-3L config (Table 2). The compressed token also serves as the HNSW index vector.
2.3 Position-style Domain Embedding: Efficient Multi-scenario Modeling
Directly mixing four domains' data drops Overall Recall from 57.9% (independent training) to 26.5%. Adding a learnable Domain Token (1 or 20 repeats) only recovers to 33.7% and 45.2% while increasing user-side FLOPs. TransRetrieval instead adds a per-domain embedding vector element-wise to every input token (like positional embeddings). This adds zero extra tokens and keeps user-side FLOPs at 41.3 MFLOPs. On 64D-3L, the unified model reaches 60.3% Overall Recall (+2.4pt over independent training), with all four domains surpassing their independent baselines (Table 3). This unified foundation enables further scaling.
Experimental Results
3.1 Setup
Industrial dataset: 40B interactions across four domains, time-split train/test.
Public dataset: KuaiRand (~152M interactions, four tabs).
Baselines: Production BAR (bidding-aware retrieval), KuaiFormer, HSTU, RankMixer.
Metric: Recall@2000 (weighted by domain traffic for Overall).
3.2 Recall vs. Compute Budget
On the industrial set, TransRetrieval-64D-3L achieves 60.3% Overall Recall at 0.45 MFLOPs/candidate (35% less compute than Production Baseline's 0.69 MFLOPs at 57.6% Recall). Scaling to 128D-5L reaches 65.7% Recall at 1.91 MFLOPs — an 8.1pt gain over baseline. On KuaiRand, 128D-5L hits 47.3% Recall at 1.81 MFLOPs vs. baseline's 37.8% (+9.5pt). In the 1.7–2.1 MFLOPs range, HSTU-128D-5L and RankMixer-128D-8T score 52.7% and 45.2% respectively, while TransRetrieval-128D-5L leads at 65.7% (Table 4).
3.3 Scaling Trends
Varying D ∈ {32,64,128} and L ∈ {1,3,5} shows a clear log-linear scaling trend. From 32D-1L to 128D-5L, industrial Recall rises from 46.4% to 65.7% (+19.3pt, R²=0.82); KuaiRand from 25.1% to 47.3% (+22.2pt, R²=0.88). At 151 MFLOPs, RankMixer-768D-16T achieves only 53.1% industrial Recall, while TransRetrieval-128D-5L reaches 65.7% at 1.91 MFLOPs — a 12.6pt advantage at 79× lower compute (Figure 2).
Industrial Deployment
4.1 Shared KV-Cache & Candidate Batching
User KV-cache broadcast without copy across candidates.
Single target token per candidate → batch multiple candidates with masking to utilize GPU parallelism.
Operator fusion (LayerNorm, residual, activation) yields ~11× speedup over naive implementation.
4.2 GPU-Resident HNSW Search
Moved neighbor lookup, distance computation, and candidate selection to GPU, eliminating CPU-GPU transfers per search iteration.
Retrieval latency reduced by 89% vs. CPU-based retrieval.
Request-level engine sharing and static index quantization cut GPU memory, boosting concurrency 3×.
4.3 Nearline Index Updates
Target Compressor deployed as a separate subgraph. Full index build computes all ad tokens; event-driven nearline service incrementally recomputes only changed ads and asynchronously updates the online index.
4.4 Online A/B Test
Full launch on Alibaba Mama display ads. Month-long experiment on 5% traffic: platform revenue +2.53%, RPM +1.28% vs. production baseline (Table 5). TransRetrieval-128D-5L increased per-request compute from 27 to 95 GFLOPs; with inference optimizations, single-card peak QPS dropped only 23% (300 → 230) while meeting the 40 ms timeout.
Conclusion
TransRetrieval demonstrates a co-designed algorithm-system path to scale Transformer-based retrieval: Weighted Mean stabilizes input scales, Target Token Compression shifts compute from per-candidate overhead to backbone capacity, and Domain Embedding enables parameter-efficient multi-scenario training. Validated on 40B-interaction industrial data and KuaiRand, the approach shows consistent log-linear scaling and delivers significant online revenue gains, establishing a sustainable foundation for long-term retrieval innovation.
References
[1] Rihan Chen et al. Approximate Nearest Neighbor Search under Neural Similarity Metric for Large-Scale Recommendation. CIKM 2022.
[2] Y. A. Malkov, D. A. Yashunin. Efficient and Robust Approximate Nearest Neighbor Search Using Hierarchical Navigable Small World Graphs. IEEE TPAMI, 2020.
[3] Chongming Gao et al. KuaiRand: An Unbiased Sequential Recommendation Dataset with Randomly Exposed Videos. CIKM 2022.
[4] Bin Liu et al. Bidding-Aware Retrieval for Multi-Stage Consistency in Online Advertising. CIKM 2026; arXiv:2508.05206.
[5] Chi Liu et al. KuaiFormer: Transformer-Based Retrieval at Kuaishou. arXiv:2411.10057, 2024.
[6] Jiaqi Zhai et al. Actions Speak Louder than Words: Trillion-Parameter Sequential Transducers for Generative Recommendations. ICML 2024.
[7] Jie Zhu et al. RankMixer: Scaling Up Ranking Models in Industrial Recommenders. CIKM 2025.
Paper: TransRetrieval: Scaling Up Transformer-Based Retrieval for Industrial Recommendation (CIKM 2026 Oral).
For questions about attribution, corrections or content rights, please contactand we will review it promptly.