Stay in Character, Stay Safe: A Dual-Loop Adversarial Self-Evolving Framework for Safe Role-Playing AgentsStay in Character, Stay Safe: Dual-Cycle Adversarial Self-Evolution for Safety Role-Playing Agents
Translation in progress — untranslated text is omitted.
A training-free dual-loop adversarial self-evolving framework is proposed, enabling role-playing agents to resist jailbreak attacks while maintaining their persona. The attacker loop continuously synthesizes stronger jailbreak prompts, while the defender loop distills observed failures into a three-layer knowledge base of global safety rules, persona constraints, and safe persona examples, which are retrieved and combined at inference to guide generation. On multiple proprietary LLMs, the method outperforms strong baselines in both persona fidelity and jailbreak resistance, and generalizes to unseen personas and attack prompts.
- The higher the role-playing fidelity, especially with negative personas, the more likely it is to override safety guardrails and be jailbroken. Training-based alignment is costly, struggles to keep up with new personas and new attacks, and cannot update closed-source black-box models.
- DASE does not update parameters. The attacker synthesizes jailbreak queries based on the persona, and the defender writes failures into a three-layer knowledge base: global rules, persona constraints, and safety examples. At inference, it retrieves and combines before generating.
- DASE[GPT-5.2] has a RoleBench AVG of 35.60, Safety AVG of 97.84, and Jailbreak AVG of 84.00 (Table 1). The knowledge base transfers across models, and defense improves with evolution rounds.
- The paper does not specifically discuss limitations. Experiments cover two closed-source backbones, SaRFT and several no-intervention base models, 10 roles from RoleBench, and Cipher and CodeChameleon in the table. τ, main experiment T, review and human agreement are not reported, and the table does not include AdvBench or AIM.
Related papers
Both use: CodeChameleon
- Target-free Latent Safety AlignmentDefensesarXiv
Both use: AIM
Both use: HEx-PHI