Personalized LLM for Generating Customized Responses to the Same Query from Different Users

Hang Zeng, Chaoyue Niu, Fan Wu, Chengfei Lv, Guihai Chen

TL;DR

This paper introduces a "querier-aware" framework for LLM personalization, shifting the focus from how an LLM plays a specific role to how it adapts its responses based on who is asking the query. By leveraging a parameter-efficient dual-tower architecture and cluster-based contrastive learning, the model successfully generates customized responses tailored to individual user relationships and knowledge levels.

What Problem Does This Paper Address?

Most existing work on LLM personalization focuses on the responder side—giving the AI a specific persona, such as a "helpful assistant" or a "casual friend." However, human communication is inherently dynamic; we naturally alter our tone, vocabulary, and emotional depth depending on our relationship with the person we are addressing. For instance, an expert explaining genetic sequencing to a colleague will use highly technical jargon, but will pivot to simple analogies when explaining the same concept to a high school student.

Responder vs. Querier-Aware Personalization

Current user-targeted generation methods typically aggregate user data indiscriminately or treat users completely independently, failing to explicitly model the unique, nuanced relationship between a specific querier and a responder. Furthermore, training a separate fine-tuned model for every single user is computationally unsustainable for large-scale applications.

Methods

To achieve efficient, user-tailored response generation, the authors propose a unified "one-for-all" personalized LLM utilizing three core components:

  1. Dual-Tower Model Architecture: The model splits personality representation into two parallel tracks. The first track is a General Encoder (initialized from a pretrained LLM) that captures the cross-querier, base personality of the responder. The second track is a Specific Encoder that captures unique querier traits and relationship dynamics. To keep the model parameter-efficient, the dense feedforward layers of the specific blocks are decomposed into low-rank matrices, adding only about 1% extra parameters to the base LLM size.
  2. Query Similarity-Based Dialogue Clustering: Contrastive learning requires positive and negative pairs, but real-world datasets rarely feature different users asking the exact same question. To circumvent this, the authors use text embeddings and $k$-means clustering to group dialogues with semantically similar queries.
  3. Querier-Contrastive Loss with Multi-View Augmentation: Within each semantic cluster, the model applies a contrastive loss function. It pulls the dialogue representations of the same querier closer to a maintained "global user representation" while pushing representations of different queriers apart. To maximize data efficiency, they apply manual view augmentation via different projection matrices.
Figure 2: Dual-tower architecture. The feedfroward layer of the specific block is composed of two low-rank matrices.

Datasets

Because no public datasets explicitly capture multiple distinct users interacting over time with a single responder, the authors constructed a new benchmark dataset called MQDialog. It contains 173 queriers and 12 responders, compiled from three distinct sources:

  • English TV Scripts: Dialogues centered around leading characters from The Big Bang Theory, Friends, and Modern Family.
  • Chinese TV Scripts: Dialogues from My Own Swordsman and Empresses in the Palace.
  • Real-world WeChat Records: Anonymized, multi-turn chat histories belonging to one of the authors, capturing interactions with colleagues, professors, and friends.

Key Insights and Ideas

  • Disentangling Persona vs. Relationship: The core "aha moment" is that an individual's communication style consists of a dominant base persona mixed with sparse, user-specific adjustments. This justifies the dual-tower approach where the base LLM remains full-rank, while user-specific adjustments are handled via low-rank matrices.
  • The Necessity of Semantic Clustering: Running contrastive learning across entirely different topics causes the model to conflate semantic content with user identity. Restricting contrastive learning to clusters of similar queries forces the specific encoder to ignore the core topic and focus purely on stylistic and relational differences between users.
Figure 3: Querier-contrastive loss in each cluster of dialogues with similar queries from different queriers.

Key Results

The proposed framework was evaluated against several baselines, including zero-shot generation, standard fine-tuning (FT), and profile-based prompting:

  • Automated Metrics: Compared to standard fine-tuning, the querier-aware model achieved relative improvements of 6.9% to 10.2% in BLEU scores and 5.2% to 10.9% in ROUGE-L scores across English and Chinese datasets.
  • LLM & Human Evaluation: Using GPT-4 as a judge, the proposed method achieved a win rate ranging from 54% to 82% against various baselines. A blind human evaluation with lab volunteers corroborated these findings, yielding a 74.2% win rate over zero-shot generation and a 67.5% win rate over standard fine-tuning.

Limitations and Future Work

  • Contextual Omissions: The dataset construction pipeline strips away non-dialogue elements from scripts, such as scene descriptions and character actions. Incorporating these environmental and situational contexts remains an open challenge.
  • Scalability Boundaries: While parameter-efficient, the current setup was evaluated on a moderate scale of users per responder. Scaling this architecture to handle millions of unique queriers will require grouping users by profile similarity rather than maintaining individual representations.

Summary updated

BibTeX
@misc{zeng2024personalized,
  author = {Hang Zeng and Chaoyue Niu and Fan Wu and Chengfei Lv and Guihai Chen},
  title = {{Personalized LLM for Generating Customized Responses to the Same Query from Different Users}},
  year = {2024},
  eprint = {2412.11736},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.11736},
}
Figure