CogDual: Dual-Cognition RPLA Framework
- CogDual is a role-playing framework that first generates explicit cognitive traces to improve character consistency in dialogue.
- It employs dual cognition by clearly separating situational awareness from self-awareness, enabling structured and context-aware responses.
- The system combines supervised fine-tuning with reinforcement learning using ICLG and LSA rewards to boost narrative quality and fidelity.
CogDual is a role-playing language agent (RPLA) framework that makes character responses arise from an explicit cognitive process rather than from direct next-utterance imitation alone. It adopts a “cognize-then-respond” paradigm in which the model first generates a structured cognitive state and only then produces the dialogue turn, with the stated aim of improving character consistency and contextual alignment in multi-party dialogue. In its full form, CogDual combines supervised fine-tuning with reinforcement learning based on two implicit rule-based rewards, and it is evaluated primarily on CoSER, with additional transfer results on Cross-MR and LifeChoice (Liu et al., 23 Jul 2025).
1. Problem setting and motivation
CogDual is formulated for multi-party dialogue with a character set
An LLM is tasked with simulating a target character given the character profile , a global scene description , the set of scene participants , and dialogue history . Rather than directly generating the next utterance, CogDual reformulates inference so that, at each turn, the model first produces an explicit cognitive state and then the response :
The framework is motivated by a specific diagnosis of prior RPLA methods. Prompt engineering can elicit style or simple reasoning, but often remains shallow and ad hoc; even standard chain-of-thought may drift away from character-consistent behavior. Supervised fine-tuning on role-playing data teaches imitation of outputs, but not necessarily the latent process by which a character interprets a scene, reasons about others, reflects on self, and then responds. The paper also identifies a recurrent failure mode in reasoning-augmented role play: stylistic drift, in which generic reasoning improves task solving while weakening immersion, persona fidelity, or narrative coherence (Liu et al., 23 Jul 2025).
CogDual therefore targets a narrower but technically consequential objective than generic dialogue quality. Its goal is to model awareness of the situation, interpretation of other agents, and self-reflection on memory, emotion, and intention as explicit intermediate structure. This makes the method a response to what the paper treats as a cognitive omission in earlier role-playing systems, rather than merely a prompting or scaling deficiency.
2. Dual cognition and the cognize-then-respond paradigm
The core innovation is “dual cognition,” defined as a structured progression from external situational awareness to internal self-awareness before overt response generation. The intended causal order is external world perception, interpretation of others, inward self-reflection, and then response. This structure is presented as a more psychologically plausible simulation of human-like behavior generation.
| Cognitive layer | Components | Function |
|---|---|---|
| Situational awareness | EP, BA, EA, IA | Perceive scene and interpret others |
| Self-awareness | KMA, SE, SI, IS | Activate memory, emotion, intention, and strategy |
Situational awareness is represented as
0
where EP denotes Environmental Perception, BA Behavior Analysis, EA Emotion Analysis, and IA Intention Analysis. This is the outward-facing layer: atmosphere, spatial configuration, interruptions, visible changes, temporal dynamics, what other characters are doing or saying, what they are feeling, and what they likely intend.
Self-awareness is represented as
1
where KMA denotes Key Memory Activation, SE Self-Emotion, SI Self-Intention, and IS Internal Strategy. This is the inward-facing layer: relevant autobiographical or episodic memory, current internal emotions, present goals, and the integrated reasoning or planning state that turns memory, emotion, and goals into a tactical response plan.
In practical generation, the model emits structured cognition—typically in a JSON-like form—before the final reply. The supervised target format contains fields such as situational_awareness, environmental_perception, others_perception, behavior, emotion, intentions, self_awareness, key_memory, current_emotions, perceived_intentions, and internal_thought. The paper also introduces a prompting-only realization, CB-CoT, which uses the same dual-cognition scaffold without parameter updates (Liu et al., 23 Jul 2025).
A common misconception is to equate CogDual with generic chain-of-thought. The framework is narrower: reasoning is constrained into a psychologically motivated decomposition rather than being left as unconstrained verbal rationale. The paper’s claim is not merely that “more reasoning helps,” but that the type and order of reasoning matter for role-consistent action.
3. Supervision pipeline and trainable system
CogDual has two realizations: the prompting-only CB-CoT variant and a trainable two-stage system based on supervised fine-tuning followed by reinforcement learning. The trainable system begins by constructing dual-cognition supervision data from CoSER.
The source corpus is described as role-playing scenes from 771 novels with 17,966 characters and over 300k instances. From this resource, 400 unique characters are sampled and all associated scenes are gathered. GPT-4o is then used to filter scenes for “cognitive relevance,” yielding a subset 2 with 38,724 instances. For each instance, four cognitive trajectories are sampled, where a trajectory is 3, with 4 the cognitive trace and 5 the target response. Generation uses stochastic prompting with 50% first-person reasoning and 50% third-person reasoning. Outputs must satisfy a required structure, with cognitive content in tags such as > or <cognitive> and the response in <answer>. The trajectories are then filtered in two stages: a format-and-field check followed by GPT-4o verification that each cognitive field aligns with character background and dialogue context. The final supervised dataset 6 contains 17,762 examples (Liu et al., 23 Jul 2025).
Stage 1 training uses standard next-token negative log-likelihood:
7
where 8 is the policy of 9, 0, and 1 is the concatenated cognition-plus-response target. This stage teaches the model to emit dual cognition and response jointly.
The paper reports the following Stage-1 SFT settings for LLaMA3.1-8B-Instruct and Qwen2.5-7B-Instruct: batch size 64, learning rate 2, maximum sequence length 10240, and 2 epochs. Main experiments use LLaMA3.1-8B-Instruct, Qwen2.5-7B-Instruct, and LLaMA3.1-70B-Instruct as open-source base models; prompting-only CB-CoT is additionally tested on GPT-3.5-Turbo-0613, GPT-4o, and o1-Preview.
4. Reinforcement learning with implicit rule-based rewards
After SFT, CogDual applies reinforcement learning to improve generalization and sharpen the usefulness of the cognitive trace. The paper explicitly distinguishes this stage from RLHF with a learned reward model, from pairwise preference learning, from LLM-judge rewards during RL, and from explicit symbolic verifiers. Instead, it defines two mathematically specified implicit rule-based rewards and optimizes the policy with GRPO.
The first reward is Inference-Conditioned Likelihood Gain (ICLG), which measures whether the model’s own generated cognition 3 increases the likelihood of the gold response 4 relative to conditioning only on the original input 5:
6
The intended interpretation is causal support: if the cognition materially helps produce the correct response, the reward increases.
The second reward is Latent Semantic Alignment (LSA), which measures semantic closeness between the generated response 7 and the reference response 8 in the hidden state space of a frozen SFT reference policy 9:
0
with
1
This reward is intended to preserve semantic fidelity without forcing lexical identity.
The two rewards are combined linearly:
2
with the main setting
3
Rewards are normalized within the minibatch by batch-wise 4-score normalization to obtain an estimated advantage, and the policy is updated with a clipped GRPO-style objective with KL regularization to a frozen reference policy (Liu et al., 23 Jul 2025).
For both 8B and 7B models, the RL settings are learning rate 5, training batch size 8, forward batch size 128, KL coefficient 0.001, maximum length 8192, sampling temperature 0.7, clip range 0.2, and 120 training steps. Sixteen response trajectories are sampled per prompt. The RL prompt set 6 consists of 10,000 prompts sampled from 7, broader than 8 in order to improve stability and generalization.
The paper’s interpretation of the two rewards is explicitly complementary. ICLG is associated with causal coherence, storyline consistency, and character fidelity because it rewards cognitive traces that actually support generation of the gold response. LSA is associated with semantic fidelity, anthropomorphism, and expressive freedom because it rewards latent similarity rather than verbal identity.
5. Empirical performance, transfer, and ablations
CogDual is evaluated on CoSER with GPT-4o as a critic over four dimensions: Storyline Consistency, Anthropomorphism, Character Fidelity, and Storyline Quality. It is also evaluated on Cross-MR, a multiple-choice benchmark for inferring a character’s motivation, and LifeChoice, a multiple-choice benchmark for predicting a character’s persona-driven choice. On Cross-MR and LifeChoice, CogDual first generates a response, after which GPT-4o selects the answer option semantically closest to that response (Liu et al., 23 Jul 2025).
Backbone CogDual-SFT CogDual-RL Qwen2.5-7B-Instruct 55.51 56.88 LLaMA3.1-8B-Instruct 55.44 56.97 LLaMA3.1-70B-Instruct 56.73 — These averages are materially above the reported vanilla and role-play fine-tuning baselines. For Qwen2.5-7B-Instruct, the paper reports Vanilla 51.41, +CoSER 52.86, +LongCoT 51.48, +CogDual-SFT 55.51, and +CogDual-RL 56.88. For LLaMA3.1-8B-Instruct, it reports Vanilla 43.85, +CoT 45.69, +CB-CoT 46.74, +CoSER 51.20, +LongCoT 52.20, +CogDual-SFT 55.44, and +CogDual-RL 56.97. For LLaMA3.1-70B-Instruct, it reports Vanilla 52.69, +CoSER 55.79, +LongCoT 55.64, and +CogDual-SFT 56.73. The Qwen2.5-7B + CogDual-RL result also exceeds o1-Preview’s average of 56.16.
Metric-level CoSER results for CogDual-RL are also given. On Qwen2.5-7B-Instruct, Storyline Consistency is 59.94, Anthropomorphism 46.64, Character Fidelity 46.95, and Storyline Quality 73.97. On LLaMA3.1-8B-Instruct, Storyline Consistency is 60.10, Anthropomorphism 45.89, Character Fidelity 48.82, and Storyline Quality 73.08. The paper additionally states gains of up to 11.65% in Storyline Quality for Qwen2.5-7B-Instruct, 21.84% in Character Fidelity for LLaMA3.1-8B-Instruct, and an average increase of 13.12% after two-stage training.
Transfer performance on Cross-MR and LifeChoice follows the same pattern. For LLaMA3.1-8B-Instruct, the sequence is Vanilla 30.15 / 61.10, +CoSER 43.39 / 69.54, +LongCoT 37.75 / 69.54, +CogDual-SFT 49.21 / 73.38, and +CogDual-RL 52.81 / 74.15. For Qwen2.5-7B-Instruct, it is Vanilla 54.16 / 68.58, +CoSER 56.74 / 67.08, +LongCoT 57.19 / 65.43, +CogDual-SFT 59.66 / 72.63, and +CogDual-RL 60.79 / 74.60. Compared with closed models, GPT-4o is reported at 36.04 / 73.92 and o1-Preview at 62.98 / 80.08.
Ablation studies isolate both the cognitive decomposition and the reward design. Removing either situational awareness or self-awareness reduces overall balance and robustness on CoSER; the full dual-cognition model is reported as strongest especially for Storyline Consistency, Character Fidelity, and overall average. Reward-weight ablations on LLaMA3.1-8B give the following averages: SFT baseline 55.44, ICLG only 9 at 56.51, best hybrid 0 at 56.97, equal weights 1 at 53.52, LSA-heavy 2 at 54.36, and LSA only 3 at 54.43. The paper interprets pure ICLG as strongest for Storyline Consistency and Storyline Quality, and pure LSA as strongest for Anthropomorphism.
Evaluator robustness is tested with DeepSeek-v3 and Gemini-2.0-Flash in addition to GPT-4o; CogDual-RL remains top-ranked among compared open models. Human evaluation on 50 CoSER samples using LLaMA3.1-8B variants gives average win rates of 3.20 for Vanilla, 26.70 for CoSER, 9.20 for LongCoT, 29.80 for CogDual-SFT, and 31.10 for CogDual-RL.
The qualitative case studies are aligned with the explicit cognitive representation. In a Catherine Leigh Dollanganger example, the cognition notes an empty yet lavish ballroom, Bart’s frustration and determination, memory of past family disappointments, and Cathy’s intention to support Bart without escalating his anger; the resulting response is gentle and tactically phrased. In a Nicholas of Morimondo example, the cognition tracks the crypt’s sacred and secretive environment, William’s investigative intent, Nicholas’s own pride and caution, and a strategy of answering truthfully but not fully. These examples are used to argue that responses are traceable to both external narrative facts and internal motivational reasoning.
6. Interpretation, related dual-cognition research, and limitations
CogDual should be understood as a dual-cognition framework in a relatively strict sense: it separates outward-facing situational awareness from inward-facing self-awareness and makes both explicit intermediate structures in generation. At the same time, the paper is careful about what this does not imply. The generated cognition is still text, not a true grounded cognitive state; there is no dedicated retrieval mechanism for long-term character memory; and the self-awareness module relies on the model to extract relevant memory fragments from the input context itself. The reported limitations also include English-only experiments and the absence of an RL stage for LLaMA3.1-70B-Instruct because of compute constraints (Liu et al., 23 Jul 2025).
Several methodological caveats follow directly from the training and evaluation design. The cognitive traces are supervised using GPT-4o-generated and GPT-4o-filtered rationales, so the learned cognition may partly reflect teacher-model assumptions. Cross-MR and LifeChoice are evaluated by GPT-4o semantic matching from free-form responses to answer options. Main CoSER evaluation also uses GPT-4o as critic, although additional evaluator robustness tests reduce the force of a single-judge explanation. A plausible implication is that CogDual’s strongest claim is architectural and empirical—explicit dual cognition improves role-playing quality under the reported protocols—rather than ontological.
Within the broader arXiv literature, CogDual belongs to a wider family of systems that separate a fast or structural process from a slower, more reflective, or more grounded one. In knowledge-graph question answering, CoG is “inspired by Dual-Process Theory” and maps Relational Blueprint Guidance to “System 1” and Failure-Aware Refinement to “System 2” (Liu et al., 16 Jan 2026). In document reasoning, CogDoc combines “Fast Reading” and “Focused Thinking” as a unified coarse-to-fine policy over long multimodal documents (Xu et al., 14 Dec 2025). In image generation, CoLoGen frames unified generation as a “Concept–Localization Duality” and uses Progressive Representation Weaving to reconcile competing latent factors (Song et al., 25 Feb 2026). CoDA can also be read through a dual-representation lens, separating surface domain content from latent reasoning structure through hidden-state adaptation (Yan et al., 21 Apr 2026). Outside explicit dual-cognition terminology, COGNI treats enterprise conversational analytics as a dual-path query-processing problem over SQL and DECK modalities (Rathore et al., 15 Jun 2026), while the earlier CatCog framework integrated the Integrated Connectionist/Symbolic Architecture with categorical compositional semantics to support compositional hybrid cognition (Al-Mehairi et al., 2016).
This broader comparison suggests that “CogDual” names both a specific RPLA architecture and a more general research motif. In the specific 2025 framework, the term denotes an explicit cognize-then-respond model for character simulation with situational awareness, self-awareness, and RL based on ICLG and LSA. In the wider literature, it also resonates with a recurrent design principle: improved reasoning or generation may require separating heterogeneous internal functions rather than collapsing them into one undifferentiated latent process.