Item tokenizer encodes semantic embeddings into token IDs to replace the randomly assigned item IDs used in traditional recommendation models, fundamentally addressing the problems of excessive parameters and cold starts. However, the most common tokenizer, RQ-VAE, suffers from low decoding efficiency due to the inherent dependencies among its codebooks. Meanwhile, efficient independent tokenizers such as optimized product quantization (OPQ) still struggle with dimensional correlations and distribution complexity of semantic embeddings. In this work, we propose a flow-based item Tokenizer (Tlow) to transform raw semantic embeddings into a latent space where embeddings conform to a unified standard normal distribution, achieving dual advantages of dimensional independence and distributional simplicity. Independent tokenization performed on these latent embeddings yields semantically clear token IDs. Additionally, we introduce a novel codebook guidance to align the codebook space with the token embedding space, further aiding the learning of more semantically distinct token embeddings. Offline experiments on four public datasets demonstrate that Tlow's tokenization and codebook guidance significantly improve recommendation performance. The improvement on cross-domain and multi-modal recommendations also proves the effectiveness of item tokenization in a simplified embedding space. Online experiments for a multi-modal retrieval task on China's largest social media platform WeChat validate Tlow's powerful distribution transformation capability. The retrieval model based on token IDs improves user CTR by 10.32% globally and by 11.64% for new items. Our codes are available at https://github.com/wjjln/Tlow.
Figures & tables
Figure 1. A Comparison of semantic clarity of token IDs generated by OPQ and Tlow tokenization.
Figure 2. The illustration of Tlow Architecture with N=3 blocks and M=2 flows, where the dimension of semantic embedding is ds=4 (left). An example of “A Step of Flow” processing embedding with the dimension d=4 (right).
Datasets
#Users
#Items
#Interactions
Avg. Length
Sports
35,598
18,357
260,739
8.32
Beauty
22,363
12,101
176,139
8.87
Toys
19,412
11,924
148,185
8.63
CDs
75,258
64,443
1,022,334
14.58
Cloth
9,933
3,278
97,741
10.71
Sports
4,263
1,021
11,879
Table 1. Statistics of used datasets.
Model
Sports and Outdoors
Beauty
Toys and Games
CDs and Vinyl
R@5
N@5
R@10
N@10
R@5
N@5
R@10
N@10
R@5
N@5
R@10
N@10
R@5
N@5
R@10
N@10
ID
Caser
0.0116
0.0072
0.0194
0.0097
0.0205
0.0131
0.0347
0.0176
0.0166
0.0107
0.0270
0.0141
0.0116
0.0073
0.0205
0.0101
GRU4Rec
0.0129
0.0086
0.0204
0.0110
0.0164
0.0099
0.0283
0.0137
0.0097
0.0059
0.0176
0.0084
0.0195
0.0120
0.0353
0.0171
HGN
0.0189
0.0120
0.0313
0.0159
0.0325
0.0206
0.0512
0.0266
0.0321
0.0221
0.0497
0.0277
0.0259
0.0153
0.0467
0.0220
BERT4Rec
0.0115
0.0075
0.0191
0.0099
0.0203
0.0124
0.0347
0.0170
0.0116
0.0071
0.0203
0.0099
0.0326
0.0201
0.0547
0.0271
SASRec
0.0233
0.0154
0.0350
0.0192
0.0387
0.0249
0.0605
0.0318
0.0463
0.0306
0.0675
0.0374
0.0351
0.0177
0.0619
0.0263
Table 2. Performance comparison on general recommendation. Underline denotes the best baseline and bold denotes better performance than the best baseline at a significance level of p<0.01 under paired t-test.
Model
Sports
Beauty
Toys
CDs
R@10
N@10
R@10
N@10
R@10
N@10
R@10
N@10
Tlow
0.0477
0.0261
0.0786
0.0454
0.0864
0.0482
0.0801
0.0446
w/o Lsim
0.0449
0.0248
0.0764
0.0436
0.0826
0.0471
0.0756
0.0425
Random z
0.0202
0.0103
0.0623
0.0363
0.0571
0.0341
0.0147
0.0074
Table 3. Ablation study of Tlow.
Model
Overall
Cloth
Sports
R@10
N@10
R@10
N@10
R@10
N@10
LLM4CDSR
0.4620
0.2803
0.4220
0.2637
0.5507
0.3172
RPG
0.4766
0.3457
0.4487
0.3353
0.5385
0.3686
Tlow
0.5558
0.4395
0.5669
0.4568
0.5312
0.4014
Table 4. Performance comparison on cross-domain recommendation.
Model
R@5
N@5
R@10
N@10
HM4SR
0.0326
0.0231
0.0469
0.0277
RPG
0.0326
0.0216
0.0501
0.0272
Tlow
0.0343
0.0233
0.0521
0.0290
Table 5. Performance comparison on multi-modal recommendation.
Figure 3. Performance comparison under different user and item groups.
Figure 4. Online serving of Tlow’s tokenization.
Scenario
Overall
New Item
CTR
UCTR
CTR
UCTR
Single-domain
4.79
10.32
8.46
11.64
Cross-domain
6.23
7.20
9.09
9.45
Table 6. Online metrics improvement (%) of pathway comparison in single-domain and cross-domain scenarios.
Large-scale recommendation systems face "Memory Wall" bottlenecks due to massive, dense embedding tables. While generative retrieval uses discrete tokens for IDs, high-dimensional context still relies on inefficient dense formats. Inspired by computer vision data compression, we propose Dual-purpose Semantic IDs to achieve LLM-level I/O efficiency. Our methodology uses hierarchical quantization to condense continuous embeddings into discrete Semantic IDs performing two concurrent roles: (1) Collaborative Identity: modeling user-item interactions via learnable embedding table; and (2) Content Reconstruction: using a lightweight Semantic Decoder for on-the-fly embedding approximation. This approach replaces massive vector storage with on-demand reconstruction, reducing system overhead and data footprints. We demonstrate the efficacy of our framework through offline evaluations and successful online deployment in production-scale ranking and retrieval systems at a major video sharing platform, showing that discrete tokens are indeed all you need for highly efficient, content-rich recommendation.
In web environments, user preferences are often refined progressively as users move from browsing broad categories to exploring specific items. However, existing generative recommenders overlook this natural refinement process. Generative recommendation formulates next-item prediction as autoregressive generation over tokenized user histories, where each item is represented as a sequence of discrete tokens. Prior models typically fuse heterogeneous attributes such as ID, category, title, and description into a single embedding before quantization, which flattens the inherent semantic hierarchy of items and fails to capture the gradual evolution of user intent during web interactions. To address this limitation, we propose CoFiRec, a novel generative recommendation framework that explicitly incorporates the Coarse-to-Fine nature of item semantics into the tokenization process. Instead of compressing all attributes into a single latent space, CoFiRec decomposes item information into multiple semantic levels, ranging from high-level categories to detailed descriptions and collaborative filtering signals. Based on this design, we introduce the CoFiRec Tokenizer, which tokenizes each level independently while preserving structural order. During autoregressive decoding, the language model is instructed to generate item tokens from coarse to fine, progressively modeling user intent from general interests to specific item-level interests. Experiments across multiple public benchmarks and backbones demonstrate that CoFiRec outperforms existing methods, offering a new perspective for generative recommendation. Theoretically, we prove that structured tokenization leads to lower dissimilarity between generated and ground truth items, supporting its effectiveness in generative recommendation. Our code is available at https://github.com/YennNing/CoFiRec.
Tianxin Wei, Xuying Ning, Xuxing Chen +6
University of Illinois Urbana-Champaign · Meta · University of California San Diego
Semantic identifiers (SIDs) represent entities as hierarchical token sequences for generative retrieval and recommendation. Residual-quantization tokenizers construct these sequences by selecting a codeword at each level and passing a residual to the next. We view this process as progressive commonality removal: each token captures a component shared within its group, while later tokens should model the remaining differences. This view reveals three limitations: a corpus-wide shared component can consume first-level capacity, hard assignment ignores graded similarities to nearby codewords, and full-codeword subtraction can leave variation along the selected-codeword direction in the next residual. We therefore develop our solution in the post-hoc setting, where residual construction is not constrained by input reconstruction. Specifically, we propose PRQ-KMeans, which removes the global-mean component, refines centroids with Top-k similarity-weighted updates, and replaces full-codeword subtraction with a projection residual that removes each representation's selected-centroid component. Experiments on a large-scale industrial search dataset and four public recommendation benchmarks show that PRQ-KMeans achieves the strongest overall performance among the evaluated tokenizers, including gains of up to 7.4% in HitRate and 11.8% in MRR on the industrial dataset.