Abstract
Current approaches to role-playing AI often rely on distilling outputs from proprietary models like GPT-4, which can lead to stylistic mimicry at the expense of factual accuracy. This paper, presented at ACL 2024, introduces DITTO, a self-alignment method based on the hypothesis that Large Language Models (LLMs) are "superpositions" of characters encountered during pre-training. By utilizing a three-stage pipeline—Knowledge Collection, Dialogue Simulation, and Supervised Fine-Tuning—DITTO enables LLMs to unlock their latent role-play capabilities using internal knowledge. Our results show that DITTO-72B significantly outperforms existing open-source baselines and achieves performance comparable to GPT-3.5-Turbo in consistency and factuality.
Introduction
The prevailing paradigm for building role-playing LLMs involves fine-tuning on dialogues generated by high-performing proprietary models. While effective for capturing tone, this "imitation" strategy often results in models that hallucinate character-specific facts. Furthermore, reliance on external "teacher" models is costly and limited by restrictive terms of use.
We propose that LLMs already possess the necessary character knowledge within their weights. The challenge is not teaching them new characters, but rather providing a mechanism to "collapse" the model's internal superposition of personas into a single, coherent identity. DITTO (Dialogue-based Internal-knowledge Tuning for Task-Oriented role-play) addresses this by framing role-play as a self-alignment task grounded in factual reading comprehension.
The DITTO Framework
DITTO follows a systematic three-stage process to transition a base LLM into a proficient role-player:
- Character Knowledge Collection: Profiles for approximately 4,000 characters are extracted from Wikidata and Wikipedia, providing a factual foundation for training.
- Dialogue Simulation: To avoid external distillation, the LLM itself generates training data. This includes "role-specific" queries (internal knowledge retrieval) and "contrastive" queries (testing boundaries by asking about unrelated characters). The model generates responses while having access to the character's full profile to ensure grounding.
- Supervised Fine-Tuning (SFT): The model is fine-tuned on these simulated dialogues. During SFT, the external profiles are removed, forcing the model to rely solely on its internal parameters to maintain the persona.
Datasets and Evaluation
We introduce WIKIROLE, a large-scale dataset featuring 3,902 characters and over 36,000 dialogue turns—significantly larger than previous open-source role-play datasets. To evaluate performance, we utilize WIKIROLEEVAL, which assesses models across three critical dimensions:
- Consistent Role Identity: Maintaining persona over multi-turn interactions.
- Accurate Role-Related Knowledge: Factual correctness regarding the character's history.
- Unknown Question Rejection: The ability to refuse answering questions outside the character's scope (e.g., historical figures discussing modern technology).
Experimental Results
Our evaluation demonstrates that DITTO significantly enhances the role-playing capabilities of base models across various scales (1.8B to 72B parameters).
As shown in the results table, DITTO-72B achieves a 90% consistency score, significantly outperforming open-source models like OpenChat-3.5 and Mistral-7B. Notably, it also surpasses specialized baselines such as CharacterGLM and Xingchen in factual accuracy. When compared to proprietary models, DITTO-72B performs on par with GPT-3.5-Turbo across most metrics, though it remains behind state-of-the-art models like GPT-4 and Qwen-Max in raw knowledge depth.
Discussion and Insights
The Superposition Hypothesis
The success of DITTO supports the view that pre-trained LLMs are superpositions of all characters they have encountered during pre-training. Fine-tuning acts as a mechanism to "collapse" this superposition into a specific, sharp identity.
Knowledge Boundedness and Weak-to-Strong Generalization
A key finding is that role-play factuality is strictly limited by the base model's pre-existing knowledge. While style can be imitated, factual knowledge cannot be easily distilled into a smaller model if it wasn't present during pre-training. However, we observed a "weak-to-strong" effect where even data from smaller models can help larger models unlock their own latent, high-quality knowledge.
Conclusion and Limitations
DITTO provides a robust, self-sufficient path for developing role-playing LLMs without relying on proprietary teachers. While highly effective, the method is limited by the "knowledge ceiling" of the base model; it cannot role-play characters not present in its pre-training data without external context. Future work will focus on reducing noise in self-generated data and improving safety alignment for role-specific personas.
Summary updated