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

📄 arXiv: 2401.12474v1 📥 PDF

作者: Keming Lu, Bowen Yu, Chang Zhou, Jingren Zhou

分类: cs.CL, cs.LG

发布日期: 2024-01-23

🔗 代码/项目: GITHUB


💡 一句话要点

提出Ditto方法以增强大语言模型的角色扮演能力

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大语言模型 角色扮演 自对齐 对话系统 机器学习 开源技术 微调 跨监督对齐

📋 核心要点

  1. 现有方法主要依赖于模仿专有模型,难以充分挖掘开源LLMs的内在角色扮演能力。
  2. 本文提出的Ditto方法通过自对齐机制,利用角色知识生成角色对话训练集,提升LLMs的角色扮演能力。
  3. 实验结果表明,Ditto在多轮对话中保持角色一致性,超越所有开源基线,性能接近先进的专有聊天机器人。

📝 摘要(中文)

在增强开源大语言模型(LLMs)角色扮演能力的研究中,本文提出了Ditto自对齐方法,认为LLMs内在具备角色扮演能力。Ditto利用角色知识,鼓励LLMs模拟角色对话,构建了一个包含4000个角色的训练集,规模是现有数据集的十倍。通过对LLMs进行微调,Ditto在多轮角色对话中保持一致的角色身份,并提供准确的角色特定知识,表现优于所有开源基线,接近先进的专有聊天机器人。本文还首次进行了跨监督对齐实验,揭示了LLMs在角色扮演中的内在能力限制。

🔬 方法详解

问题定义:本文旨在解决开源大语言模型在角色扮演能力上的不足,现有方法依赖于模仿专有模型,未能充分利用LLMs的内在知识。

核心思路:Ditto方法通过自对齐机制,利用LLMs对角色和对话的知识,生成角色对话训练集,从而增强模型的角色扮演能力。

技术框架:整体流程包括角色知识的提取、角色对话训练集的构建、对LLMs的微调和评估。主要模块包括角色知识库、训练集生成器和微调模块。

关键创新:最重要的创新在于构建了一个包含4000个角色的自生成训练集,规模是现有数据集的十倍,且首次进行跨监督对齐实验,揭示了LLMs的内在能力限制。

关键设计:在训练过程中,采用特定的损失函数以优化角色一致性,并设计了适应多轮对话的网络结构,确保模型能够在对话中保持角色身份。

🖼️ 关键图片

img_0

📊 实验亮点

实验结果显示,Ditto在多轮角色对话中保持一致的角色身份,提供准确的角色特定知识,超越所有开源基线,且在不同参数规模下表现稳定,接近先进的专有聊天机器人,展示出显著的性能提升。

🎯 应用场景

该研究的潜在应用领域包括游戏开发、虚拟助手和教育等场景,能够为用户提供更具沉浸感和互动性的体验。未来,Ditto方法可能推动角色扮演技术在多种人机交互场景中的应用,提升用户体验和满意度。

📄 摘要(原文)

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.