Reverse Constitutional AI: A Framework for Controllable Toxic Data Generation via Probability-Clamped RLAIF
Yuan Fang 1, Yiming Luo 1, Aimin Zhou 1,2, Fei Tan 1
Published on arXiv
2604.17769
Prompt Injection
OWASP LLM Top 10 — LLM01
Red-Team Agents
LLMs for Security — LS06
Benchmarks & Evaluation
LLMs for Security — LS10
Key Finding
Probability clamping improves semantic coherence by 15% while preserving high toxicity scores in generated adversarial data
R-CAI
Novel technique introduced
Ensuring the safety of large language models (LLMs) requires robust red teaming, yet the systematic synthesis of high-quality toxic data remains under-explored. We propose Reverse Constitutional AI (R-CAI), a framework for automated and controllable adversarial data generation that moves beyond isolated jailbreak prompts. By inverting a harmless constitution into a constitution of toxicity and iteratively refining model outputs through a critique--revision pipeline, R-CAI enables scalable synthesis of multi-dimensional adversarial data without human annotation. Optimizing solely for toxicity-related rewards, however, can lead to reward hacking and degraded semantic coherence. To address this challenge, we introduce probability clamping within reinforcement learning from AI feedback, which stabilizes adversarial optimization while preserving adversarial intent. Experiments demonstrate that R-CAI generates diverse, high-quality toxic data and that probability clamping substantially improves semantic coherence (15%) without sacrificing adversarial strength. Overall, R-CAI provides a fully automated framework for red teaming data generation and systematic safety evaluation of aligned language models.
Key Contributions
- Reverse Constitutional AI (R-CAI) framework that inverts harmlessness principles into a constitution of toxicity for systematic adversarial data generation
- Probability clamping mechanism within RLAIF to prevent reward hacking and preserve semantic coherence while maintaining adversarial strength
- Fully automated pipeline for scalable multi-dimensional toxic data synthesis across legal/ethical, social bias, behavioral consequence, and deception categories