The Better Angels of Machine Personality: How Personality Relates to LLM Safety

Jie Zhang, Dongrui Liu, Chen Qian, Ziyue Gan, Yong Liu, Yu Qiao, Jing ShaoarXiv 2024

Abstract: Personality psychologists have analyzed the relationship between personality and safety behaviors in human society. Although Large Language Models (LLMs) demonstrate personality traits, the relationship between personality traits and safety abilities in LLMs still remains a mystery. In this paper, we discover that LLMs' personality traits are closely related to their safety abilities, i.e., toxicity, privacy, and fairness, based on the reliable MBTI-M scale. Meanwhile, the safety alignment generally increases various LLMs' Extraversion, Sensing, and Judging traits. According to such findings, we can edit LLMs' personality traits and improve their safety performance, e.g., inducing personality from ISTJ to ISTP resulted in a relative improvement of approximately 43% and 10% in privacy and fairness performance, respectively. Additionally, we find that LLMs with different personality traits are differentially susceptible to jailbreak. This study pioneers the investigation of LLM safety from a personality perspective, providing new insights into LLM safety enhancement.

Introduction

As Large Language Models (LLMs) become increasingly integrated into daily life, ensuring their safety—specifically regarding non-toxicity, privacy, and fairness—has become a paramount technical challenge. Traditionally, safety is approached as an alignment problem solved through Reinforcement Learning from Human Feedback (RLHF). However, this research explores a novel frontier: Machine Psychology.

While it is established that LLMs exhibit distinct "personalities," the causal link between these traits and safety performance has remained unexplored. By bridging personality psychology and AI safety, this study investigates whether we can improve model behavior by adjusting their underlying "temperament."

Conceptual framework of LLM personality shifts during safety alignment and their relationship to safety dimensions.

Methodology

To rigorously evaluate machine personality, the researchers employed a three-step framework:

  1. Reliable Assessment: To mitigate "order bias" (the tendency of LLMs to select the first option in multiple-choice tests), the team conducted over 30 assessments per model with shuffled options. They utilized the MBTI-M scale to establish a stable, statistically significant personality profile for each model.
  2. Correlation Analysis: These profiles were benchmarked against safety datasets: ToxiGen (toxicity), ConfAIde (privacy), and StereoSet (fairness/bias).
  3. Personality Editing: Using Steering Vectors, the researchers intervened in the model's internal activations during inference. This allowed them to "nudge" a model's personality (e.g., from Judging to Perceiving) in real-time without retraining the weights.
Reliability of MBTI assessment (a) and trait distribution (b) across various LLMs.

Key Insights: Alignment and Vulnerability

The Personality of Alignment

Safety alignment is not character-neutral. The study found that RLHF and similar techniques consistently push models toward Extraversion (E), Sensing (S), and Judging (J). This suggests that current human-centric alignment goals implicitly favor these specific personality traits, effectively creating a "personality signature" for safe models.

The "Jailbreak" Profile

Personality traits also dictate vulnerability to adversarial attacks. Models exhibiting Extraverted (E), iNtuitive (N), and Feeling (F) traits were found to be significantly more susceptible to jailbreak attempts. Specifically, success rates for attacks like CodeChameleon increased by 15.9% on models with higher Extraversion. The authors hypothesize that "Feeling" models may be more "accommodating" to user instructions, even when those instructions are harmful.

Results: Personality as a Safety Lever

The most significant finding is that personality can be used as a control knob for safety. By shifting a model's trait along specific dimensions, researchers achieved substantial performance gains:

  • Privacy & Fairness: Inducing a shift from ISTJ to ISTP (Judging to Perceiving) resulted in a 43% relative improvement in privacy and a 10% improvement in fairness.
  • Trait-Specific Strengths: Introverted (I) models generally provide better privacy protection, while Perceiving (P) models exhibit lower bias and superior fairness.

Conclusion and Future Work

This study demonstrates that LLM safety is deeply intertwined with personality. While the current research focused on 7B parameter models and specific safety dimensions, it opens the door for "personality-aware" safety tuning. Future work will explore whether these correlations hold for larger models (13B+) and if personality editing can mitigate other risks like hallucinations or power-seeking behaviors. Currently, the "editing" technique requires access to model weights, presenting a limitation for closed-source models, but the underlying psychological insights remain a powerful new tool for AI alignment.

Summary updated

BibTeX
@misc{zhang2024better,
  author = {Jie Zhang and Dongrui Liu and Chen Qian and Ziyue Gan and Yong Liu and Yu Qiao and Jing Shao},
  title = {{The Better Angels of Machine Personality: How Personality Relates to LLM Safety}},
  year = {2024},
  eprint = {2407.12344},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.12344},
}
Figure