ControlLM: Crafting Diverse Personalities for Language Models

Yixuan Weng, Shizhu He, Kang Liu, Shengping Liu, Jun Zhao
2/15/2024
cs.CL

Official code: WENGSYX/ControlLM (21 stars, Apache-2.0, last commit 2024-11-06).

Abstract

As language models continue to scale in size and capability, they display an array of emerging behaviors, both beneficial and concerning. This heightens the need to control model behaviors. We hope to be able to control the personality traits of language models at the inference-time so as to have various character features, on top of which the requirements of different types of tasks can be met. Personality is a higher-level and more abstract behavioral representation for language models. We introduce ControlLM, which leverages differential activation patterns, derived from contrasting behavioral prompts in the model's latent space, to influence the model's personality traits at inference. This approach allows for the precise, real-time adjustment of model behavior. First, we demonstrate ControlLM's capacity to elicit diverse persona behaviors without any training, while precision control allows personality traits to closely match average human values. Subsequently, we showcase improved reasoning and question answering through selective amplification of beneficial attributes like conscientiousness and friendliness. We hope that this work will inspire research on controlling human-like behaviors of language models and provide insights for future research. Our code is publicly available at: https://github.com/wengsyx/ControlLM.

View on arXivView PDF

Code Implementations(1)

WENGSYX/ControlLMOfficial100%
Apache-2.0

ControlLM is a method to control the personality traits and behaviors of language models in real-time at inference without costly training interventions.

216PythonFeb 14, 20241 years agoApache-2.0

Similar Papers

Cite this paper

@article{weng2024controllm,
  title  = {ControlLM: Crafting Diverse Personalities for Language Models},
  author = {Yixuan Weng and Shizhu He and Kang Liu and Shengping Liu and Jun Zhao},
  year   = {2024},
  eprint = {2402.10151},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.10151v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.10151.svg)](https://codeofpaper.com/paper/2402.10151)

Discussion