Table of Contents
Fetching ...

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.

CoFiRec: Coarse-to-Fine Tokenization for Generative Recommendation

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.

Paper Structure

This paper contains 32 sections, 2 theorems, 26 equations, 6 figures, 11 tables.

Key Result

Proposition 1

Let $\mathbb{E}_\textnormal{hier}[d(i,\hat{\imath})]$ and $\mathbb{E}_\textnormal{indep}[d(i,\hat{\imath})]$ denote the expected dissimilarity between the predicted item $\hat{i}$ and the ground-truth item $i$ under hierarchical and independent decoding, respectively. Then,

Figures (6)

  • Figure 1: Users on the web refine their preferences progressively from category to type to specific series during item exploration.
  • Figure 2: In CoFiRec tokenization, item metadata are hierarchically organized (category, title, description) and each level is tokenized independently, with CF signals serve as the most fine-grained tokens.
  • Figure 3: The overall framework of CoFiRec, which models multi-level tokenization for coarse-to-fine generative recommendation. Left: The CoFiRec Tokenizer decomposes item metadata into hierarchical semantic levels (e.g., category, title, description) and encodes each level using coarse-to-fine VQ modules. Collaborative filtering (CF) signals are tokenized independently from a pre-trained CF embedding via a dedicated CF Tokenizer. Right: During generation, an autoregressive language model generates tokens from coarse to fine, conditioned on user history. We inject semantic-level and positional embeddings to help the model identify the role of each token in the structured generation.
  • Figure : (a) CoFiRec
  • Figure : (a) CoFiRec
  • ...and 1 more figures

Theorems & Definitions (2)

  • Proposition 1
  • Lemma 1