The Language Model Can Have the Personality: Joint Learning for Personality Enhanced Language Model (Student Abstract)

Tianyi Chen, Feiqi Cao, Yihao Ding, Soyeon Caren Han

Introduction

While Large Language Models (LLMs) are increasingly capable of complex reasoning, they often lack a consistent "persona," leading to interactions that feel hollow or contradictory. Traditional methods like "persona-prompting"—injecting a brief bio into a prompt—often fail to produce deep, consistent behavioral traits. This paper introduces the Personality-Enhanced Language Model (PELM), a framework designed to bake human-like traits directly into the model's architecture through joint training on text generation and personality classification.

Methodology: Joint Learning and Cross-Teaching

The core of PELM is a "joint learning and cross-teaching" structure that synchronizes a generative Language Model (LM) with a personality Classifier.

The PELM architecture featuring joint learning through parameter sharing.

As illustrated in the architecture diagram, the system consists of two primary modules:

  1. Language Model (LM): A transformer-based decoder (e.g., GPT-2) optimized for next-token prediction.
  2. Classifier: A transformer-based encoder (e.g., BERT) designed to predict personality types.

The critical innovation is Parameter Sharing. The weights of the language model ($W_{lm}$) and the classifier ($W_{cls}$) are kept identical. During training, these shared weights are updated twice per cycle—once for generation and once for classification. This forces the model to develop internal linguistic representations that are inherently tied to specific personality traits. The optimization uses a joint loss function: $L_{joint} = L_{lm} + \gamma \times L_{cls}$, where $\gamma$ (set to 0.25) balances the two tasks.

Evaluation Framework

The researchers utilized the MBTI Dataset (sourced from Kaggle), which categorizes text into 16 personality types. To measure success beyond standard metrics, they introduced the P-Index. This metric uses TF-IDF to identify keywords unique to specific MBTI types and calculates their frequency in the model's output, providing a quantitative measure of "personality density."

Key Results

The PELM framework demonstrated significant improvements over vanilla BERT and GPT-2 baselines in both classification accuracy and personality expression.

Quantitative performance comparison across BERT and GPT-2 backbones.

As shown in the experimental results, the GPT-2 based PELM achieved a classification F1-score of 61.05%, up from 59.56% in the baseline. More importantly, the P-Index rose from 47.4 to 50.0, indicating a higher density of personality-aligned vocabulary. Qualitatively, when tasked with an ISFJ ("The Protector") persona, PELM moved away from generic inquiries toward warm, relationship-focused language, such as: "Love is a mighty power as it can become so powerful that it consumes even the strongest of people."

Conclusion and Future Directions

PELM demonstrates that personality can be treated as a latent feature of language rather than just an external prompt. By forcing the model to share weights between generation and classification, the AI produces text that more accurately reflects specific human temperaments. Future research is needed to scale this approach to larger models, explore more robust personality frameworks like the "Big Five," and evaluate long-term persona consistency in multi-turn dialogues.

Summary updated

Abstract

With the introduction of large language models, chatbots are becoming more conversational to communicate effectively and capable of handling increasingly complex tasks. To make a chatbot more relatable and engaging, we propose a new language model idea that maps the human-like personality. In this paper, we propose a systematic Personality-Enhanced Language Model (PELM) approach by using a joint learning mechanism of personality classification and language generation tasks. The proposed PELM leverages a dataset of defined personality typology, Myers-Briggs Type Indicator, and produces a Personality-Enhanced Language Model by using a joint learning and cross-teaching structure consisting of a classification and language modelling to incorporate personalities via both distinctive types and textual information. The results show that PELM can generate better personality-based outputs than baseline models.
BibTeX
@inproceedings{chen2024language,
  author = {Tianyi Chen and Feiqi Cao and Yihao Ding and Soyeon Caren Han},
  title = {{The Language Model Can Have the Personality: Joint Learning for Personality Enhanced Language Model (Student Abstract)}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i21.30426},
}
Figure