CoFiRec: Coarse-to-Fine Tokenization for Generative Recommendation
Tianxin Wei, Xuying Ning, Xuxing Chen, Ruizhong Qiu, Yupeng Hou, Yan Xie, Shuang Yang, Zhigang Hua, Jingrui He
TL;DR
CoFiRec tackles the misalignment between user preference refinement and flat item tokenization in generative recommendation by introducing a coarse-to-fine tokenization scheme and hierarchical autoregressive generation. It builds a multi-level item representation (category, title, description, CF signals) with separate codebooks and trains a ranking-guided generator to emit tokens from coarse to fine, supported by theory that hierarchical decoding reduces dissimilarity. Empirically, CoFiRec outperforms strong baselines across Instruments, Yelp, and Beauty datasets on multiple backbones, and ablations confirm the value of structure, CF signaling, and embeddings. The work highlights the importance of semantic hierarchy in token design for scalable, interpretable, and transferable generative recommendations, and provides code for reproducibility.
Abstract
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.
