Table of Contents
Fetching ...

Identity-Driven Hierarchical Role-Playing Agents

Libo Sun, Siyuan Wang, Xuanjing Huang, Zhongyu Wei

TL;DR

This work tackles the challenge of balancing flexibility and fidelity in role-playing agents by introducing the Hierarchical Identity Role-Playing Framework (HIRPF), which constructs roles from personality traits and professions using identity isolation and explicit control. The framework leverages LoRA-based identity adapters and a structured routing mechanism to fuse multiple identities while maintaining autonomy of each identity module. A dedicated Identity Dialogue Dataset (20,685 multi-turn dialogues) and the Identity-Eval benchmark (scale tests for personality and profession, plus open-ended situational tests) support systematic evaluation of identity-level fidelity and multi-identity integration. Empirical results show improved identity-fitting performance over prompt-based baselines and competitive results against ChatGPT on several metrics, highlighting potential for social simulation and demographic-focused studies. Limitations include reliance on synthetic data generation and future work aims to augment realism with real conversations and retrieval-based personalization to advance identity-aware agents further.

Abstract

Utilizing large language models (LLMs) to achieve role-playing has gained great attention recently. The primary implementation methods include leveraging refined prompts and fine-tuning on role-specific datasets. However, these methods suffer from insufficient precision and limited flexibility respectively. To achieve a balance between flexibility and precision, we construct a Hierarchical Identity Role-Playing Framework (HIRPF) based on identity theory, constructing complex characters using multiple identity combinations. We develop an identity dialogue dataset for this framework and propose an evaluation benchmark including scale evaluation and open situation evaluation. Empirical results indicate the remarkable efficacy of our framework in modeling identity-level role simulation, and reveal its potential for application in social simulation.

Identity-Driven Hierarchical Role-Playing Agents

TL;DR

This work tackles the challenge of balancing flexibility and fidelity in role-playing agents by introducing the Hierarchical Identity Role-Playing Framework (HIRPF), which constructs roles from personality traits and professions using identity isolation and explicit control. The framework leverages LoRA-based identity adapters and a structured routing mechanism to fuse multiple identities while maintaining autonomy of each identity module. A dedicated Identity Dialogue Dataset (20,685 multi-turn dialogues) and the Identity-Eval benchmark (scale tests for personality and profession, plus open-ended situational tests) support systematic evaluation of identity-level fidelity and multi-identity integration. Empirical results show improved identity-fitting performance over prompt-based baselines and competitive results against ChatGPT on several metrics, highlighting potential for social simulation and demographic-focused studies. Limitations include reliance on synthetic data generation and future work aims to augment realism with real conversations and retrieval-based personalization to advance identity-aware agents further.

Abstract

Utilizing large language models (LLMs) to achieve role-playing has gained great attention recently. The primary implementation methods include leveraging refined prompts and fine-tuning on role-specific datasets. However, these methods suffer from insufficient precision and limited flexibility respectively. To achieve a balance between flexibility and precision, we construct a Hierarchical Identity Role-Playing Framework (HIRPF) based on identity theory, constructing complex characters using multiple identity combinations. We develop an identity dialogue dataset for this framework and propose an evaluation benchmark including scale evaluation and open situation evaluation. Empirical results indicate the remarkable efficacy of our framework in modeling identity-level role simulation, and reveal its potential for application in social simulation.
Paper Structure (41 sections, 1 equation, 7 figures, 5 tables)

This paper contains 41 sections, 1 equation, 7 figures, 5 tables.

Figures (7)

  • Figure 1: Individuals possess various identities that shape their unique characteristics and interactions. Shared identities often foster commonalities, while differing identities highlight diversity.
  • Figure 2: Structure of Hierarchical Identity Role-Playing Framework (HIRPF). HIRPF ensures identity isolation via intra-level and inter-level separation and uses control routers in each block to update only activated identities during training, maintaining distinct identity training. The figure shows an example of the fine-tuning process, where $L$ represents the total number of blocks of the backbone model.
  • Figure 3: Scale results for single trait simulations. Compared with models with the same magnitude number of parameters using prompt strategies, our method can achieve more obvious simulation of personality trait tendencies. Compared with ChatGPT, our method has a more obvious fitting effect on most traits, especially on negative traits (low agreeableness, low conscientiousness, low extraversion, etc.).
  • Figure 4: Scale results for single profession simulation. Compared to other prompt-based models, our model's professional agents perform best in their corresponding profession and score lower on unrelated professional field questions. This demonstrates our method's fidelity in simulating specific professions while clearly distinguishing between different professional identities.
  • Figure 5: Identification accuracy declines as the number of assigned identities increases. Despite this trend, our model shows a more gradual decrease and maintains the second-highest accuracy behind ChatGPT for more than two identities. This indicates our model's effective capability in integrating multiple identities.
  • ...and 2 more figures