Table of Contents
Fetching ...

HyCoRA: Hyper-Contrastive Role-Adaptive Learning for Role-Playing

Shihao Yang, Zhicong Lu, Yong Yang, Bo Lv, Yang Shen, Nayu Liu

TL;DR

HyCoRA tackles multi-character role-playing by balancing role-specific and shared traits via a Hyper-Half LoRA where a lightweight hyper-network generates a role-specific matrix A_sp and a shared matrix B_sh encodes common features. A hyper-contrastive learning objective further discriminates role signatures using responses as signals. Empirical results on English and Chinese benchmarks show HyCoRA outperforms shared and independent LoRA baselines, with competitive GPT-4 style evaluations and informative visual analyses supporting its ability to capture distinct persona traits. The framework offers a scalable, parameter-efficient approach to robust MCRP across languages, with ablations validating the contribution of each component.

Abstract

Multi-character role-playing aims to equip models with the capability to simulate diverse roles. Existing methods either use one shared parameterized module across all roles or assign a separate parameterized module to each role. However, the role-shared module may ignore distinct traits of each role, weakening personality learning, while the role-specific module may overlook shared traits across multiple roles, hindering commonality modeling. In this paper, we propose a novel HyCoRA: Hyper-Contrastive Role-Adaptive learning framework, which efficiently improves multi-character role-playing ability by balancing the learning of distinct and shared traits. Specifically, we propose a Hyper-Half Low-Rank Adaptation structure, where one half is a role-specific module generated by a lightweight hyper-network, and the other half is a trainable role-shared module. The role-specific module is devised to represent distinct persona signatures, while the role-shared module serves to capture common traits. Moreover, to better reflect distinct personalities across different roles, we design a hyper-contrastive learning mechanism to help the hyper-network distinguish their unique characteristics. Extensive experimental results on both English and Chinese available benchmarks demonstrate the superiority of our framework. Further GPT-4 evaluations and visual analyses also verify the capability of HyCoRA to capture role characteristics.

HyCoRA: Hyper-Contrastive Role-Adaptive Learning for Role-Playing

TL;DR

HyCoRA tackles multi-character role-playing by balancing role-specific and shared traits via a Hyper-Half LoRA where a lightweight hyper-network generates a role-specific matrix A_sp and a shared matrix B_sh encodes common features. A hyper-contrastive learning objective further discriminates role signatures using responses as signals. Empirical results on English and Chinese benchmarks show HyCoRA outperforms shared and independent LoRA baselines, with competitive GPT-4 style evaluations and informative visual analyses supporting its ability to capture distinct persona traits. The framework offers a scalable, parameter-efficient approach to robust MCRP across languages, with ablations validating the contribution of each component.

Abstract

Multi-character role-playing aims to equip models with the capability to simulate diverse roles. Existing methods either use one shared parameterized module across all roles or assign a separate parameterized module to each role. However, the role-shared module may ignore distinct traits of each role, weakening personality learning, while the role-specific module may overlook shared traits across multiple roles, hindering commonality modeling. In this paper, we propose a novel HyCoRA: Hyper-Contrastive Role-Adaptive learning framework, which efficiently improves multi-character role-playing ability by balancing the learning of distinct and shared traits. Specifically, we propose a Hyper-Half Low-Rank Adaptation structure, where one half is a role-specific module generated by a lightweight hyper-network, and the other half is a trainable role-shared module. The role-specific module is devised to represent distinct persona signatures, while the role-shared module serves to capture common traits. Moreover, to better reflect distinct personalities across different roles, we design a hyper-contrastive learning mechanism to help the hyper-network distinguish their unique characteristics. Extensive experimental results on both English and Chinese available benchmarks demonstrate the superiority of our framework. Further GPT-4 evaluations and visual analyses also verify the capability of HyCoRA to capture role characteristics.

Paper Structure

This paper contains 18 sections, 5 equations, 5 figures, 5 tables.

Figures (5)

  • Figure 1: (a) and (b) denote strategies employing a shared module across roles and independent modules assigned to each role, respectively. (c) refers to the HyCoRA proposed in this paper. HCL: Hyper-Contrastive Learning.
  • Figure 2: An illustration of our framework for MCRP. (a) We construct the Hyper-Half LoRA structure, where the role-specific matrix A is generated by a lightweight hyper-network, and the role-shared matrix B is implemented as a trainable matrix. (b) We introduce a hyper-contrastive learning mechanism that pulls role representations closer to response representations from the same role and pushes them away from those of different roles.
  • Figure 3: The trainable parameters for different methods.
  • Figure 4: Comparison of vector space distributions for different matrix configuration combinations. (a) Rsp A & Rsp B, (b) Mrs A & Rsp B, and (c) Rsp A & Mrs B.
  • Figure 5: Comparative case study of bilingual responses.