CURP: Codebook-based Continuous User Representation for Personalized Generation with LLMs
Liang Wang, Xinyi Mou, Xiaoyou Liu, Xuanjing Huang, Zhongyu Wei
TL;DR
CURP introduces a codebook-based continuous user representation for personalized generation with LLMs. By encoding user histories with a bidirectional encoder and compressing into a discrete prototype codebook via Product Quantization, CURP achieves noise-robust, data-efficient personalization with a compact footprint of about 20M trainable parameters. The two-stage training—Prototype Codebook Construction and Prototype Behavior Aligning—yields a decoder-agnostic framework that generalizes across tasks and supports cloud-edge deployment using non-invertible discrete indices. Across Reddit QA, News Headline, Tweet Paraphrase, and Review Writing, CURP outperforms strong baselines on diverse metrics and demonstrates interpretable prototypes and robust cross-task generalization. The work advances practical, scalable personalization for generation with LLMs, balancing fidelity, efficiency, and privacy.
Abstract
User modeling characterizes individuals through their preferences and behavioral patterns to enable personalized simulation and generation with Large Language Models (LLMs) in contemporary approaches. However, existing methods, whether prompt-based or training-based methods, face challenges in balancing personalization quality against computational and data efficiency. We propose a novel framework CURP, which employs a bidirectional user encoder and a discrete prototype codebook to extract multi-dimensional user traits. This design enables plug-and-play personalization with a small number of trainable parameters (about 20M parameters, about 0.2\% of the total model size). Through extensive experiments on variant generation tasks, we show that CURP achieves superior performance and generalization compared to strong baselines, while offering better interpretability and scalability. The code are available at https://github.com/RaidonWong/CURP_code
