Table of Contents
Fetching ...

Neuron-based Personality Trait Induction in Large Language Models

Jia Deng, Tianyi Tang, Yanbin Yin, Wenhao Yang, Wayne Xin Zhao, Ji-Rong Wen

TL;DR

This paper proposes an efficient method for identifying personality-related neurons within LLMs by examining the opposite aspects of a given trait and develops a simple yet effective induction method that manipulates the values of these identified personality-related neurons.

Abstract

Large language models (LLMs) have become increasingly proficient at simulating various personality traits, an important capability for supporting related applications (e.g., role-playing). To further improve this capacity, in this paper, we present a neuron-based approach for personality trait induction in LLMs, with three major technical contributions. First, we construct PersonalityBench, a large-scale dataset for identifying and evaluating personality traits in LLMs. This dataset is grounded in the Big Five personality traits from psychology and is designed to assess the generative capabilities of LLMs towards specific personality traits. Second, by leveraging PersonalityBench, we propose an efficient method for identifying personality-related neurons within LLMs by examining the opposite aspects of a given trait. Third, we develop a simple yet effective induction method that manipulates the values of these identified personality-related neurons. This method enables fine-grained control over the traits exhibited by LLMs without training and modifying model parameters. Extensive experiments validate the efficacy of our neuron identification and trait induction methods. Notably, our approach achieves comparable performance as fine-tuned models, offering a more efficient and flexible solution for personality trait induction in LLMs. We provide access to all the mentioned resources at https://github.com/RUCAIBox/NPTI.

Neuron-based Personality Trait Induction in Large Language Models

TL;DR

This paper proposes an efficient method for identifying personality-related neurons within LLMs by examining the opposite aspects of a given trait and develops a simple yet effective induction method that manipulates the values of these identified personality-related neurons.

Abstract

Large language models (LLMs) have become increasingly proficient at simulating various personality traits, an important capability for supporting related applications (e.g., role-playing). To further improve this capacity, in this paper, we present a neuron-based approach for personality trait induction in LLMs, with three major technical contributions. First, we construct PersonalityBench, a large-scale dataset for identifying and evaluating personality traits in LLMs. This dataset is grounded in the Big Five personality traits from psychology and is designed to assess the generative capabilities of LLMs towards specific personality traits. Second, by leveraging PersonalityBench, we propose an efficient method for identifying personality-related neurons within LLMs by examining the opposite aspects of a given trait. Third, we develop a simple yet effective induction method that manipulates the values of these identified personality-related neurons. This method enables fine-grained control over the traits exhibited by LLMs without training and modifying model parameters. Extensive experiments validate the efficacy of our neuron identification and trait induction methods. Notably, our approach achieves comparable performance as fine-tuned models, offering a more efficient and flexible solution for personality trait induction in LLMs. We provide access to all the mentioned resources at https://github.com/RUCAIBox/NPTI.

Paper Structure

This paper contains 28 sections, 4 equations, 6 figures, 19 tables.

Figures (6)

  • Figure 1: The overall workflow of our proposed approach NPTI. The left diagram first illustrates how to induce opposite aspects of the same personality trait (e.g., extroversion and introversion) through prompts to address situational questions from PersonalityBench, while calculating the activation probabilities of neurons. We then calculate the differences in these probabilities between opposing responses to identify the neurons governing specific personality dimensions. Further, the right diagram illustrates how to activate neurons associated with one aspect while deactivating those associated to the opposing trait, thereby effectively altering the model's personality.
  • Figure 2: Flowchart for constructing PersonalityBench.
  • Figure 3: Results of ablation experiment on LLaMA-3-8B-Instruct. A "$+$" in these figures denotes the positive aspect of the corresponding personality trait, while a "$-$" indicates the negative aspect. The purple line represents the values we ultimately selected.
  • Figure 4: Combined visualization of neuron distribution and related neuron value distribution.
  • Figure 5: A "$+$" in these figures denotes the positive aspect of the corresponding personality trait, while a "$-$" indicates the negative aspect. The purple line represents the final chosen gamma, while the green line indicates the fluency scores of the prompt induction method.
  • ...and 1 more figures