MCP: Self-supervised Pre-training for Personalized Chatbots with Multi-level Contrastive Sampling

Zhaoheng Huang, Zhicheng Dou, Yutao Zhu, Zhengyi Ma

Abstract

Developing chatbots that exhibit consistent and personalized personas remains a significant challenge in natural language processing. Traditional approaches often struggle with data sparsity and the limitations of standard word-level training objectives. This paper introduces MCP, a self-supervised pre-training framework that utilizes multi-level contrastive sampling to capture nuanced user profiles from dialogue history. By mining structural correlations at the utterance, history, and user levels, MCP provides a robust representation of user identity, significantly outperforming existing state-of-the-art models in both automatic metrics and human evaluation.

Introduction

To transition from generic conversational agents to true personal assistants, chatbots must understand the specific context, style, and preferences of individual users. While existing personalized chatbots attempt to model user profiles through historical dialogue, they are frequently hindered by two primary obstacles. First, data sparsity is a pervasive issue; many users have limited interaction history, leading to overfitting or the generation of generic, "safe" responses. Second, inefficient training paradigms—which rely almost exclusively on next-token prediction—often fail to capture the broader structural and semantic correlations inherent in a user's long-term communication patterns.

The MCP Framework

The proposed Multi-level Contrastive Sampling (MCP) framework addresses these challenges through a two-stage process: a self-supervised pre-training phase followed by a fine-tuning phase for response generation. The core innovation lies in the use of contrastive learning to "pull" related representations together while "pushing" unrelated ones apart across three distinct granularities:

1. Utterance-level Contrast

This level operates on the assumption that a user's responses within a narrow temporal window likely share semantic or topical consistency. The model is trained to generate similar embeddings for these proximal pairs, capturing fine-grained linguistic habits.

2. History-level Contrast

To ensure the model identifies stable, long-term user traits rather than transient noise, the researchers employ four data augmentation strategies: masking specific sentences, re-ordering dialogue turns, and other perturbations. The model must recognize that these different "views" of the same dialogue history still represent the same underlying user profile.

3. User-level Contrast

This level incorporates social context by analyzing interaction patterns. If two distinct users frequently engage with the same social groups or topics, the framework assumes a degree of shared interest, aligning their profile representations accordingly.

Following this pre-training, the encoders are integrated into a Transformer-based architecture and fine-tuned on the downstream task of personalized response generation.

Experimental Setup

The effectiveness of MCP was evaluated on two large-scale, real-world datasets:

  • Weibo Dataset: A subset of the PChatbotW dataset featuring approximately 300,000 Chinese users.
  • Reddit Dataset: An English-language dataset containing 315,340 users, where parent-child comment structures were utilized as query-response pairs.

Both datasets provided the chronological timestamps and user identifiers necessary to reconstruct comprehensive dialogue histories.

Key Results and Insights

MCP demonstrated a marked improvement over current state-of-the-art baselines, such as DHAP and ReCoSa-P.

Quantitative Performance

On the Weibo dataset, MCP achieved a BLEU-1 score of 9.714, notably higher than DHAP’s 9.324. Furthermore, the model showed superior performance in Personalization (P-F1), suggesting that the generated responses were more closely aligned with the user's established historical style. Crucially, MCP maintained its performance advantage even when dialogue history was sparse, validating the robustness of the contrastive pre-training approach.

Human Evaluation

In double-blind human assessments, MCP was rated higher than all baseline models across three key dimensions: Readability, Informativeness, and Personalization. In the personalization category specifically, MCP outperformed the strongest baseline by more than 5%.

Ablation Studies

Analysis of the framework's components revealed that the utterance encoder—which processes individual sentences—has a more significant impact on final performance than the history-level encoder. This suggests that high-quality, fine-grained semantic information is the essential foundation upon which accurate high-level user profiles are built.

Conclusion and Future Work

MCP provides a powerful method for extracting "hidden supervision" from raw dialogue data without the need for manual labeling. By treating dialogue history as a structured source of contrastive signals, the model learns to navigate the noise inherent in human conversation.

While the current architecture utilizes standard Transformers, future research will explore the integration of MCP's contrastive tasks with large-scale foundation models (LLMs) to determine if these personalization gains scale. Additionally, the researchers aim to refine the model's ability to capture dynamic, evolving interests alongside the stable traits currently prioritized by the history-level masking strategies.

Summary updated

BibTeX
@inproceedings{huang2022mcp,
  author = {Zhaoheng Huang and Zhicheng Dou and Yutao Zhu and Zhengyi Ma},
  title = {{MCP: Self-supervised Pre-training for Personalized Chatbots with Multi-level Contrastive Sampling}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.findings-emnlp.73},
}
Figure