UNGER: Generative Recommendation with A Unified Code via Semantic and Collaborative Integration
Longtao Xiao, Haozhao Wang, Cheng Wang, Linfei Ji, Yifan Wang, Jieming Zhu, Zhenhua Dong, Rui Zhang, Ruixuan Li
cs.IR
2025-02-10
UNGER fuses semantic and collaborative signals into one Unicode. Beauty Recall@20 is 0.1289, 14.7% above EAGER, and 2.8x faster than dual codes.
Generative recommendation turns next-item prediction into autoregressive decoding of discrete item codes, and drops the ANN index. Where those codes come from has been split: RecForest quantizes collaborative embeddings, TIGER quantizes semantics, EAGER keeps two codebooks and merges by confidence. Two codes cost storage and latency, and they treat the two signals as independent channels.
Concatenating semantic and collaborative vectors before quantization looks cheaper. It hits semantic dominance: the fused vector sits on the semantic side, the collaborative side contributes almost nothing, and accuracy can fall below a semantic-only code. The two modalities differ in signal strength and geometry; concatenation cannot reweight them.
UNGER has two stages. Stage I encodes items twice: Llama2-7b on titles and other side text, DIN on interaction sequences. A learnable adaptation layer with AdaLN maps semantics into the collaborative space, trained jointly with next-item prediction and a cross-modal InfoNCE alignment. Hierarchical k-means then residual-quantizes the fused embedding, 256 clusters per layer, into a single Unicode that is the item's only discrete id.
Stage II is a Transformer: the encoder reads the user's Unicode history, the decoder emits the next item's code. Quantization loses information, so a distillation token is appended; its hidden state is contrasted with the unquantized fused embedding from Stage I. Both stages add one auxiliary loss with coefficient 1. Inference runs only the Transformer, beam-searches codes, and looks them up.
Three Amazon 5-core sets: Beauty, Sports, Toys. On Beauty, Recall@20 is 0.1289 against EAGER's 0.1124 (+14.68% relative); NDCG@20 is 0.0646 against 0.0599 (+7.85%). Sports and Toys also beat EAGER across the board. Parameter count is about half of EAGER.
| Method | Beauty R@20 | Beauty N@20 | Semantic share |
| Semantic only | 0.1077 | 0.0535 | — |
| Collaborative only | 0.0997 | 0.0532 | — |
| Concat | 0.1071 | 0.0530 | 97.33% |
| UNGER | 0.1289 | 0.0646 | 59.89% |
Concat leaves 2.67% on the collaborative side and scores slightly below semantic-only. UNGER lands near 60/40. Ablating alignment and distillation falls back to concat; alignment alone already helps; both together are best. Versus two codes, a unified code is about 2.8x faster on Beauty (topk=5, beam=100). Recall@20 and NDCG@20 keep rising as depth goes from 1 to 8 layers.
If generative recommenders go to production, the number of codebooks is a storage and latency tax. Two codes plus a late merge are expensive and miss complementarity. Align early, quantize once, and you get a cheaper and more accurate id. Semantic dominance is not a slogan: concat on Beauty is a reproducible counterexample. Teams already on TIGER or EAGER get a more deployable alternative without two decoders.
Evaluation stays on sparse Amazon 5-core subsets; denser settings are untested, as the authors note. Semantics come from Llama2-7b and collaboration from DIN; newer backbones might shift the 60/40 balance. Hierarchical k-means is offline, so the codebook does not update with Stage II. The ablation table is Beauty-only. Scaling plots cover depth; width and data volume are not reduced to numbers in the text. There is no online A/B.