PsychAdapter: Adapting LLM Transformers to Reflect Traits, Personality and Mental Health

Huy Vu, Huy Anh Nguyen, Adithya V Ganesan, Swanie Juhng, Oscar N. E. Kjell +6 more
12/22/2024
cs.AIcs.CL

No confident code implementation found for this paper.

Abstract

Artificial intelligence-based language generators are now a part of most people's lives. However, by default, they tend to generate "average" language without reflecting the ways in which people differ. Here, we propose a lightweight modification to the standard language model transformer architecture - "PsychAdapter" - that uses empirically derived trait-language patterns to generate natural language for specified personality, demographic, and mental health characteristics (with or without prompting). We applied PsychAdapters to modify OpenAI's GPT-2, Google's Gemma, and Meta's Llama 3 and found generated text to reflect the desired traits. For example, expert raters evaluated PsychAdapter's generated text output and found it matched intended trait levels with 87.3% average accuracy for Big Five personalities, and 96.7% for depression and life satisfaction. PsychAdapter is a novel method to introduce psychological behavior patterns into language models at the foundation level, independent of prompting, by influencing every transformer layer. This approach can create chatbots with specific personality profiles, clinical training tools that mirror language associated with psychological conditionals, and machine translations that match an authors reading or education level without taking up LLM context windows. PsychAdapter also allows for the exploration psychological constructs through natural language expression, extending the natural language processing toolkit to study human psychology.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{vu2024psychadapter,
  title  = {PsychAdapter: Adapting LLM Transformers to Reflect Traits, Personality and Mental Health},
  author = {Huy Vu and Huy Anh Nguyen and Adithya V Ganesan and Swanie Juhng and Oscar N. E. Kjell and Joao Sedoc and Margaret L. Kern and Ryan L. Boyd and Lyle Ungar and H. Andrew Schwartz and Johannes C. Eichstaedt},
  year   = {2024},
  eprint = {2412.16882},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.16882v2}
}

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/2412.16882.svg)](https://codeofpaper.com/paper/2412.16882)

Discussion