Large Language Models are Superpositions of All Characters: Attaining Arbitrary Role-play via Self-Alignment

Keming Lu, Bowen Yu, Chang Zhou, Jingren Zhou

arXiv:2401.12474 · 2026-07-27 공개 · arXiv · PDF

instruction-following llm-finetuning mt-bench open-source-llm role-play reading-comprehension self-alignment character-knowledge

Abstract

Considerable efforts have been invested in augmenting the role-playing proficiency of open-source large language models (LLMs) by emulating proprietary counterparts. Nevertheless, we posit that LLMs inherently harbor role-play capabilities, owing to the extensive knowledge of characters and potential dialogues ingrained in their vast training corpora. Thus, in this study, we introduce Ditto, a self-alignment method for role-play. Ditto capitalizes on character knowledge, encouraging an instruction-following LLM to simulate role-play dialogues as a variant of reading comprehension. This method creates a role-play training set comprising 4,000 characters, surpassing the scale of currently available datasets by tenfold regarding the number of roles. Subsequently, we fine-tune the LLM using this self-generated dataset to augment its role-playing capabilities. Upon evaluating our meticulously constructed and reproducible role-play benchmark and the roleplay subset of MT-Bench, Ditto, in various parameter scales, consistently maintains a consistent role identity and provides accurate role-specific knowledge in multi-turn role-play conversations. Notably, it outperforms all open-source role-play baselines, showcasing performance levels comparable to advanced proprietary chatbots. Furthermore, we present the first comprehensive cross-supervision alignment experiment in the role-play domain, revealing that the intrinsic capabilities of LLMs confine the knowledge within role-play. Meanwhile, the role-play styles can be easily acquired with the guidance of smaller models. We open-source related resources at https://github.com/OFA-Sys/Ditto.

한국어 요약

한 줄 요약

Ditto는 4,000개 캐릭터를 기반으로 생성된 자체 학습 데이터셋을 통해 LLM의 역할극 능력을 향상시키는 자가 정렬 방법이다.

핵심 기여도

핵심 아이디어

Ditto는 LLM이 대규모 텍스트 학습을 통해 이미 다양한 캐릭터의 대화 스타일과 지식을 내재하고 있다고 가정한다. 이에 따라, 역할극 대화를 "읽기 이해" 문제로 변환하여 LLM이 자체적으로 역할극 데이터를 생성하고 학습하도록 유도한다. 두 단계의 정렬 과정을 통해 역할 정보를 점진적으로 숨겨가며, LLM이 내재된 캐릭터 지식을 자동으로 발현하도록 유도한다.

첫 번째 단계에서는 캐릭터의 속성과 프로필을 제공하고, 두 번째 단계에서는 이름만 주어 역할 일관성을 유지하도록 강화 학습한다. 이는 LLM이 역할극을 수행할 때 내재된 캐릭터 지식을 활용하도록 유도하는 핵심 아이디어이다.

기술적 접근법

주요 결과

의의 및 한계

Ditto는 역할극 모델 개발에서 기존의 GPT-4 등 프로퍼티 모델의 역할극 능력을 모방하는 방식을 탈피하여, LLM이 자체적으로 역할극 능력을 학습할 수 있음을 입증하였다. 특히, 4,000개 캐릭터를 기반으로 생성된 WikiRole 데이터셋은 역할극 분야에서 최대 규모를 자랑하며, 역할극 평가를 객관적이고 재현 가능한 방식으로 구현한 점에서 의의가 있다.

그러나, 역할 관련 지식은 LLM의 내재된 지식 범위에 제약을 받으며, 역할 스타일은 작은 모델에서도 잘 학습될 수 있다는 한계도 드러냈다. 또한, Qwen-72B-Chat은 역할 일관성은 높지만, 역할 관련 지식 정확도는 GPT-4나 Qwen-Max보다 낮아, 역할극 성능 향상을 위해서는 강력한 기초 모델이 필수적임을 시사한다.

실용적 활용

Ditto는 대규모 역할극 데이터셋을 생성하지 않고도 역할극 능력을 향상시킬 수 있어, 캐릭터 기반 챗봇, 게임 내 NPC 대화 시스템, 고객 서비스 챗봇 등 다양한 산업 분야에서 활용 가능하다. 또한, 역할극 평가 방식은 다른 생성형 AI 분야에서도 재현 가능한 평가 기준을 제시할 수 있다.