Source-linked AI summary
OneRec Technical Report
Guorui Zhou, Jiaxin Deng, Jinghao Zhang, Kuo Cai, Lejian Ren, Qiang Luo, Qianqian Wang, Qigen Hu, Rui Huang, Shiyao Wang, Weifeng Ding, Wuchao Li, Xinchen Luo, Xingmei Wang, Zexuan Cheng, Zixing Zhang, Bin Zhang, Boxuan Wang, Chaoyi Ma, Chengru Song, Chenhui Wang, Di Wang, Dongxue Meng, Fan Yang, Fangyu Zhang, Feng Jiang, Fuxing Zhang, Gang Wang, Guowang Zhang, Han Li, Hengrui Hu, Hezheng Lin, Hongtao Cheng, Hongyang Cao, Huanjie Wang, Jiaming Huang, Jiapeng Chen, Jiaqiang Liu, Jinghui Jia, Kun Gai, Lantao Hu, Liang Zeng, Liao Yu, Qiang Wang, Qidong Zhou, Shengzhe Wang, Shihui He, Shuang Yang, Shujie Yang, Sui Huang, Tao Wu, Tiantian He, Tingting Gao, Wei Yuan, Xiao Liang, Xiaoxiao Xu, Xugang Liu, Yan Wang, Yi Wang, Yiwu Liu, Yue Song, Yufei Zhang, Yunfan Wu, Yunfeng Zhao, Zhanyu Liu
TL;DR
Traditional recommendation systems rely on cascaded architectures, with fragmented computation and optimization inconsistencies that hinder the use of AI advances. OneRec replaces that pipeline with an end-to-end generative recommendation framework. The authors report improved GPU utilization and lower operating expense, alongside production deployment gains.
Problem
Traditional recommendation systems still rely on multi-stage cascaded architectures rather than end-to-end approaches, limiting effective application of AI advances.
Source: §1 · p. 3Method
OneRec uses an end-to-end encoder-decoder generative architecture, compresses users’ lifelong behavior, scales its decoder with Mixture-of-Experts, and refines outputs with reinforcement learning.
Source: §1 · p. 3, §5 · p. 24Results
OneRec achieved 23.7% training MFU and 28.8% inference MFU on flagship GPUs, with OPEX at 10.6% of traditional recommendation pipelines.
Source: §1 · p. 4Takeaways & Limitations
Deployed in Kuaishou and Kuaishou Lite, OneRec handles approximately 25% of total QPS and improved App Stay Time by 0.54% and 1.24%, respectively.
Source: §1 · p. 4Inference-stage scaling is not yet apparent, and the authors say OneRec currently lacks strong reasoning capabilities.
Source: §5 · p. 25
Abstract
from arXiv · showhide
Recommender systems have been widely used in various large-scale user-oriented platforms for many years. However, compared to the rapid developments in the AI community, recommendation systems have not achieved a breakthrough in recent years. For instance, they still rely on a multi-stage cascaded architecture rather than an end-to-end approach, leading to computational fragmentation and optimization inconsistencies, and hindering the effective application of key breakthrough technologies from the AI community in recommendation scenarios. To address these issues, we propose OneRec, which reshapes the recommendation system through an end-to-end generative approach and achieves promising results. Firstly, we have enhanced the computational FLOPs of the current recommendation model by 10 $\times$ and have identified the scaling laws for recommendations within certain boundaries. Secondly, reinforcement learning techniques, previously difficult to apply for optimizing recommendations, show significant potential in this framework. Lastly, through infrastructure optimizations, we have achieved 23.7% and 28.8% Model FLOPs Utilization (MFU) on flagship GPUs during training and inference, respectively, aligning closely with the LLM community. This architecture significantly reduces communication and storage overhead, resulting in operating expense that is only 10.6% of traditional recommendation pipelines. Deployed in Kuaishou/Kuaishou Lite APP, it handles 25% of total queries per second, enhancing overall App Stay Time by 0.54% and 1.24%, respectively. Additionally, we have observed significant increases in metrics such as 7-day Lifetime, which is a crucial indicator of recommendation experience. We also provide practical lessons and insights derived from developing, optimizing, and maintaining a production-scale recommendation system with significant real-world impact.
1. Introduction
OneRec replaces cascaded recommendation stages with an end-to-end generative framework, targeting fragmented computation, conflicting objectives, and architectural barriers to adopting advances in AI. The authors report improved utilization and production outcomes, and identify scaling laws and potential for reinforcement learning within the framework.
1. Introduction
- In the Kuaishou case study, over 50% of serving resources go to communication and storage, while ranking-model MFU is 4.6% in training and 11.2% in inference.High QPS requirements (greater than 400k) and latency demands (less than 500ms) constrain model scale and computational intensity.Source: §1 · p. 3
- Hundreds of competing goals and conflicts across stages can undermine consistency and efficiency, motivating a unified optimization goal and model structure.Retrieval effectiveness can be constrained by ranking-model limitations, while ranking can be affected by suboptimal upstream results.Source: §1 · p. 3
- Cascaded recommendation architectures present barriers to adopting scaling laws and reinforcement learning advances from LLM and VLM research.The authors describe this architectural misalignment as limiting potential performance gains from state-of-the-art approaches.Source: §1 · p. 3
- OneRec integrates retrieval and ranking in a single-stage encoder-decoder generative framework, designed for end-to-end optimization of the final objective.Figure 2 contrasts this approach with cascaded retrieval, pre-ranking, and ranking stages.Source: §1 · pp. 3–4, Figure 2 · p. 4
- 23.7% training MFU and 28.8% inference MFU were achieved on flagship GPUs, improving 5.2× and 2.6× over the original ranking model, respectively.The deployed system handles approximately 25% of total QPS and improved App Stay Time by 0.54% and 1.24% in Kuaishou and Kuaishou Lite, respectively; OPEX is 10.6% of traditional pipelines.Source: §1 · p. 4
- OneRec increases recommendation-model FLOPs by 10×, identifies recommendation scaling laws, and shows substantial potential for reinforcement learning in its framework.The authors report offline and online comparisons and application practices for industrial iteration.Source: §1 · pp. 4–5
2. Architecture
OneRec represents recommendation as generation of semantic item IDs, using an encoder-decoder trained with next-token prediction and reinforcement-learning alignment. Its architecture combines collaboratively informed item tokenization with multi-scale user-history representations.
2. Architecture
- OneRec tokenizes videos into semantic-ID prediction targets, trains an encoder-decoder to predict target items with reinforcement-learning alignment, and generates video recommendations at inference.Inference can optionally apply reward-based selection to refine recommendations.Source: §2 · p. 5
2.1. Tokenizer
- The billion-scale, growing item space motivates coarse-to-fine semantic IDs in a reduced fixed vocabulary, while the tokenizer combines collaborative signals with multimodal features.The IDs support knowledge transfer among similar items and generalization to new items.Source: §2.1 · p. 5
2.1.1. Aligned Collaborative-Aware Multimodal Representation
- OneRec aligns multimodal representations of collaboratively similar item pairs, using contrastive pair alignment and caption prediction to capture behavioral patterns while preserving content understanding.Video inputs include captions, tags, ASR, OCR, cover images, and sampled frames; QFormer compresses their representations.Source: §2.1.1 · pp. 5–6
2.1.2. Tokenization
- RQ-Kmeans applies residual quantization across three layers to produce coarse-to-fine semantic IDs, with reported gains over RQ-VAE in reconstruction quality, codebook utilization, and balance.The resulting IDs serve as OneRec outputs, enabling progressive item generation.Source: §2.1.2 · p. 7
2.2.1. Multi-Scale Feature Engineering
- The multi-scale feature engineering pathways represent static user traits, recent interactions, high-engagement interactions, and lifelong histories; the lifelong pathway compresses histories of up to 100,000 videos hierarchically.Cluster representatives retain representative-video features for sparse attributes and average values for continuous attributes.Source: §2.2.1 · pp. 8–9
2.2.2. Encoder Architecture
- The encoder concatenates outputs from the four behavior pathways and processes them with transformer layers to form a holistic multi-scale user representation for recommendation generation.The layers use fully visible self-attention followed by feed-forward networks with RMS normalization.Source: §2.2.2 · p. 9
2.3. Decoder
OneRec decodes target videos from semantic IDs and aligns generated recommendations with preference, format, and industrial rewards. Its post-training addresses preference optimization, legal output generation, and industrial objectives within a unified framework.
2.3. Decoder
- The point-wise decoder concatenates a beginning-of-sequence token with video semantic IDs, processes them through MoE transformer layers, and trains next-token prediction with cross-entropy.The MoE uses top-k expert routing and loss-free load balancing.Source: §2.3 · pp. 9–10
2.4. Reward System
- The reward system assigns generated videos preference, format, and industrial rewards, with on-policy reinforcement learning optimizing in the generated item space.The authors describe preference alignment, legal-format generation, and scenario-specific industrial objectives as distinct reward components.Source: §2.4 · p. 10, Figure 5 · p. 11
2.4.1. User Preference Alignment
- P-Score learns personalized objective fusion from tower, user, and item representations; adjusting objective weights improves AUC across objectives without compromising other users’ experience.The model uses objective-specific towers and a final MLP to produce the preference score.Source: §2.4.1 · pp. 10–11
- ECPO uses P-Score rewards for generated items and early-clips large policy ratios for negative advantages to limit gradient explosion; OneRec sets δ to 0.1.The authors omit KL loss because RL and supervised fine-tuning are trained together, with the SFT loss maintaining stability.Source: §2.4.1 · pp. 11–12, Figure 6 · p. 12
2.4.2. Generation Format Regularization
- Format reward counters RL-induced illegal outputs by assigning advantage 1 to legal samples and discarding illegal ones, avoiding negative-advantage squeezing.A legal sequence maps to an actual video ID; larger semantic-ID vocabularies can cover items but may also yield unmapped sequences at inference.Source: §2.4.2 · pp. 12–13
2.4.3. Industrial Scenario Alignment
- Industrial objectives, including community ecosystem, commercialization, and cold-start or long-tail delivery, can be incorporated into rewards for targeted end-to-end optimization.The authors contrast this with stage-specific strategies that can produce recurring issues and patching across pipeline stages.Source: §2.4.3 · p. 13
3. Training Framework
OneRec’s training framework combines optimized GPU infrastructure, large-scale next-token pre-training, and online post-training with RSFT and reinforcement learning. It separates RL sample generation from model training through an external inference service.
3.1. Training Infrastructure
- 23.7% training MFU was achieved on flagship GPUs; GPU embedding acceleration, data parallelism with ZERO1, gradient accumulation, and BFloat16 MLP computation are among the optimizations.The infrastructure uses SKAI GPU parameter servers, caching, and prefetching to manage embedding workloads.Source: §3.1 · p. 14
3.2. Pre-training
- OneRec processes about 18 billion samples daily (54 billion tokens); the 0.935B model converges after about 100 billion samples, or 300 billion pre-training tokens.The four-model series includes dense and MoE variants, with SwiGLU experts in designated MoE blocks.Source: §3.2 · p. 14
3.3. Post-training
- Online post-training combines RSFT on the top half of exposure sessions by play duration with RL samples from 1% of users, generated by an external inference service.The training task sends updated parameters to that service through a message queue every 1000 steps.Source: §3.3 · p. 15
4. Evaluation
OneRec’s evaluation spans model and input scaling, reinforcement-learning alignment, tokenization, and online deployment. Results include improved recommendation metrics and substantial deployment, alongside trade-offs in reward design and inference cost.
4.1. Evaluation Metric
- Evaluation used next-token prediction loss, P-Score, and engagement indicators derived from a deployed ranking model; streaming-data comparisons were averaged over long observation windows within the same periods.Absolute P-Score and engagement-metric values can vary across periods because the evaluation uses streaming data.Source: §4.1 · pp. 15–16
4.2.1. Training Scaling
- Larger OneRec models achieved lower training loss, and performance continued improving beyond 100 billion samples, though more slowly than during the first approximately 10 billion.Additional features lowered training loss and improved recommendation quality; increasing Pass@K from 8 to 512 improved evaluated metrics consistently, with only marginal gains from 512 to 1,024.Source: §4.2.1 · pp. 16–17, Figure 9 · p. 16, Figure 10 · p. 17
4.2.2. Semantic Identifier Input Representation
- At 2.6B parameters, semantic-identifier input performed comparably to or better than sparse embeddings, while sharing input and output embeddings reduces parameter and communication overhead.The approach also supports allocating compute to longer interaction sequences.Source: §4.2.2 · pp. 18–19, Figure 11 · p. 18
4.3.1. User Preference Alignment
- P-Score reward improved App Stay Time, Watch Time, and Video View in both scenarios; reinforcement learning’s largest sampling-efficiency gap occurred at pass@32.Beam search outperformed top-k and top-p sampling; the current-policy reference model improved offline reward but had little online improvement, which the authors attribute to reward hacking.Source: §4.3.1 · pp. 19–21, Table 10 · p. 21, Table 9 · p. 21
4.3.2. Generation Format Regularization
- Random sample selection with format reward reached 95% legality, while top-k selection reached 100% legality only among selected samples; format reward also raised APP Stay Time by +0.13% and Watch Time by +0.30%.Without format rewards, baseline legality remained below 50%.Source: §4.3.2 · pp. 21–22, Figure 12 · p. 22
4.3.3. Industrial Scenario Alignment
- Specific Industrial Reward reduced viral-content exposure by 9.59% while maintaining stable Watch Time and APP Stay Time.The method down-weights viral-content P-Score rewards when their proportion exceeds a specified threshold.Source: §4.3.3 · p. 22
4.4. Tokenizer
- RQ-Kmeans reduced reconstruction loss by 25.18% versus RQ-VAE and achieved codebook utilization of 1.0000 in all three layers, with higher entropy in each layer.Entropy improvements were 6.31%, 3.50%, and 1.44% in layers 1, 2, and 3, respectively.Source: §4.4 · p. 23, Table 11 · p. 23
4.5. Online A/B Test
- OneRec matched the complex recommendation system; reward-model selection raised APP Stay Time by +0.54% and +1.24%, and LT7 by +0.05% and +0.08%, across Kuaishou and Kuaishou Lite.Deployment expanded to about 25% of total QPS; in Local Life, GMV grew 21.01%, order volume 17.89%, buyer numbers 18.58%, and new buyer acquisition 23.02%, with OneRec taking over 100% of that scenario’s QPS.Source: §4.5 · pp. 23–24, Table 12 · p. 24
5. Conclusion, Limitations, and Future Directions
OneRec is an end-to-end generative encoder-decoder recommender with customized reinforcement-learning post-training. The report describes strong efficiency and cost results, while identifying inference scaling, multimodal integration, and reward design as areas for further work.
Conclusion
- OneRec’s encoder-decoder architecture compresses lifelong user behavior into interests and uses a Mixture-of-Experts decoder for short-video recommendation.A customized reinforcement-learning framework aligns model outputs with a reward function during post-training.Source: §5 · p. 24
- Training and inference MFU reached 23.7% and 28.6%, respectively, while operating expense was 10.6% of conventional recommender systems.The authors report that comprehensive evaluations show OneRec surpassing existing recommendation systems in effectiveness and efficiency.Source: §5 · p. 25
Limitations and Future Directions
- Inference-stage scaling is not yet apparent, OneRec is not integrated with LLMs or VLMs, and the authors characterize its reward-system design as rudimentary.The report also notes that OneRec has not yet been deployed across all Kuaishou traffic scenarios.Source: §5 · p. 25
B. Implementation Details of Online A/B Test
The online experiment applied OneRec to cached, or degraded, traffic, where recommendations are served from a candidate pool during high-QPS loads. The authors report gains against both the existing system and a caching-disabled comparison.
B. Implementation Details of Online A/B Test
- The online experiment targeted degraded traffic, upgrading the cached portion of recommendations rather than all real-time requests.For each request, the system returns k recommendations and caches unexposed items for later display under high QPS.Source: B. Implementation Details of Online… · p. 30
- OneRec’s efficiency was presented as a way to reduce the operating expense of disabling caching, which otherwise would require substantial resources.The authors also frame the initial traffic portion as a starting point for exploring the new architecture and team collaboration mechanisms.Source: B. Implementation Details of Online… · p. 30
- On limited degraded traffic, OneRec improved App Stay Time by 0.54% and 1.24% across two scenarios and outperformed the caching-disabled comparison.The experiment used a 5% group, applying OneRec to 25% of that group’s degraded traffic; a separate 1% group disabled caching for comparison.Source: B. Implementation Details of Online… · p. 30, Table 13 · p. 31
- OneRec replaced the original caching mechanism and served 25% of traffic in Kuaishou’s main scenarios.The report describes this deployment as following rigorous online A/B testing.Source: B. Implementation Details of Online… · p. 31
C.1. Representation Cases
The representation examples compare retrieved videos for query videos across collaborative, multimodal, and combined representations. The authors report that the combined representation retrieves videos with both semantic and behavioral relevance.
C.1. Representation Cases
- Combined multimodal and collaborative representations retrieved videos with multifaceted relevance, whereas collaborative-only results could be categorically misaligned and pure multimodal results could share surface features but differ categorically.The examples include painting content retrieved for a floral-art query and shared fruit or wine imagery despite categorical discrepancies.Source: §C.1 · pp. 31, 35, Figure 14 · p. 32, Figure 15 · p. 33
C.2. Tokenization Cases
This section presents discrete item semantic identifiers generated by RQ-Kmeans. The identifiers encode item categories from coarse to finer levels.
C.2. Tokenization Cases
- RQ-Kmeans generates discrete item semantic identifiers, with examples shown in Figures 17 and 18.The examples use L_t = 5.Source: §C.2 · p. 35, Figure 17 · p. 36, Figure 18 · p. 37
- The first codeword indicates the coarsest category in the item's semantic identifier.Source: §C.2 · p. 35
- The second and third codeword categories become increasingly finer.Source: §C.2 · p. 35
D. Notations
The paper summarizes its key notations in two tables, presented as parts 1 and 2.
D. Notations
- The paper's key notations are summarized in Tables 14 and 15.Source: D. Notations · p. 37
- Table 14 is labeled as part 1 of the notation and symbol definitions.Source: Table 14 · p. 38
- Table 15 is labeled as part 2 of the notation and symbol definitions.Source: Table 15 · p. 39