Pctx: Tokenizing Personalized Context for Generative Recommendation

Qiyong Zhong, Jiajie Su, Yunshan Ma, Julian McAuley, Yupeng Hou
10/24/2025
cs.IRcs.AIcs.CL

Official code: YoungZ365/Pctx (30 stars, MIT, last commit 2025-11-21).

Abstract

Generative recommendation (GR) models tokenize each action into a few discrete tokens (called semantic IDs) and autoregressively generate the next tokens as predictions, showing advantages such as memory efficiency, scalability, and the potential to unify retrieval and ranking. Despite these benefits, existing tokenization methods are static and non-personalized. They typically derive semantic IDs solely from item features, assuming a universal item similarity that overlooks user-specific perspectives. However, under the autoregressive paradigm, semantic IDs with the same prefixes always receive similar probabilities, so a single fixed mapping implicitly enforces a universal item similarity standard across all users. In practice, the same item may be interpreted differently depending on user intentions and preferences. To address this issue, we propose a personalized context-aware tokenizer that incorporates a user's historical interactions when generating semantic IDs. This design allows the same item to be tokenized into different semantic IDs under different user contexts, enabling GR models to capture multiple interpretive standards and produce more personalized predictions. Experiments on three public datasets demonstrate up to 11.44% improvement in NDCG@10 over non-personalized action tokenization baselines. Our code is available at https://github.com/YoungZ365/Pctx.

View on arXivView PDF

Code Implementations(1)

YoungZ365/PctxOfficial100%
MIT

PyTorch-based open-source code for paper "Pctx: Tokenizing Personalized Context for Generative Recommendation"

302Shell, PythonOct 15, 202511 months agoMIT

Similar Papers

Cite this paper

@article{zhong2025pctx,
  title  = {Pctx: Tokenizing Personalized Context for Generative Recommendation},
  author = {Qiyong Zhong and Jiajie Su and Yunshan Ma and Julian McAuley and Yupeng Hou},
  year   = {2025},
  eprint = {2510.21276},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.21276v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.21276.svg)](https://codeofpaper.com/paper/2510.21276)

Discussion