Semantic IDs (SIDs) are compact discrete representations derived from multimodal item features, serving as a unified abstraction for ID-based and generative recommendation. However, learning high-quality SIDs remains challenging due to two issues. (1) Collision problem: the quantized token space is prone to collisions, in which semantically distinct items are assigned identical or overly similar SID compositions, resulting in semantic entanglement. (2) Collision-signal heterogeneity: collisions are not uniformly harmful. Some reflect genuine conflicts between semantically unrelated items, while others stem from benign redundancy or systematic data effects. To address these challenges, we propose Qualification-Aware Semantic ID Learning (QuaSID), an end-to-end framework that learns collision-qualified SIDs by selectively repelling qualified conflict pairs and scaling the repulsion strength by collision severity. QuaSID consists of two mechanisms: Hamming-guided Margin Repulsion, which translates low-Hamming SID overlaps into explicit, severity-scaled geometric constraints on the encoder space; and Conflict-Aware Valid Pair Masking, which masks protocol-induced benign overlaps to denoise repulsion supervision. In addition, QuaSID incorporates a dual-tower contrastive objective to inject collaborative signals into tokenization. Experiments on public benchmarks and industrial data validate QuaSID. On public datasets, QuaSID consistently outperforms strong baselines, improving top-K ranking quality by 5.9% over the best baseline while increasing SID composition diversity. In an online A/B test on Kuaishou e-commerce with a 5% traffic split, QuaSID increases ranking GMV-S2 by 2.38% and improves completed orders on cold-start retrieval by up to 6.42%. Finally, we show that the proposed repulsion loss is plug-and-play and enhances a range of SID learning frameworks across datasets.
Figures & tables
Figure 1. SID learning in large-scale recommendation: multimodal features are encoded and quantized into SIDs as a unified discrete interface for traditional and generative paradigms. Challenges: token collisions cause semantic entanglement, and overlap signals are heterogeneous (harmful vs. benign), so one-size-fits-all suppression is problematic.
Figure 2. The overall framework of QuaSID.
Figure 3. Representative in-batch collision cases in industrial SID training. (a) Partial collision with 2/4 token overlap. (b) Complete collision with identical 4-token SIDs between semantically dissimilar items.
Figure 4. QuaSID deployment and application pipeline.
Dataset
#Users
#Items
#Interactions
Amazon-Beauty
22,363
12,101
1,048,296
Amazon-Toys
19,412
11,924
905,253
Table 1. Dataset statistics used in the experiments.
Amazon-Beauty
Amazon-Toys
Tokenizer
HR@5
HR@10
NDCG@5
NDCG@10
Entropy
HR@5
HR@10
NDCG@5
NDCG@10
Entropy
RQ-VAE
0.0225
0.0300
0.0171
0.0195
9.3075
0.0206
0.0256
0.0164
0.0180
9.3068
Improved VQGAN
0.0232
0.0304
0.0167
0.0189
9.3569
0.0196
0.0245
0.0157
0.0172
9.3313
GRVQ
0.0222
0.0302
0.0161
0.0187
9.2755
0.0195
0.0242
0.0158
0.0173
9.2101
RQ-OPQ
0.0205
0.0271
0.0159
0.0180
9.3368
0.0228
0.0278
0.0179
0.0195
9.3521
RQ-VAE-Rotation
0.0236
0.0308
0.0175
0.0198
9.3455
0.0203
0.0257
0.0167
0.0187
9.3290
Table 2. Performance comparison on Amazon-Beauty and Amazon-Toys. Bold denotes the best result, and underlined denotes the second-best result.
Amazon-Beauty
Amazon-Toys
Tokenizer
HR@5
HR@10
NDCG@5
NDCG@10
Entropy
HR@5
HR@10
NDCG@5
NDCG@10
Entropy
RQ-VAE
0.0225
0.0300
0.0171
0.0195
9.3075
0.0206
0.0256
0.0164
0.0180
9.3068
+ LHaMR
0.0246 ↑9.3%
0.0348 ↑16.0%
0.0182 ↑6.4%
0.0215 ↑10.3%
9.3971 ↑1.0%
0.0239 ↑16.0%
0.0290 ↑13.3%
0.0187 ↑14.0%
0.0203 ↑12.8%
9.3795 ↑0.8%
Improved VQGAN
0.0232
0.0304
0.0167
0.0189
9.3569
0.0196
0.0245
0.0157
0.0172
9.3313
+ LHaMR
0.0257 ↑10.8%
0.0340 ↑11.8%
0.0192 ↑15.0%
0.0218 ↑15.3%
9.3974 ↑0.4%
0.0239 ↑21.8%
0.0301 ↑22.8%
0.0187 ↑18.9%
0.0207 ↑20.1%
9.3797 ↑0.5%
GRVQ
0.0222
0.0302
0.0161
0.0187
9.2755
0.0195
0.0242
0.0158
0.0173
9.2101
Table 3. Effect of HaMR ( LHaMR ) on different semantic ID learning methods.
Figure 5. Hyperparameter sensitivity analysis of QuaSID on the Amazon-Beauty dataset. The bars indicate NDCG@K (left y-axis), while the curves denote HR@K (right y-axis). In each subfigure, one hyperparameter is varied while all others are fixed to their default values.
Setting
Completed Orders
GMV-S1
GMV-S2
Generative Retrieval
+0.21%
+1.03%
+0.55%
Ranking
+0.20%
+1.44%
+2.38%
Completed Orders
GMV
GPM
Retrieval
+1.09%
+1.69%
+3.25%
Retrieval 100vv
+6.42%
+4.67%
+0.21%
Retrieval 600vv
+4.69%
+3.11%
+0.53%
Table 4. Online A/B test results on Kuaishou e-commerce. Relative uplifts (%) brought by integrating QuaSID-learned SIDs into retrieval and ranking.
Tokenizer
Amazon-Beauty
Amazon-Toys
HR@5
NDCG@5
HR@5
NDCG@5
QuaSID
0.0277
0.0193
0.0266
0.0193
w/o CVPM
0.0263
0.0181
0.0264
0.0190
w/o HaMR
0.0254
0.0170
0.0261
0.0189
Table 5. Ablation study results on Amazon-Beauty and Amazon-Toys datasets.