Source-linked AI summary
X-Rec Technical Report
Chenglei Shen, Chenzhe Huang, Dong Jiang, Hongjie Gao, Jue Zhang, Kun Xú, Lincan Cai, Nan Zhuang, Pan Zhang, Shi Chen, Shunchi Zhang, Xiaoyu Ye, Yang Jin, Yu Zhang, Zhenwei An, Zhongtao Jiang, Zhiwei Wang, Kun Xǔ
TL;DR
U2I retrieval’s fixed embeddings limit its ability to represent diverse interests, while SID-AR faces quantization and sequential-decoding challenges. X-Rec uses flow matching to generate in continuous item-embedding space, with designs for geometry and efficiency. On a streaming benchmark it outperforms U2I and matches SID-AR retrieval quality with higher throughput, and TikTok launches report engagement gains.
Problem
U2I’s one-or-few deterministic embeddings limit representation of diverse, multi-mode interests, while SID-AR incurs quantization errors and low throughput from sequential decoding.
Source: §1 · p. 3Method
X-Rec uses flow matching to model recommendation distributions directly in continuous item-embedding space, with anchor conditioning, Riemannian flow matching, and late-interaction velocity estimation.
Source: §1 · pp. 3–4Results
3.46× higher inference throughput than SID-AR accompanies comparable recall; X-Rec substantially outperforms U2I, and two TikTok launches report vertical engagement (+4.1484%) and general engagement (+0.0111%) gains.
Source: §1 · p. 4Takeaways & Limitations
The streaming benchmark and TikTok launches indicate continuous generative retrieval’s potential as an expressive, efficient, practical complement to existing industrial retrieval paradigms.
Source: §6 · p. 25The current sampler requires multiple denoising steps, and the scalability of late interaction remains to be fully explored.
Source: §6 · p. 25
Abstract
from arXiv · showhide
Recent advances in generative modeling have reshaped recommender systems by formulating recommendation as a next-item generation problem. Existing retrieval approaches primarily follow two paradigms: user-to-item (U2I) methods represent user context using one or a few deterministic embeddings, which limits the ability to capture diverse and multi-mode interests, while semantic-ID-based autoregressive (SID-AR) methods model more expressive distributions but suffer from quantization errors and the low throughput of sequential decoding. To address these limitations, we propose X-Rec to directly learn the recommendation distribution in the continuous item embedding space through flow matching and generate embedding triggers for approximate nearest neighbor retrieval. X-Rec incorporates three key designs to make this formulation effective and efficient. First, we introduce anchor conditioning to decompose generation into coarse semantic-region selection and fine-grained refinement. Second, we adopt Riemannian flow matching to align generative trajectories with the hyperspherical geometry of item embeddings. Third, we design a late-interaction diffusion Transformer that restricts repeated velocity-field estimation to the final Transformer layer. On a streaming benchmark, X-Rec substantially outperforms U2I baselines, matches the retrieval quality of SID-AR methods, and delivers 3.46x higher inference throughput than SID-AR. X-Rec has also been deployed as a new retrieval source for a specific vertical content on TikTok, where two consecutive launches have yielded significant improvements in both vertical engagement (+4.1484%) and general engagement (+0.0111%).
1. Introduction
The introduction contrasts U2I’s limited interest expressiveness with SID-AR’s quantization and sequential-decoding drawbacks. It presents X-Rec as continuous-embedding generation with anchor conditioning, spherical flow matching, and late interaction aimed at effective and efficient retrieval.
1. Introduction
- U2I’s one-or-few fixed embeddings limit representation of diverse interests, while SID-AR’s discretized codes lose information and sequential decoding limits throughput.SID-AR also faces difficulty preserving a near one-to-one mapping between semantic identifiers and item IDs; appending a non-semantic hash token weakens the code’s semantic structure.Source: §1 · p. 3
- X-Rec models the conditional recommendation distribution directly in continuous item-embedding space using flow-matching diffusion, generating stochastic triggers rather than relying on discrete item codes.This formulation is intended to capture complex, multi-mode interests while avoiding SID quantization and token-by-token decoding.Source: §1 · p. 3
- Anchor conditioning selects the target embedding’s cluster before generation, dividing retrieval into coarse semantic-region selection and fine-grained refinement.Manipulating the anchor distribution can encourage broader coverage; anchor-guided generation improves Recall @20 by 2.05% percentage points.Source: §1 · p. 4
- Riemannian flow matching follows geodesics on the hypersphere, aligning generation with the geometry of item embeddings learned under cosine similarity.Compared with Euclidean rectified flow, it improves Recall @20 by 1.78% in absolute.Source: §1 · p. 4
- Late interaction estimates the velocity field using only the final Transformer layer at each diffusion step instead of repeatedly applying the full Transformer.Against full-layer denoising, the one-layer design reduces Recall @20 by 1.05% percentage points while improving generation throughput by approximately 8.28×.Source: §1 · p. 4
- 3.46× higher inference throughput than SID-AR accompanies comparable recall; X-Rec substantially outperforms U2I, while two TikTok launches improve vertical engagement (+4.1484%) and general engagement (+0.0111%).The online deployment was a new retrieval source for specific vertical content.Source: §1 · p. 4
2. Formulations of Different Paradigms
This section formalizes retrieval paradigms around conditional item distributions and compares their modeling capacity and inference complexity. It frames X-Rec as continuous-space flow generation, contrasting its flexible distribution with U2I’s deterministic triggers and SID-AR’s quantized sequential decoding.
2. Formulations of Different Paradigms
- Table 1 compares each retrieval paradigm’s formalization and computational complexity under a Transformer-backbone analysis.The analysis assumes L layers, hidden dimension d, condition length N, and K generated triggers.Source: Table 1 · p. 5, §2 · p. 5
2.1. U2I
- U2I concentrates probability mass on one retrieval point, limiting its ability to represent diverse, multi-mode interests; multiple deterministic triggers do not model the full conditional distribution.The number of user embeddings must be predefined, limiting adaptation to varying interest complexity.Source: §2.1 · pp. 5–6
2.2. SID-AR
- SID-AR represents items with discrete semantic identifiers and autoregressively generates them, but quantization discards fine-grained information and sequential decoding requires multiple prediction steps and KV-cache maintenance.The code space must also support reliable mapping to valid, distinguishable items at industrial scale.Source: §2.2 · pp. 6–7
2.3. X-Rec
- X-Rec directly models the recommendation distribution over continuous item embeddings with flow matching, learning a velocity field that generates retrieval triggers by denoising noise.At inference, generated triggers retrieve candidate items from the item set.Source: §2 · p. 5, §2.3 · p. 7
- X-Rec can model general continuous distributions, while multiple triggers support richer multi-region candidate spaces than single-vector U2I retrieval.The stated VC dimension of the retrieval class is Θ(dK log K), where increasing trigger count increases representable decision-boundary complexity.Source: §2.3 · p. 7
- X-Rec operates directly on item embeddings, avoiding SID quantization errors and the need for a fragile one-to-one correspondence between SIDs and item IDs.Its reported time complexity lies between U2I and SID-AR, balancing flexible distribution modeling with retrieval efficiency.Source: §2.3 · pp. 7–8
- Using only the final Transformer layer per denoising step (L′ = 1) and setting T = L is reported to provide a favorable quality–efficiency trade-off.With this configuration, X-Rec stores only the final-layer KV cache for condition tokens.Source: §2.3 · p. 8
3. X-Rec Framework
X-Rec models recommendation as conditional generation in continuous item-embedding space, combining anchor-conditioned flow matching with an architecture that reuses encoded history during iterative velocity prediction.
3.1. Preliminary: Flow Matching
- The learned flow transforms noise into samples intended to approximate the conditional recommendation distribution over item embeddings.Flow matching regresses a predicted velocity field toward the conditional velocity field, and inference numerically integrates the learned flow.Source: §3.1 · p. 9
3.2. Algorithm
- X-Rec jointly learns coarse semantic-anchor prediction and anchor-conditioned flow matching on the hypersphere, then predicts an anchor and integrates the learned vector field to produce retrieval triggers.The training objective combines anchor and Riemannian flow-matching losses.Source: §3.2 · p. 10, §3.2.1 · p. 11
3.2.1. Training
- Anchor conditioning first predicts the target embedding’s cluster-center index, then generates the embedding conditioned on that coarse region to make generation more stable and controllable.Riemannian flow matching keeps trajectories on the unit hypersphere, where normalized item embeddings lie.Source: §3.2.1 · p. 10
3.2.2. Inference
- At inference, X-Rec predicts an anchor, initializes noise uniformly on the unit hypersphere, and progressively denoises it with Riemannian Euler integration.The resulting embedding is used as the final recall trigger.Source: §3.2.2 · p. 11
3.3.3. Velocity Predictor: Late Interaction DiT
- The velocity predictor uses late interaction: target denoising tokens enter only the final Transformer layer, which estimates velocity while reusing contextualized history representations.The flow timestep and anchor condition that layer through AdaLN; the design substantially improves throughput with only a marginal Recall @20 decrease versus full-layer denoising.Source: Figure 2 · p. 12, §3.3.3 · p. 13
3.3.1. Feature Encoding
- Historical interaction features are encoded by an L-layer Transformer with causal masking, producing contextualized user representations whose KV cache can be reused during velocity prediction.The context includes historical interactions and expected target attributes, which are projected into the model dimension.Source: §3.3.1 · pp. 11–12
3.3.2. Anchor Predictor
- Because the anchor is discrete, X-Rec predicts it with a softmax classifier based on the historical-sequence embedding.The classifier has a weight vector for each anchor.Source: §3.3.2 · p. 13
3.4. Training Pipline
X-Rec uses pretraining to learn general sequential transition structure, then supervised fine-tuning to adapt the model to downstream retrieval contexts and targets.
3.4.1. Pretraining
- Pretraining computes next-item prediction losses for all sequence prefix–target pairs in parallel within one prefill pass, without changing sequential-pretraining semantics.Each denoising token attends only to its designated history prefix and remains isolated from the other denoising tokens.Source: §3.4.1 · pp. 14–15, Figure 3 · p. 14
3.4.2. Supervised Fine-Tuning
- SFT adapts the pretrained model using chronological histories that combine meaningful-engagement items with recent activity, capturing persistent preferences and transient intent.For each target, eight independent noise samples and timesteps estimate the RFM objective; isolated denoising tokens attend to the complete composed history and the same target attribute.Source: §3.4.2 · p. 15
4. Offline Experiments
Offline experiments evaluate X-Rec on a chronological streaming benchmark, compare it with retrieval baselines, and test its design choices and generated triggers. X-Rec outperforms the controlled U2I variant, performs slightly better than the controlled SID-autoregressive variant, and benefits from anchor conditioning, Riemannian flow matching, late interaction, and pretraining.
4.1.1. Data
- The benchmark simulates continual retrieval updates, while Recall@20 measures test examples whose ground-truth item appears among retrieved candidates.It has 47 chronological partitions, each with 2.6M training and 10K test examples; the compared U2I and SID-based methods use different default trigger/neighbor configurations. Throughput measures trigger generation, excluding ANN lookup.Source: §4.1.1 · p. 16, §4.1.2 · p. 16, §4.1.3 · p. 16
4.2. Overall Performance
- 10.65% average recall: X-Rec exceeds X-Rec-AR by 0.53 percentage points and outperforms X-Rec-U2I, whose average recall is 6.98%.X-Rec beats X-Rec-AR on 38 of 47 partitions, with one tie; the X-Rec-U2I gap is 3.67 percentage points.Source: Figure 4 · p. 17, §4.2 · pp. 17–18
4.3.1. Effect of Anchor Conditioning
- Removing anchor conditioning lowers average Recall@20 from 10.76% to 8.71%, and first-digit recall also falls at both reported cutoffs.The first-SID-digit recall drops from 41.37% to 28.57% at top-20 and from 53.55% to 35.77% at top-50; anchor conditioning decomposes generation into coarse semantic localization and fine refinement with negligible added computation.Source: §4.3.1 · pp. 18–19
4.3.2. Effect of RFM
- Replacing Riemannian flow matching with Euclidean flow matching reduces average Recall@20 by 1.78 percentage points, while removing pretraining reduces it by 5.27 points.The RFM variant scores 8.98%; RFM aligns generation with the unit hypersphere, while the non-pretrained model scores 5.49% and degrades across all 47 partitions.Source: §4.3.2 · p. 19, §4.3.4 · p. 20
4.3.3. Effect of Late-Interaction
- One-layer late interaction offers a strong retrieval-throughput trade-off, and pretraining remains important under streaming supervision.The 14-layer variant reaches 11.94% mean Recall@20, only 1.05 percentage points above the one-layer variant; one layer is 4.50× faster than 14 layers and 3.46× faster than X-Rec-AR. The no-pretraining variant remains below X-Rec throughout streaming SFT.Source: Figure 6 · p. 20, §4.3.3 · p. 20, §4.3.4 · p. 20
4.4.1. Retrieval Breadth & Depth
- With a fixed candidate budget, X-Rec’s Recall@20 rises as more triggers are used, whereas the controlled U2I variants lose recall as trigger count increases.X-Rec improves from 8.28% at 1×20 to 10.76% at 20×1; the U2I variant falls from 6.98% at 1×20 to 5.32% at 10×2.Source: §4.4.1 · pp. 21–22
4.4.2. Adjusting Diversity with Anchor Temperature
- Increasing anchor-sampling temperature reduces trigger similarity and raises recall, with the default 1.4 temperature near the reported saturation point.From temperature 0.8 to 1.6, Recall@20 increases from 10.38% to 10.84%; temperatures 1.2, 1.4, and 1.6 yield 10.75%, 10.76%, and 10.84%, respectively.Source: §4.4.2 · p. 22
4.4.3. Reconstructed Targets Expose Representation Loss
- SID-reconstructed training targets lower recall, while an illustrative case shows X-Rec triggers matching two historical-interest modes better than the U2I variant.Reconstruction-target losses are 1.44–3.10 percentage points for Recall@20 and 1.71–3.92 points for Recall@50. In the case study, closest cosine similarity to the ground-truth item is 0.942 for X-Rec and 0.199 for X-Rec-U2I-5.Source: §4.4.3 · p. 23, §4.5 · pp. 23–24
5. Online Results
X-Rec was deployed as a new retrieval source for vertical-content recommendation on TikTok. Across two consecutive launches, reported engagement improvements were +4.1484% for vertical engagement and +0.0111% for general engagement.
5. Online Results
- The first launch used RFM and late interaction without anchor conditioning; the second added anchor conditioning and brought further retrieval-performance gains.The first launch is V1 and the second is V2.Source: §5 · p. 24
- +4.1484% vertical engagement and +0.0111% general engagement were reported for X-Rec’s two consecutive launches.The report describes these launches as deployment of a new retrieval source for vertical-content recommendation on TikTok.Source: §5 · pp. 24–25
- The online-test caption says gains from the sequential V1 and V2 tests can be combined, and results are significant unless marked otherwise.V1 serves as the baseline for V2 in the A/B test.Source: Table 3 · p. 25
6. Conclusion & Future Work
X-Rec directly models recommendation distributions in continuous item-embedding space, using three designs for efficient generation. Streaming-benchmark and TikTok vertical results support its potential, while serving cost and scalability remain open questions.
6. Conclusion & Future Work
- Anchor conditioning selects a coarse semantic region before refinement, RFM aligns paths with normalized-item hyperspherical geometry, and late-interaction DiT limits repeated velocity estimation to its final layer.Late-interaction DiT also reuses cached condition representations.Source: §6 · p. 25
- 3.46× higher generation throughput than SID-AR accompanies stronger offline performance than U2I and SID-AR variants; two TikTok vertical launches improved business metrics.The conclusion describes the offline results as balancing retrieval quality, interest coverage, and generation efficiency.Source: §6 · p. 25
- Multiple denoising steps leave serving costs to reduce, and late-interaction scalability with larger backbones and deeper denoising modules remains to be explored.The authors also identify reward-aligned post-training as future work.Source: §6 · p. 25
7. Contributors
The contributor section separates core contributors from other contributors, lists contributors alphabetically by first name within each role, and marks some contributors who left before publication.
7. Contributors
- Contributors are listed alphabetically by first name within each role.The section distinguishes core contributors from contributors.Source: §7 · p. 29
- Asterisks mark contributors who had left the team before publication.The marked names in the contributor roster are Han Xia, Song Jin, and Yu Zhang.Source: §7 · p. 29
- The core-contributor roster runs from Chenglei Shen to Zhongtao Jiang.The passage lists Chenglei Shen, Chenzhe Huang, Dong Jiang, Hongjie Gao, Jue Zhang, Kun Xú, Lincan Cai, Nan Zhuang, Pan Zhang, Shi Chen, Shunchi Zhang, Xiaoyu Ye, Yang Jin, Yu Zhang, Zhenwei An, and Zhongtao Jiang.Source: §7 · p. 29
A.1. Complete Results on Streaming Benchmark
The appendix presents complete streaming-benchmark recall results at two cutoffs and explains the evaluation settings used for single-embedding and multiple-trigger methods.
A.1. Complete Results on Streaming Benchmark
- U2I methods use the 1 × K setting, while SID-based methods and X-Rec use the K × 1 setting for Recall @K.The U2I group includes SASRec, LRURec, DreamRec, and X-Rec-U2I; the multiple-trigger group includes TIGER, EAGER, LATTE, LLaDARec, X-Rec-AR, and X-Rec.Source: §A.1 · p. 30
- Table 4 presents complete streaming-benchmark Recall @20 results.Its caption notes that the X-Rec column is highlighted with light shading.Source: Table 4 · p. 30
- Table 5 presents complete streaming-benchmark Recall @50 results.Its caption notes that the X-Rec column is highlighted with light shading.Source: Table 5 · p. 31
A.2. Architectures of X-Rec-AR and X-Rec-U2I-K
The appendix describes an autoregressive SID-generation baseline and a multi-interest U2I baseline, along with their trigger-generation and training procedures.
A.2. Architectures of X-Rec-AR and X-Rec-U2I-K
- X-Rec-AR uses the shared Qwen3-0.6B backbone, user context, and item-representation space, but generates a target four-token SID sequence autoregressively.It prepends the context representation as a prompt, trains with cross-entropy, and uses beam search before reconstructing triggers with RQ codebooks.Source: §A.2 · p. 31
- X-Rec-U2I-K derives K user-interest embeddings from context using learnable query vectors and a self-attentive multi-interest module.The module is adopted from ComiRec-SA.Source: §A.2 · p. 32
- The original ComiRec-SA training strategy updates only the winning trigger, whereas the improved variant optimizes all interest triggers.The passage identifies the original strategy as unstable and poor-performing on the streaming benchmark.Source: §A.2 · p. 32
- The improved contrastive loss selects each candidate’s nearest interest trigger, giving all triggers direct optimization signals and improving training stability.At inference, the learned triggers retrieve candidates from the ANN index; the resulting representation remains a finite set of deterministic vectors.Source: §A.2 · p. 32
A.3. Additional Multi-Interest Case Studies
Qualitative case studies show X-Rec triggers spanning multiple interest clusters, while X-Rec-U2I triggers remain concentrated in one region. Increasing the U2I trigger count to ten does not change that pattern.
- Figures 11–12 show X-Rec triggers spanning multiple interest clusters, unlike X-Rec-U2I-5’s single-region concentration, supporting greater capture of diverse, multi-modal interests.Source: §A.3 · p. 32, Figure 11 · p. 33, Figure 12 · p. 34
- Increasing X-Rec-U2I’s trigger count to 10 does not change its concentration pattern, so more triggers alone do not eliminate the observed expressiveness gap.Source: §A.3 · p. 32, Figure 13 · p. 35, Figure 14 · p. 36
Related papers
This paper cites
- Attention Is All You Need2017
- Learning Transferable Visual Models From Natural Language Supervision2021
- Efficient Memory Management for Large Language Model Serving with PagedAttention2023
- A Simple Framework for Contrastive Learning of Visual Representations2020
- RoFormer: Enhanced Transformer with Rotary Position Embedding2021
- Classifier-Free Diffusion Guidance2022