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.