Thinking in Character: Advancing Role-Playing Agents with Role-Aware Reasoning

Yihong Tang, Kehai Chen, Muyun Yang, Zheng-Yu Niu, Jing Li, Tiejun Zhao, Min Zhang

Introduction

Role-Playing Agents (RPAs) have traditionally focused on mimicking dialogue patterns, often resulting in superficial interactions that lack a consistent internal logic or "soul." While Large Language Models (LLMs) are adept at imitation, they frequently struggle with attention diversion—where the model reverts to a generic assistant mode to solve a task—and style drift, where the internal reasoning becomes overly robotic and structured, clashing with the character's persona.

To address these challenges, this paper introduces Role-Aware Reasoning (RAR). RAR is a framework designed to imbue agents with character-consistent internal thought processes, ensuring that their responses are not only factually accurate but also deeply rooted in their unique emotional and motivational profiles.

The Role-Aware Reasoning (RAR) Framework

The RAR method operates through two primary stages designed to anchor the model's reasoning within its designated role:

  1. Role Identity Activation (RIA): This stage explicitly injects core character traits—emotions, experiences, standpoints, and motivations—into the reasoning process. By using a structured prompt that requires the model to reflect on its character profile before planning a response, RIA prevents the model from defaulting to a generic assistant persona.
  2. Reasoning Style Optimization (RSO): To mitigate robotic "style drift," RSO employs contrastive learning. The model is trained to distinguish between Logic scenarios (requiring factual reasoning) and Story scenarios (requiring character-driven reasoning). This allows the model to dynamically switch its internal "voice" based on the context, maintaining a witty or informal tone when appropriate for the character.
Overview of the RAR framework addressing attention diversion and style drift

These capabilities are distilled from a high-capacity teacher model (Qwen2-32B) into a more efficient student model (LLaMA-3-8B), making sophisticated role-playing more accessible.

Experimental Evaluation

The authors evaluated RAR using several comprehensive benchmarks:

  • RoleBench-Train: A training set of ~168,000 samples across 95 diverse characters.
  • SocialBench: A measure of social intelligence, including emotion detection and situational understanding.
  • CharacterBench: A generative benchmark with 22,859 human-annotated samples measuring 11 dimensions like memory consistency and human-likeness.

Key Results

RAR significantly outperformed specialized role-playing models such as Neeko and Character-GLM. On CharacterBench, RAR achieved the highest average score of 3.69, showing particularly strong performance in Memory Consistency and Behavior Consistency. This suggests that the RIA module successfully anchors the model's identity throughout the interaction.

Performance comparison on CharacterBench across 11 dimensions

On SocialBench, RAR led with an average score of 65.4, excelling in Role Knowledge and Role Style. Ablation studies further confirmed that removing RIA led to the most significant declines in "Human-likeness" and "Engagement," highlighting the necessity of a strong character core for believable agents.

Insights and Future Work

The core contribution of this research is the realization that reasoning is a tool for persona maintenance. A character's internal monologue acts as a cognitive anchor. However, the authors noted that simply increasing the amount of reasoning (e.g., "MoreThink") without character constraints can actually hurt performance by leading to off-topic responses.

Future work will focus on reducing dependency on teacher models, capturing finer-grained nuances in complex personas, and integrating RAR with more robust long-term memory systems to maintain consistency over extended interactions.

Summary updated

BibTeX
@inproceedings{tang2025thinking,
  author = {Yihong Tang and Kehai Chen and Muyun Yang and Zheng-Yu Niu and Jing Li and Tiejun Zhao and Min Zhang},
  title = {{Thinking in Character: Advancing Role-Playing Agents with Role-Aware Reasoning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=geNdDlzKTG},
}
Figure