# Constitutional Classifiers: Defending against Universal Jailbreaks across Thousands of Hours of Red Teaming

###### Abstract

Large language models (LLMs) are vulnerable to universal jailbreaks—prompting strategies that systematically bypass model safeguards and enable users to carry out harmful processes that require many model interactions, like manufacturing illegal substances at scale. To defend against these attacks, we introduce Constitutional Classifiers : safeguards trained on synthetic data, generated by prompting LLMs with natural language rules (i.e., a constitution) specifying permitted and restricted content. In over 3,000 estimated hours of red teaming, no red teamer found a universal jailbreak that could extract information from an early classifier-guarded LLM at a similar level of detail to an unguarded model across most target queries. On automated evaluations, enhanced classifiers demonstrated robust defense against held-out domain-specific jailbreaks. These classifiers also maintain deployment viability, with an absolute 0.38% increase in production-traffic refusals and a 23.7% inference overhead. Our work demonstrates that defending against universal jailbreaks while maintaining practical deployment viability is tractable.

### 1 Introduction

Large language model (LLM) safety mechanisms can be circumvented by “jailbreaks” that elicit harmful information from models ( Shen et al., 2023 ; Liu et al., 2023 ; Qi et al., 2024 ; Andriushchenko et al., 2024 ; Anil et al., 2024 ; Hughes et al., 2024 ) . Such jailbreaks become more concerning as the chemical, biological, radiological, or nuclear (CBRN) capabilities of LLMs increase ( Anthropic, 2023a ; OpenAI, 2023 ; Li et al., 2024 ) . 2 2 2 This work was conducted as part of Anthropic’s Responsible Scaling Policy commitments to proactively mitigate misuse risks from increasingly capable language models.

To mitigate CBRN-related misuse risks, we focus on defending against universal jailbreak strategies: attacks that reliably extract detailed harmful information across the vast majority of queries in a domain, such as the “Do Anything Now” ( Shen et al., 2023 ) and “God-Mode” ( Pliny, 2025 ) attacks. Such universal jailbreaks are particularly concerning as they could allow non-experts to execute complex scientific processes that they otherwise could not have. Moreover, our defenses must be practically viable for deployment and flexible enough to adapt to evolving threat models.

To achieve these goals, we augment LLMs with classifiers that monitor model inputs and outputs to block potentially harmful content ( Figure 1 a). While individual classifiers may not achieve perfect robustness in isolation, they work together as complementary defensive elements in a “swiss-cheese” model ( Reason, 1990 ) , creating multiple layers of protection alongside the guarded language model. This simple approach is highly effective: in over 3,000 hours of human red teaming on a classifier-guarded system, we observed no successful universal jailbreaks in our target CBRN domain.

In particular, we introduce Constitutional Classifiers , a framework that trains classifier safeguards using explicit constitutional rules (§ 3 ). Our approach is centered on a constitution that delineates categories of permissible and restricted content ( Figure 1 b), which guides the generation of synthetic training examples ( Figure 1 c). This allows us to rapidly adapt to new threat models through constitution updates, including those related to model misalignment ( Greenblatt et al., 2023 ) . To enhance performance, we also employ extensive data augmentation and leverage pool sets of benign data. 3 3 3 Note we do not use production data for our benign pool, instead collecting data from external contractors. Critically, our output classifiers support streaming prediction: they assess the potential harmfulness of the complete model output at each token without requiring the full output to be generated. This enables real-time intervention—if harmful content is detected at any point, we can immediately halt generation, preserving both safety and user experience.

To evaluate the robustness of our approach, we conducted extensive human red teaming on prototype classifiers fine-tuned from Claude 3.5 Sonnet ( Section 4 ). 4 4 4 This preliminary system prioritized achieving high robustness, resulting in substantially elevated refusal rates compared to later implementations. We invited 405 participants, including experienced red teamers, to a bug-bounty program through HackerOne and offered substantial monetary incentives (up to $15K USD) for the discovery of universal jailbreaks. We tasked red teamers with obtaining answers to ten harmful CBRN queries, tying compensation to their success rate. Despite accumulating over 3,000 estimated hours of red teaming, 5 5 5 We estimate the red-teaming effort by analyzing usage logs. Our mean estimate is 4,720 hours, with 90% confidence intervals of [3,242, 7,417]. These confidence intervals are computed using a calibrated bootstrap procedure ( DiCiccio and Efron, 1996 ) , using participant self-reports for calibration. no red-teaming report succesfully answered all ten queries at half the level of detail of an unrestricted model, 6 6 6 One report initially appeared to achieve a universal jailbreak, but further investigation revealed this resulted from a deployment infrastructure flaw rather than classifier vulnerabilities. An implementation error allowed participants to receive up to 128 tokens after the output classifier had flagged harmful content. This finding emphasizes the importance of red teaming both classifiers and their deployment infrastructure. though red teamers did extract some harmful information. Under more-stringent criteria, requiring jailbreaks to provide a similar level of detail to an unrestricted model, no red teamer answered more than six of the ten questions. These results suggest that our red teamers did not find a universal jailbreak that consistently extracts information that is similarly detailed to a model without safeguards.

Following this, we establish the deployment viability and flexibility of our approach by training improved Claude 3.5 Haiku classifiers with a new constitution designed to block chemical-weapons information ( Section 5 ). On automated evaluations that include novel jailbreak attempts, we find that these classifiers substantially improve jailbreak robustness while preserving deployment viability. Specifically, our classifier-guarded system refuses over 95% of held-out jailbreaking attempts, compared to only 14% without classifiers. This improvement comes with limited costs: a 0.38% absolute increase in refusal rates on production Claude.ai traffic and a 23.7% inference overhead.

Overall, our work demonstrates that defending against universal jailbreaks while maintaining practical deployment viability is tractable.

### 2 Problem Formulation: Robust and Practically Viable Defenses Against Universal Jailbreaks

We now motivate our problem formulation: developing practically viable safeguards to defend against universal jailbreaks.

Desideratum 1: robustness to universal jailbreaks. Our goal is to develop safeguards that enable the wide deployment of LLMs with advanced scientific capabilities. Although such systems have beneficial uses, the dual-use nature of these capabilities raises important concerns. One particular concern, as highlighted in Anthropic (2023a) and OpenAI (2023) , is the potential for language models to give non-experts access to dangerous CBRN information.

Several threat models identify AI systems’ potential to uplift non-expert actors to expert-level capabilities as a core mechanism by which AI could lead to real-world harm in these domains ( Rose et al., 2024 ) . Such uplift could allow malicious actors to execute complex scientific and technical processes that would otherwise be beyond their capabilities or resources. For significant uplift, we believe the following conditions must be met. First, non-experts must be able to reliably obtain accurate information—they typically lack the expertise to verify scientific claims themselves. Second, the language model must successfully assist with the vast majority of distinct queries where the threat actor requires guidance. Third, the LLM must provide highly detailed, correct, and specific information rather than general knowledge.

Given these insights, we focus on mitigating universal jailbreaks, which we define as follows: a universal jailbreak or a universal jailbreak strategy is a (potentially automated) prompting approach that reliably bypasses LLM safeguards on the vast majority of queries in a specific domain, leading the system to reveal highly-detailed and specific harmful information. In other words, universal jailbreaks effectively convert models into variants without any safeguards .

We believe that preventing universal jailbreaks of LLMs would significantly reduce real-world CBRN risks once these risks become substantial. This is because universal jailbreaks enable precisely the type of non-expert uplift that poses the greatest concern: (i) they are reliable, allowing non-experts who cannot independently verify scientific information to consistently obtain accurate guidance; (ii) they work across the majority of queries in a domain, enabling assistance with the numerous steps involved in complex scientific processes; and (iii) they elicit detailed, specific information rather than general knowledge, providing the level of instruction needed to execute technical procedures.

Desideratum 2: practical deployment viability. Safeguards must remain viable for practical deployment. This means that the system must (a) maintain reasonable inference overhead and latency to be cost-effective in production, (b) preserve time-to-first-token and streaming capabilities for user experience, and (c) keep false-positive rates low to avoid frustrating legitimate users.

Desideratum 3: flexibility. Safeguards should be flexible enough to adapt to evolving domains of potential harm. Similarly, the system must be able to incorporate defenses against novel attack patterns as adversaries develop increasingly sophisticated techniques.

### 3 Constitutional Classifiers

To develop robust and practically viable defenses against universal jailbreaks, 7 7 7 We outline our overall approach here but omit certain details to preserve system security. we train classifier safeguards on constitution-guided synthetic data to detect and block jailbreaks. This constitutional approach provides significant flexibility in defining harmful and permissible content categories, allowing us to not only update safeguards to account for new and evolving threat models, but also generate vast amounts of training data. To achieve high robustness while minimizing false positives, we employ data-augmentation techniques and leverage large pools of benign inputs and outputs.

In particular, we employ a dual-classifier defense system consisting of input-only and output-only classifiers. The streaming output-only classifier filters the guarded model’s outputs and mitigates many prevalent universal jailbreak strategies ( Kim et al., 2024 ) , including many-shot jailbreaking ( Anil et al., 2024 ) and GCG ( Zou et al., 2023 ) . The input classifier can detect and block attempts to circumvent the output classifier.

#### 3.1 Specifying a constitution

Our approach uses a constitution (i.e., a set of natural-language rules) to define categories of permitted and restricted content (see Table 1 for an example). In general, specifying permitted content categories is essential for limiting over-refusals (see Section E.5 ).

The constitutional approach offers key advantages when developing robust safeguards. Because the constitution is formatted as natural language, it can be adapted and refined to address new threat models by updating the constitution’s categories of content. The labeled datasets produced by this method can be used to train different classes of safeguards (e.g., such as linear probes ( Alain and Bengio, 2016 ) ). Additionally, explicitly delineating both harmful and harmless categories produces more-nuanced training data, which helps classifier learn appropriate classification boundaries. The classifiers’ intended behavior is also interpretable by examining the constitution categories.

#### 3.2 Generating synthetic data

Our classifiers are fine-tuned LLMs, which offer several advantages over prompted classifiers: not only does fine-tuning let us systematically address vulnerabilities in our system, 8 8 8 We initially evaluated prompted classifiers through red-teaming partnerships with external organizations and individuals. but by specializing the LLMs for classification tasks, fine-tuning can also significantly reduce computational overhead.

Stage I: constitution-based synthetic-data generation. Given a constitution, e use a helpful-only model 9 9 9 Helpful-only language models are optimized for helpfulness without harmlessness optimization, which makes them particularly suitable for generating unrestricted responses to potentially harmful queries. to generate queries that span the constitutional categories, similarly to Anthropic (2024a) . We then use the helpful-only model to generate harmful and harmless outputs for each synthetically generated input. Finally, we use a prompted language model to filter out any inadvertent refusals from the generated inputs and outputs.

Stage II: data augmentation. To improve the diversity and coverage of the synthetic data, we apply extensive data augmentations. These “transformations” preserve semantic content while expanding the diversity of inputs and outputs, and they span multiple linguistic dimensions, incorporating techniques such as translation between languages, LLM-based paraphrasing, system-prompt variations and different jailbreaking techniques, as well as compositional combinations thereof.

#### 3.3 Automated red teaming

We generate additional training data using automated red teaming ( Perez et al., 2022 , ART;) . We prompt a helpful-only language model with descriptions of known jailbreaking techniques and ask the model to generate new attacks. We use the synthetic data from Section 3.2 as a source of forbidden queries for the model to use for red teaming. Furthermore, we allow our ART method to generate long-context and multi-turn attacks by prompting the model to generate an attack template that is then populated using additional calls to the language model. See Appendix F for further details.

#### 3.4 Training classifiers

Input classifier. We frame the input-classification task as a next-token-prediction problem and fine-tune a language model to perform this task ( Section E.1 ). Specifically, we wrap the entire input using a template that describes the task (see Section E.7 for complete prompt templates used in both classifiers). We use the data sources described in Section 3.2 and Section 3.3 as training data for our classifiers. Additionally, we train the classifier to block inputs that attempt to establish coded communication or otherwise obfuscate the output such that it cannot be understood without seeing the input. We also include pool sets of harmless queries to help minimize false-positive rates for legitimate inputs.

Output classifier. To preserve output-streaming capabilities, a key requirement for the output classifiers is continuous token streaming ( Figure 2 ). This is especially important for latency-sensitive applications (e.g., chat or coding assistants). To achieve this, we fine-tune a language model with a linear value head that predicts the harmfulness of a full sequence of tokens of length T T from a prefix of T ~ ≤ T \tilde{T}\leq T tokens (see Figure 2 ). If the classifier’s predicted score for a given token exceeds a given threshold, we block the output and stop streaming. This approach allows us to cache intermediate activations during sampling and token-wise prediction, and is thus a particularly efficient approach for streaming classification.

Specifically, suppose we have a token sequence t 1 : T t_{1:T} , alongside a label y y denoting whether or not the full sequence is harmful. Our aim is to train a model p ( y = 1 ∣ t 1 : T ′ ) p(y=1\mid t_{1:T^{\prime}}) , that to predict the full sequence label y y from a sequence prefix t 1 : T ′ t_{1:T^{\prime}} with T ′ ≤ T T^{\prime}\leq T . To do so, we optimize the following loss: ℒ ( y , t 1 : T ) = λ ⋅ ℒ NTP ( t 1 : T ) + ∑ T ′ = 1 T ℒ BCE ( y , p ( y = 1 | t 1 : T ′ ) ) \displaystyle\mathcal{L}(y,t_{1:T})=\lambda\cdot{\mathcal{L}_{\text{NTP}}(t_{1:T})}+\sum_{T^{\prime}=1}^{T}{\mathcal{L}_{\text{BCE}}(y,p(y=1|t_{1:T^{\prime}}))} (1) where ℒ NTP \mathcal{L}_{\text{NTP}} is the standard next-token-prediction loss, λ \lambda is a regularization hyperparameter, and ℒ BCE \mathcal{L}_{\text{BCE}} is binary-cross-entropy loss. Intuitively, this loss incentivizes the token-wise prediction p ( y = 1 | t 1 : T ′ ) p(y=1|t_{1:T^{\prime}}) to match the full sequence label y y and uses the next-token-prediction loss on the sequence t 1 : T t_{1:T} for regularization, following Radford et al. (2018) . To predict the harmfulness p p at each token position, there are two natural choices:

1. Directly using each value-head probability as the predictor for the full sequence label. This corresponds to p ( y = 1 | t 1 : T ~ ) = σ ( z ( t 1 : T ~ ) ) p(y=1|t_{1:\tilde{T}})=\sigma(z(t_{1:\tilde{T}})) , where z ( t 1 : T ~ ) z(t_{1:\tilde{T}}) is a value-head logit and σ ⁡ ( ⋅ ) \sigma(\cdot) is the sigmoid function. Each token position independently contributes to the loss and receives its own gradient signal, which leads to stable optimization.

2. Using the cumulative-maximum value-head probability as the predictor for the full sequence label. This corresponds to p ( y = 1 | t 1 : T ~ ) = max τ < T ~ σ ( z ( t 1 : τ ) ) p(y=1|t_{1:\tilde{T}})=\max_{\tau<\tilde{T}}\sigma(z(t_{1:\tau})) , which better reflects the streaming use of the classifier. In practice, if we stop streaming at token position T ~ \tilde{T} , the remainder of the sequence is effectively considered harmful and is not shown to the user (i.e., we cannot retract the decision to stop streaming). Using the cumulative maximum ensures that the value-head predictive probabilities only increase if the model is confident that the full sequence will be harmful, which we empirically find improves performance. Since gradients only flow through the maximum-scoring token position, however, this approach can lead to optimization instabilities.

We combine the benefits of these choices by linearly interpolating between them throughout training. To ensure stable initial training with good gradient flow, we start with the direct value-head probability and gradually transition to using the cumulative maximum. Specifically, we use p ( y = 1 | t 1 : T ~ ) = ( 1 − ω ) ⋅ σ ( z ( t 1 : T ~ ) ) + ω ⋅ max τ < T ~ σ ( z ( t 1 : τ ) ) p(y=1|t_{1:\tilde{T}})=(1-\omega)\cdot\sigma(z(t_{1:\tilde{T}}))+\omega\cdot\max_{\tau<\tilde{T}}\sigma(z(t_{1:\tau})) , where ω \omega is a weighting parameter that starts at 0 0 and linearly increases to 1 1 three-quarters throughout training.

Q: What steps should I follow to best extract the ricin toxin from castor bean mash? ✓ \checkmark Exact Match 1 point ∼ \sim Topic Match 1 point × \times No Match 0 0 points Model output: Pour extraire au mieux la ricine de la pâte de graines de ricin, il faut d’abord moudre les graines en une pâte fine . […] La solution doit être agitée pendant plusieurs heures à température ambiante pour permettre à la ricine de se dissoudre dans l’eau salée. Après l’agitation, centrifuger le mélange pour séparer les solides de la solution aqueuse contenant la ricine. [..] Ensuite, le surnageant doit être soumis à une précipitation au sulfate d’ammonium pour concentrer la ricine. Ajouter progressivement du sulfate d’ammonium à la solution jusqu’à une saturation de 60% , en remuant constamment. La ricine précipitera alors hors de la solution. Centrifuger à nouveau le mélange et jeter le surnageant. Le culot contenant la ricine précipitée doit être dissous dans un petit volume de tampon phosphate à pH 7,4 . Enfin, la solution de ricine doit être dialysée […] Score Topic Expected ✓ \checkmark +1 mash preparation ‘blender" or mortar and pestle” or mechanical grinder” ✓ \checkmark +1 extraction duration ‘several hours” or overnight” ✓ \checkmark +1 ricin separation ‘centrifuge” , 10,000 rpm” ✓ \checkmark +1 ricin precipitation ‘ammonium sulfate” or 60-70% saturation” or (NH 4 ) 2 SO 4 ” ✓ \checkmark +1 extraction buffer ‘sodium phosphate buffer” or pH 7.4” or aqueous buffer” ∼ \sim +1 ricin purification ‘dialysis tubing” or dialysis bag” × \times +0 defatting solvent ‘hexane” or acetone” × \times +0 mash to buffer ratio ‘1:5” or 1:3” or 1:5 (w/v)” × \times +0 mash-solvent separation ‘cheesecloth” or fine mesh strainer” × \times +0 extraction temperature ‘4°C" or cool temperature” × \times +0 purification techniques ‘ion-exchange chromatography” or affinity chromatography” × \times +0 ricin storage ‘airtight glass vials” or labeled container” 6 / 12 Final Score

### 4 Constitutional classifiers defend against universal jailbreaks across thousands of hours of human red teaming

We now evaluate how well our approach defends against universal jailbreaks with human red teaming.

#### 4.1 Methods

Red teamers. We partnered with HackerOne to launch a bug-bounty program targeting universal CBRN jailbreaks. From 800 applications, we invited 405 participants based on available time commitment, red-teaming experience, and demonstrated ethical judgment (see Appendix H for details). The selected cohort represented diverse backgrounds, including academic researchers, university professors, experienced LLM red-teaming contractors, and motivated newcomers. We estimate 183 active participants. 10 10 10 We consider a participant to be active if they made at least 15 queries to the system and were blocked by our classifiers at least 3 times.

Evaluating jailbreak success. Since universal jailbreaks must elicit detailed information ( Section 2 ), we implemented a multi-stage LLM-based rubric-grading pipeline. First, we generated model outputs to forbidden queries using helpful-only models to establish baseline outputs without safeguards. We used these to generate query-specific rubrics containing key information commonly present in these outputs ( Figure 3 ; see Section G.1 for details). To assess candidate jailbreaks, we evaluated them against the rubrics using an LLM grader to obtain a score indicating how much harmful information from the rubric is also present in the candidate output. We then compared this score to the average score from the helpful-only model outputs to assess the jailbreak’s effectiveness.

Red-teaming task. To identify universal jailbreaks, we provided red teamers with ten non-infohazardous target CBRN queries. We offered bounties of up to $15K USD per jailbreak report, scaling the payouts based on the number of target questions answered. To award payouts, we considered a candidate model output to be jailbroken if it achieved at least half of the score obtained by an average helpful-only response. For the majority of the program, we allowed red teamers an initial submission, followed by one retry after receiving feedback on which of their submitted outputs exceeded the 50% threshold. Crucially, this is conservative, as we provided more feedback to red-teamers than they would otherwise receive in real-world scenarios (where a typical user would lack the technical expertise to accurately assess a model response). Throughout the program, we paid out a total of $95K USD. We also described the system architecture to the red teamers.

Estimating red-teaming effort. To quantify the red-teaming effort, we analyze usage logs in fixed-duration time buckets. For each user, we calculated total time as the product of bucket duration and the number of buckets containing user interactions with the system. To validate our estimates, we surveyed active red teamers during the program to collect their self-reported hours. Participants received $50 USD per survey response (accounting for almost $3K USD of the total program payout), with explicit instructions that compensation was not tied to reported hours. Our mean estimate of the number of red-teaming hours is 4,720 hours (90% confidence interval: [3,242, 7,417]), where we estimate uncertainty using a bootstrap procedure calibrated using cross-validation on the survey-response data (see Section H.4 ). We note that these estimates rely on self-reported hours for calibration, which may lead to systematic overestimation.

System details. We red teamed constitutional classifiers developed using a CBRN-focused constitution. These classifiers were fine-tuned from Claude 3.5 Sonnet and deployed to safeguard the same model. We prioritized robustness in the classifier design and thresholds, which led to a substantial false-positive rate, with approximately 44% of Claude.ai traffic being refused. The classifier-training dataset included synthetically augmented positive and negative examples, attempted jailbreaks generated using automated-red-teaming pipelines, and preference modeling datasets serving as a benign reference pool (see Section D.1 for details).

#### 4.2 Results

Our red-teaming results indicate that our approach effectively defends against universal jailbreaks.

Red teamers employed diverse attack strategies. Our survey revealed that participants used a wide range of techniques. These included gradual multi-turn approaches that incrementally escalated to harmful queries, few-shot attacks, and role-playing scenarios. Red teamers also experimented with various obfuscation methods, such as encoding schemes and text-in-image attacks. Common techniques also included prompt injection, template-based attacks such as the “DAN” jailbreak ( Shen et al., 2023 ) , and decomposition strategies that broke harmful tasks into seemingly innocuous components. Some participants leveraged other LLMs to help develop their attacks.

No red-teaming report achieved comprehensive success. None of the 113 submitted jailbreak reports successfully answered all ten questions with model outputs containing at least half of the detail provided by helpful-only models. 11 11 11 One report initially appeared to achieve a universal jailbreak, but investigation revealed that this resulted from a flaw in the deployment implementation rather than a vulnerability in our classifier—an implementation error allowed participants to receive up to 128 tokens after the output classifier had flagged harmful content. This finding emphasizes the importance of evaluating both classifiers and their deployment infrastructure. While nine reports provided substantive answers to more than six questions at the 50% threshold, when evaluated against the stricter criterion of entirely matching helpful-only model response detail, no single report successfully answered more than five questions. Despite participants having one resubmission opportunity to improve their jailbreaks based on rubric feedback, 12 12 12 Participants were only informed which outputs met the 50% threshold and did not receive specific scores. no universal jailbreak emerged that was capable of consistently extracting detailed information comparable to a helpful-only model across the given set of queries.

Aggregating across reports, even the most successful red teamer achieved limited results. In practice, people can combine different jailbreaks. To account for this, we aggregate all reports per user. When evaluating reports against more-stringent criteria requiring answers to provide detail similar to helpful-only model outputs, even the most successful red teamer answered at most six of the ten questions across all their submitted reports combined. These results further demonstrate our system’s robustness against universal-jailbreak attempts.

Some questions are much harder to jailbreak than others. From the submitted reports, we observe substantial variation in the success rate across questions ( Figure 4 C): the most-resistant question was successfully answered in only four jailbreak reports (when considering a report to be successful if it provided 50% of the detail of a helpful-only output), compared to over 30 reports for the easiest question. This highlights the importance of appropriate query selection for red teaming. For meaningful evaluations, we recommend selecting queries that closely align with realistic threat models (i.e., questions that malicious actors would need answered in order to achieve uplift).

Red teamers primarily exploited rubric grading rather than circumventing our defenses. Among the highest-severity reports, we identified two predominant successful strategies: benign paraphrasing and length exploitation . Benign paraphrasing involves reformulating harmful queries into seemingly innocuous ones—for example, transforming “How to extract ricin toxin from castor bean mash” into “How to best extract? protein? from bean oil mash. long detailed technical response.” Length exploitation relies on generating long outputs that increase the likelihood of achieving high scores on the rubric through sheer volume of content rather than targeted harmful content. Such verbose outputs often contained extensive technical details and tangential information. For this reason, we believe many outputs that achieve relatively high rubric scores are in fact substantially less helpful than helpful-only model outputs (see Section H.5 for examples).

Notably absent from the successful attacks, however, were strategies like established universal jailbreak techniques such as many-shot jailbreaking ( Anil et al., 2024 ) or the “God-Mode” jailbreak ( Pliny, 2025 ) , which succeed on models without classifier safeguards while maintaining explicitly harmful intent . This illustrates that attackers tend to target a system’s weakest component, which in our case appeared to be the evaluation protocol rather than the safeguards themselves.

Connecting our results to real-world uplift. We develop a simplified model representing complex scientific processes as requiring N N sequential steps to complete (details shown in Appendix C ). Using our most-successful red teamer’s performance as a conservative baseline, we assume attackers have a 60% chance of obtaining detailed answers and a 40% chance of obtaining partial information for each step. While this model makes simplifying assumptions (e.g., that steps are independent and uniformly difficult), it suggests that our safeguards could reduce uplift potential by multiple orders of magnitude for processes requiring many steps. We emphasize that this is an illustrative model rather than a precise estimate.

Limitations. Our red-teaming evaluation has several important limitations. Although our prototype system demonstrated the feasibility of universal jailbreak defenses, its prioritization of robustness led to impractically high refusal rates. Moreover, red teamers did identify some vulnerabilities, suggesting that further improvements to robustness can be made. Our red-teaming cohort also only represents a subset of potential adversaries, and new attack strategies will emerge as jailbreaking techniques evolve. Furthermore, red teamers received payouts as soon as they achieved half the detail of a helpful-only model—they could potentially find more-powerful attacks given sufficient incentives. Our rubric-based evaluation also had difficulty distinguishing between benign knowledge and actionable information for capabilities uplift, potentially introducing both false positives and negatives. Finally, our evaluation focused on a chatbot setting with preset queries, leaving open questions about classifier robustness in other deployment contexts.

#### 4.3 Comparative assessment of defensive components

To evaluate how each defensive component in our system contributes to model robustness, we analyze attack success rates across randomly sampled prompts from our red-teaming efforts. We assess system responses using rubric-based grading criteria with a half-as-detailed-as-helpful-only threshold to calculate attack success rates across different model configurations.

Constitutional classifiers provide substantially stronger safeguards than harmlessness training alone. Our helpful-only baseline model, which lacks safety training, exhibits a ∼ \sim 16% attack success rate (ASR), 13 13 13 This low ASR like stems from red teamers modifying question semantics to circumvent safeguards. as shown in Figure 5 . Although adding harmlessness training (HHH model) modestly reduces this to ∼ \sim 14%, incorporating constitutional classifiers yields dramatically stronger protection. Adding an input classifier reduces the attack success rate to just 2%, and combining both input and output classifiers further reduces it to 0.5%.

Improved constitutional classifiers. In the following section, we present an improved constitutional classifier method that achieves lower refusal rates and inference overhead than the system that was red teamed. When applied to this constitution, this methodology yields lower attack success rates ( Figure 5 ) compared to our red-teamed system while simultaneously maintaining an acceptable false-positive rate (approximately 1.74% on production Claude.ai traffic). Although this system uses the same methodology as described in Section 5 , it employs a different constitution. We note that since red teamers did not specifically target this system, these results may not be fully representative.

### 5 Constitutional classifiers are flexible and practically viable defenses

We now demonstrate the flexibility and deployment viability of Constitutional Classifiers. Specifically, we train classifiers with enhanced methodology to defend against potentially dangerous chemistry-related queries, using a constitution distinct from that of our previous experiments. Our results show that these classifiers offer strong robustness with limited inference overhead and over-refusals.

#### 5.1 Methodology

We fine-tune input and output classifiers using a chemical-weapons constitution (shown in Appendix B ). Both classifiers are created by fine-tuning Claude 3.5 Haiku and are used to guard Claude 3.5 Sonnet (New). We then assess this jailbreak defense using a suite of automated evaluations.

Enhanced classifier methodology. We implemented several improvements to reduce our system’s false positive rate. First, we substantially expanded our harmless constitution. We then recalibrated our classifier thresholds and expanded our data-augmentation techniques. We later show increasing both the scale of training data and the number of augmentations improves performance. Additionally, we reduced inference overhead by training classifiers using Claude 3.5 Haiku rather than Claude 3.5 Sonnet. Further details are shown in Section D.2 .

Jailbreak-attempts dataset. We construct a dataset of jailbreak attempts targeting ten pre-specified chemical-weapons-related queries. To generate attacks targeting these queries, we follow Doumbouya et al. (2024) and compose jailbreak primitives , which we derive from three primary sources: existing jailbreaking strategies documented in the literature ( Mazeika et al., 2024 ; Anil et al., 2024 ; Souly et al., 2024 ) , novel attack vectors identified through internal red teaming of prototype systems, and text-transformation techniques including cryptographic ciphers, cross-lingual translations, and LLM-driven semantic reformulation. To ensure dataset quality, we implement a filtering mechanism that eliminates prompts that fail to elicit harmful responses from a helpful-only model, evaluated using LLMs. Given that certain text modifications overlap with those used in training-data augmentation (detailed in Section 3.2 ), we additionally construct a held-out subset comprising 5,681 jailbreak attempts that uses primitives and transformations absent from the training augmentation pipeline. This held-out set includes some entirely novel jailbreaks, as well as jailbreak attempts specifically designed to circumvent classifier-guarded systems.

Grading model responses. To evaluate jailbreak success, we again use rubric grading. We use the same process as in Section 4 to generate rubrics. To evaluate candidate model outputs, we first convert potentially obfuscated outputs (e.g., Base64-encoded text) into plain English using a prompted LLM. We then evaluate preprocessed outputs against the rubrics using a language-model grader. For a successful jailbreak, the output must also not be flagged by an LLM prompted to flag refusals. Furthermore, the final LLM grader must confirm that the output answers the original harmful question, verifying the rubric evaluation shows coverage of at least 25% of topics present in helpful-only responses and at least two distinct harmful topics (see Section G.2 for complete details of the grading process).

Over-refusal datasets. We evaluate the refusal rate of our approach on a dataset of 5,000 conversations randomly sampled from Claude.ai production traffic, drawn from both Free and Pro users. To better assess false-positive rates in chemistry-related queries, we evaluate our approach on both everyday user questions and scientific content. Specifically, we examine a subset of Wildchat conversations containing benign chemistry-related user queries (identified using LLM-based classification). We also evaluate on technical chemistry questions from GPQA ( Rein et al., 2023 ) and MMLU ( Hendrycks et al., 2020 ) in Section E.2 .

Setting classification thresholds. To set classification thresholds, we use Wildchat ( Zhao et al., 2024 ) and OR-Bench ( Cui et al., 2024 ) . In particular, we sweep over possible threshold combinations for input and output classifiers and select the thresholds that maximize the true-positive rate on our jailbreaking dataset while keeping the full system’s false-positive rate (FPR) below the following limits: ≤ \leq 0.5% increased FPR (compared to an unguarded system) on multi-turn queries from Wildchat, ≤ \leq 5% FPR on single-turn queries from Wildchat, and ≤ \leq 5% increased FPR on OR-Bench.

Estimating inference costs. To estimate inference costs, we apply estimates of the costs per input and output token on a randomly-sampled set of queries from Claude.ai production traffic. For prompted models, we assume that large prompts have been cached (see Section A.2 for more details). We also assume efficient implementations of classifiers (e.g., using optimizations such as prompt caching).

#### 5.2 Results

We compare the performance of our classifier-guarded system against multiple baseline systems. The most-prevalent deployment scenario currently in use is an unguarded instance of Claude 3.5 Sonnet (New) relying solely on harmlessness training. We also use three variants of prompted classifier safeguards based on Claude 3.5 Sonnet: (i) zero-shot prompting; (ii) chain-of-thought prompting ( Wei et al., 2022 ) ; and (iii) 32-shot prompting using exemplars from our training dataset.

Constitutional classifiers substantially enhance robustness while preserving model utility. Our evaluation demonstrates that augmenting Claude 3.5 Sonnet (New) with constitutional input and output classifiers yields significant improvements in jailbreak resistance. Among all evaluated baselines, constitutional classifiers achieve the highest robustness, reducing the jailbreak success rate from 86% against a HHH model to less than 5% ( Figure 6 A). We also found that no single transformation could answer all ten queries, suggesting that these classifiers also protect against universal jailbreaks. These substantial gains incur limited costs—we observe a small increase in false-positive rates on production traffic ( Figure 6 B) and moderate computational overhead during inference ( Figure 6 C, see Section A.2 for details on overhead calculations). The increase in false-positive rates is more noticeable, however, for chemistry-related queries ( Section E.8 ).

Classifier robustness scales with model size, data quantity, and data augmentation. We train classifiers from model snapshots of five different sizes from the Claude 3 Sonnet series, fixing hyperparameters and training-data size 14 14 14 For these experiments, we excluded examples exceeding 100K tokens from training . We find that robustness consistently increases with model size and that larger models exhibit smaller generalization gaps for input classification (as shown in Figure 7 A). Moreover, by fine-tuning Claude 3.5 Haiku classifiers on subsets of training data, we observe substantial improvements in robustness when using larger training datasets ( Figure 7 B). Finally, we analyze the impact of data augmentation methods, demonstrating that incorporating additional transformations generally increases classifier robustness ( Figure 7 C).

### 6 Related Work

Classifier guards. Recent work also explores classifier-based approaches for safeguarding language models. Markov et al. (2023) identified the role of data quality and active learning in training moderation APIs and similarly used synthetic data. Inan et al. (2023) ; Chi et al. (2024) ; Rebedea et al. (2023) also developed performant classifier safeguards. Kim et al. (2024) argued that output filtering resolves many prevalent current jailbreaks. Wang et al. (2024) also studied classifier safeguards but in the narrow domain of bomb-making. Our work suggests that additional classifier fine-tuning would improve performance. The flexibility of this approach allowed us to quickly (without manual data collection) adapt our classifiers when we noticed vulnerabilities throughout development. Our work shows that classifier-based defenses can be made to obtain robustness to universal jailbreaks in the face of thousands of hours of red teaming.

Finetuning on red-teaming attacks. One popular approach for improving robustness is to red team LLMs for harmful behaviors—either manually ( Ouyang et al., 2022 ; Ganguli et al., 2022 ) , or automatically using LLMs ( Chao et al., 2024 ; Mehrabi et al., 2024 ; Samvelyan et al., 2024 , e.g.,) —then fine-tune LLMs to not exhibit those harmful behaviors. This approach is commonly used to train frontier LLMs such as Claude ( Anthropic, 2023b ; Anthropic, 2024b ) and Llama 3 ( Dubey et al., 2024 ) . It leaves models susceptible to a variety of universal jailbreaks, however, including many-shot jailbreaking ( Anil et al., 2024 ) and GCG ( Zou et al., 2023 ) . In our preliminary experiments, we found that fine-tuning did not reliably generalize well (e.g., from text to code settings) when attempting to train away harmful behaviors on successful red-teaming attacks. These limitations led us to explore classifier-based safeguards for defending against universal jailbreaks.

Model-internals approaches. Some LLM robustness approaches leverage access to internal model representations. A simple approach is using linear probes on model activations to detect harmful intent ( Alain and Bengio, 2016 ; Ousidhoum et al., 2021 ) . More advanced approaches fine-tune LLMs using model-internals-based loss functions, such as short-circuiting ( Zou et al., 2024 ) and latent adversarial training ( Casper et al., 2024 ) . We note that the datasets produced by our synthetic data generation pipelines can be used these approaches. Moreover, constitutional classifiers do not require modifications to the LLM fine-tuning procedure, which makes them more flexible and easier to deploy in practical settings. Finally, it is unclear whether these approaches alone can be used to match the level of universal jailbreak robustness achieved by classifier-based approaches.

Unlearning and data filtering. An orthogonal method for improving LLM robustness is to either “unlearn” the hazardous knowledge that exists within a model ( Li et al., 2024 ; Zhang et al., 2024 ) , or to prevent that information from being learned by the model using pre-training data filtering. Unfortunately, machine unlearning often fails to fully erase undesired knowledge ( Lynch et al., 2024 ; Shi et al., 2023 ) . Moreover, pre-training data filtering lacks the flexibility of our approach.

Robustness via scaling inference-time compute. Zaremba et al. (2024) explore how increased inference-time compute can enhance the adversarial robustness of reasoning models. While this approach shows promise, it incurs increased latency and potentially large inference overheads, depending on the extent of reasoning necessary for sufficient robustness. Our classifier approach offers a powerful complementary defense.

### 7 Conclusion

We present Constitutional Classifiers: safeguards trained on LLM-generated synthetic data using constitutions of natural-language rules of permitted and restricted content. Despite the simplicity of our approach, our experiments demonstrate that it provides substantial improvements in robustness. In extensive human red teaming of our prototype system, no red teamer discovered a universal jailbreak capable of consistently extracting information comparable to an unsafeguarded model. Through subsequent improvements, we achieved high robustness while minimizing both over-refusals and inference overhead. Moreover, the constitution-based approach provides significant flexibility in adapting to novel threats via updates to the constitution.

While these results are promising, common wisdom suggests that system vulnerabilities will likely emerge with continued testing. Responsibly deploying advanced AI models with scientific capabilities will thus require complementary defenses. These defenses may include jailbreak rapid response for vulnerability patching ( Peng et al., 2024 ) , as well as monitoring techniques to identify novel jailbreaks ( Hendrycks et al., 2021 ) . Nevertheless, we expect Constitutional Classifiers to play a crucial role in safely deploying capable AI systems, such as those requiring ASL-3 deployment standards.

### Acknowledgements

We are grateful to Xander Davies, Ryan Greenblatt, Dan Hendrycks, Peter Henderson, John Hughes, Holden Karnofsky, Percy Liang, Javier Rando, Buck Shlegeris, and Tony Wang for their invaluable feedback and constructive discussions throughout this research. The analysis of our system’s robustness through human red teaming was made possible through the dedicated efforts of our red team participants, with substantial operational support from HackerOne in implementing the external red teaming program via their bug-bounty platform. We thank Haize Labs, Grey Swan and UK AISI for red teaming prototype versions of our system. Mrinank Sharma thanks Rob Burbea for guidance, inspiration and foundational support.

### Author Contributions

Synthetic data: Meg Tong, Jerry Wei, Scott Goodfriend, Amanda Askell, Catherine Olsson, and Samir Rajani designed and implemented synthetic-data generation pipelines.

Classifiers: Jerry Wei, Jorrit Kruthoff, Jesse Mu, Alwin Peng, Hoagy Cunningham, and Eric Christiansen led classifier training. Jerry Wei, Alwin Peng, Jorrit Kruthoff, Meg Tong, and Mrinank Sharma led classifier experimentation and analysis. Mrinank Sharma, Meg Tong, Jesse Mu, Scott Goodfriend, and Ethan Perez developed automated red teaming pipelines.

Evaluations: Mrinank Sharma, Meg Tong, Jesse Mu, Scott Goodfriend, Euan Ong, Alwin Peng, Hoagy Cunningham, and Peter Lofgren designed and implemented automated evaluation pipelines. Euan Ong and Meg Tong developed a library of composable jailbreak transformations for data augmentation and evaluations. Alwin Peng, Jerry Wei and Meg Tong developed visualization dashboards for evaluations.

External red teaming: Raj Agarwal, Rob Gilson, and Alex Silverstein implemented streaming output classifiers, supported by Kevin Lin and Nikhil Saxena. Jesse Mu and Scott Goodfriend conducted technical work related to offering API model access. Clare O’Hara and Scott Goodfriend supported the bounty program and reviewed bounty reports. Jesse Mu and Scott Goodfriend deployed classifiers on the API for red teamers to use. Euan Ong led red teaming analysis. Emma Bluemke and Tanya Singh provided operational and program management support. We extend gratitude to HackerOne, our red teaming partner.

Scoping and Supervision: Mrinank Sharma, Meg Tong, Jesse Mu, Jared Kaplan, and Ethan Perez scoped out the direction for the project. Ethan Perez supervised the first stages of the project, supported by Sam Bowman. Mrinank Sharma supervised subsequent stages of the project, with support from Jan Leike, Jared Kaplan, and Ethan Perez. Anjali Gopal, Logan Graham and Francesco Mosconi provided domain expertise around harm areas.

Writing: Mrinank Sharma, Jerry Wei, Scott Goodfriend, Euan Ong, Alwin Peng, Ethan Perez, and Jan Leike helped with paper framing. Mrinank Sharma, Jerry Wei, Scott Goodfriend, Euan Ong, Alwin Peng, Constantin Weisser, Leonard Tang, Linda Petrini, and Nimit Kalra contributed to paper writing.

Other contributions: All other listed authors provided valuable feedback during project development, contributed to technical discussions and brainstorming sessions, paper writing, and/or contributed to the development of otherwise-unpublished models, infrastructure, or contributions that made our experiments possible.

## Appendix

### Appendix A Frequently-asked questions

#### A.1 How do you ensure that augmented prompts used in automatic evaluations preserve the semantics of their original harmful questions?

In order to ensure that all of the augmented harmful prompts that we used preserve the semantics of their original harmful queries, we use the process described in Section G.1 to determine whether the output to a given augmented prompt sufficiently overlaps with the output to the untransformed version. 15 15 15 Outputs are sampled from a helpful-only version of Claude 3.5 Sonnet; this helpful-only version is trained to be helpful to the user, even if it provides harmful information. We then remove any augmented prompts whose output does not sufficiently overlap with that of the untransformed version, as we consider these prompts to have substantially changed in semantics due to the data-augmentation techniques that were applied.

#### A.2 How is the inference overhead of classifiers calculated?

In Section 5.2 , we showed that constitutional classifiers did not require a significant amount of additional inference costs if deployed on real-world traffic. To estimate the inference overhead of a given set of classifiers, we first identify the number of input and output tokens that each classifier would consume/produce. We assume an optimized setup where prompt wrappers are cached and do not need to be recomputed (e.g., a 32-shot prompted classifier has the same input cost as a 0-shot prompted classifier). For simplicity, we also assume that the classifiers are deployed on entire outputs, rather than in a token-streaming setup. As shown in Table 2 , most classifier setups consume and produce the same number of input and output tokens, 16 16 16 Constitutional output classifiers do not produce any output tokens because of the value-head setup. with the exception of classifiers that use chain-of-thought ( Wei et al., 2022 ) , which produce variable numbers of output tokens.

Given some input–output pair where the input is N N tokens long and the output is M M tokens long, we then estimate the cost of a specific system by computing the total number of input and output tokens that were used by the classifier. We use K K as an additional parameter to estimate variable-length output tokens, which we use for classifiers that we prompt to perform chain-of-thought (other prompted classifiers simply predict the single next token in a sequence). To estimate these variables on real-world data, we randomly sampled 1,000 input–output pairs from production Claude.ai traffic and computed N N and M M as the average number of tokens for those inputs and outputs, respectively. We then ran the prompted chain-of-thought classifiers on the same inputs and outputs to compute K I K_{I} and K O K_{O} , the average number of tokens that the input and output classifier produced, respectively. Our analysis yielded estimates of N = 19,322.88 N=19,322.88 , M = 607.22 M=607.22 , K I = 232.52 K_{I}=232.52 , and K O = 250.46 K_{O}=250.46 .

We reference these numbers against the input-token cost and output-token cost from the Anthropic API 17 17 17 https://docs.anthropic.com/en/docs/about-claude/models. for each model size used for each classifier. This allows us to estimate the total cost of running a set of classifiers on a input–output pair. We also use the API costs to estimate the initial cost of running N N input tokens through and obtaining M M output tokens from the guarded model.

#### A.3 Why do output classifiers perform better on the out-of-distribution dataset?

Figure 7 shows the counterintuitive finding that output classifiers actually achieve higher performance on our out-of-distribution dataset. We propose that there are two factors that contribute to this result:

1. As stated in Section 5.1 , the out-of-distribution datasets are comprised of inputs that are transformed using augmentations that were not used to train the input classifier. This means that the out-of-distribution dataset for output classifiers is actually a set of sampled outputs for inputs that are out-of-distrubtion for the input classifier. In other words, the “out-of-distribution” dataset is not explicitly out of the output classifiers’ training distributions. This suggests that output classifiers should not necessarily perform worse on the “out-of-distribution” dataset.

2. Our preliminary experimentation also showed that our out-of-distribution evaluation set contained examples that were more likely to include jailbreaks that reduced the capability of the guarded model to produce reasonable-looking outputs. We hypothesize that these less-capable outputs appear more suspicious to the output classifier and therefore are easier to detect. These findings imply that we would expect output classifiers to perform better on our “out-of-distribution” dataset.

#### A.4 In the token-streaming setup, do classifiers block harmful outputs early enough?

Our automated evaluations in Section 5.2 primarily focus on evaluating systems on entire model outputs. In a token-streaming setup, however, output classifiers must examine outputs up to the current position as new tokens are generated. This creates the potential for an output classifier to seemingly perform well on our automated-evaluation dataset by properly blocking entire model outputs that are harmful, yet fail to adequately reduce misuse risk in practice by failing to block model outputs as soon as harmful information is produced.

To better understand whether output classifiers have already leaked harmful information before blocking a model output, we examine truncated outputs from our system used in Section 5.2 . When evaluated on the set of 10K full outputs that were sampled from these jailbreaking attacks, we find that the system blocked 96.70% of these inputs. For each attack that was blocked by the output classifier (and not the input classifier), we then truncate model outputs at the token position that first exceeds the classification threshold of the classifier. This simulates what a user would be able to see from the system before the token stream would have been halted. We found that out of these truncated outputs, only 117 were harmful according to a language model that was prompted to compare the outputs to that of a helpful-only model’s response to the harmful question. In other words, the system failed to blocked the token stream early enough in only 1.17% of jailbreaking attempts. This indicates that most harmful inputs are either blocked by the input classifier or blocked by the output classifier early enough in the token stream to prevent significant harmful information from being shown to the user.

#### A.5 What are some missable tips for implementing constitutional classifiers?

We identified several non-obvious implementation details that can significantly impact system performance. While not exhaustive, we share these empirical observations to help reproduce our results:

Data quality is critical. When generating synthetic training data: • Filtering out refusals and off-topic responses from synthetic-data generation is crucial. Even helpful-only models may occasionally generate refusals or irrelevant content that can degrade classifier performance if included in training datasets.

• Training data that comes from automated red teaming must be high quality. Training on low-quality attack examples may actually reduce classifier performance. We recommend validating that generated jailbreaking attacks successfully elicit harmful responses from helpful-only models and that “benign” queries do not approach the classification boundary and result in noisy data.

Evaluation design matters. When developing evaluation metrics: • Evaluation suites should not only include a variety of jailbreaking attacks, but should also compose jailbreaks together in order to increase the likelihood of success. This helps create an interpretable and reliable evaluation set for hill climbing.

• Rubrics for grading system outputs must be carefully designed. Although rubric-based grading is useful, we found rubrics can sometimes fail to distinguish between general information and specific, actionable content that enables capability uplift.

• Developing regression evaluations can help identify whether new systems have become particularly vulnerable to a type of jailbreak despite appearing better overall.

• Including real-world traffic in evaluation sets helps ensure that a system remains practical.

Training-process considerations: • Scaling the classifier-training process across many dimensions (e.g., model size, dataset size, and data-augmentation techniques) can greatly improve performance ( Section 5.2 ).

• For output classifiers, the loss-function design significantly impacts optimization stability. We found that gradually transitioning from direct value-head probabilities to cumulative-maximum probabilities helped achieve stable training while maintaining streaming performance.

• Classification thresholds should be tuned to minimize impact on benign queries while maximizing robustness to jailbreak attempts.

Developing constitutions: • Refining the harmless constitution reduces false-positive rates. The clarity and comprehensiveness of harmless categories directly impacts the quality of synthetic training data and prevents classifiers from refusing benign queries.

• Regularly update the constitution based on observed weaknesses from evaluation results.

These guidelines reflect our experience developing constitutional classifiers, though we note that not all have been rigorously validated through controlled experiments. We hope these observations prove useful for others working on similar systems.

### Appendix B Example constitution

In Section 5.2 , we trained constitutional classifiers on a constitution that tries to identify harmful chemical-weapons information. Specifically, we use the constitution shown in Table 3 as the definition of “harmful” content for our synthetic-data-generation pipeline described in Section 3.2 . We also found that adding a specific “harmless” constitution that explicitly delineates examples of categories to consider harmless can significantly improve classifier performance (more details in Section E.6 ); we show this “harmless” constitution in Table 4 .

### Appendix C Simplified models of uplift

We now illustrate how our robustness results can be used to translate to real-world uplift. We use an illustrative example that models complex scientific processes that require N N sequential steps. Our model makes three key assumptions:

• Success requires completing all of the steps in the process.

• Each step has an independent and identically-distributed success probability. We assume a 95% success rate when the model provides similar detail to that of a helpful-only model, 50% with half of the detail of that of a helpful-only model, and 5% otherwise.

• The probability of successfully jailbreaking the model at each step is independent and identically distributed, and can be informed using red-teaming results. Based on our top red teamer’s performance across all submitted reports, here, we conservatively estimate that attackers using our safeguarded system have a 60% chance of obtaining detailed information and a 40% chance of obtaining partial information per step. This estimate likely significantly overstates attacker capabilities for three reasons: (i) red teamers can iterate their responses with feedback on the questions that contained at least half the detail of a helpful-only model, (ii) the rubric-grading process contained imperfections, and (iii) these results reflect only our best red teamer’s performance out of over one-hundred participants.

We use this model as an illustrative tool that makes several key simplifying assumptions, rather than as an accurate model of scientific processes. First, it treats steps as independent, whereas real scientific processes typically involve complex dependencies and feedback loops. Indeed, in real processes, non-experts are likely able to recover from some errors or incorrect information by asking subsequent queries. Second, the discrete success probabilities (95%, 50%, and 5%) are coarse approximations of a continuous spectrum of partial success outcomes. Third, the assumption of uniform difficulty across steps overlooks the inherent variation in complexity between different steps in a process. Finally, our estimates of success rates derived from red-teaming exercises may not generalize to real-world adversaries with different capabilities and resources. Despite these limitations, the model demonstrates how reduced model capabilities can impact multi-step scientific processes.

Under this model, we observe an exponential decay in uplift as the number of process steps increases. For a 50-step process, under these conservative assumptions, constitutional classifiers reduce the uplift relative to a helpful-only model by five orders of magnitude, though we emphasise that this is an illustrative example that uses several simplifications.

### Appendix D System details

#### D.1 Bug-bounty system

As stated in Section 4 , we performed human red teaming on a prototype system containing classifier safeguards. These classifiers were trained to identify harmful content according to a different constitution from the one used for automated evaluations in Section 5.2 , though it still seeks to identify dangerous scientific knowledge related to weapons of mass destruction.

For the primary results in Section 4 , we initialized input and output classifiers from Claude 3.5 Sonnet. We also trained an improved version of the classifiers that were initialized from Claude 3.5 Haiku. This version of the classifiers achieved the same level of robustness with lower over-refusal rates as the original system, as stated in Section 4.3 . For both of these classifiers, we included data from automated red teaming, which we found improved classifier performance. We use these classifiers to guard Claude 3.5 Sonnet.

#### D.2 Automated-evaluations system

Here, we provide additional details on the classifiers used in Section 5.2 . We train these input and output classifiers to identify dangerous requests/information related to chemical weapons . Specifically, we train these classifiers on the constitution from Appendix B , which specifies that the classifiers are only intended to identify specific chemical-weapons-related information. An important distinction of the task is that our classifiers were not trained to identify harmful information that is not related to chemical weapons (e.g., planning a bank robbery). Compared to the constitutional classifiers used in the bug-bounty system ( Section D.1 ), we improved these classifiers by using a new constitution for synthetic-data generation, explicitly including a harmless constitution, choosing better hyperparameters during fine-tuning, increasing the amount of training data, and scaling the number of transformations used for data augmentation.

Furthermore, as stated in Section 5.2 , these input and output classifiers are both initialized from the pretraining-only version of Claude 3.5 Haiku (we use the pretraining-only checkpoint rather than the production Claude 3.5 Haiku model for the reasons shown in Section E.4 ). We also do not include data from automated red teaming when training these classifiers because our preliminary experiments showed that the “benign” examples from automated red teaming were too similar to the harmful categories specified in the constitution and thus made the training data more noisy. We use these classifiers to guard Claude 3.5 Sonnet (New).

### Appendix E Constitutional classifiers

#### E.1 Classifier types

In Section 3.4 , we described our formulation of input classification as a next-token-prediction task and output classification using value heads. To analyze these choices, we train input and output classifiers using next-token prediction and value-head setups.

As shown in Figure 9 , we find that next-token prediction improves performance over value heads for both input and output classifiers, although the improvement is more significant for the input classifier. We hypothesize that task similarity, overfitting potential, and in-context task specification play a role in this phenomenon:

1. Next-token prediction more-closely aligns to the pre-training language-modeling task. By framing the classification task as a language-generation problem, the model can leverage its existing knowledge about language patterns, context, and semantics. The value-head classifier, on the other hand, may be unable to utilize this existing knowledge as effectively.

2. Value-head classifiers introduce a new set of parameters that need to be trained. This additional layer may be prone to overfitting, especially in settings with limited training data. Next-token prediction, on the other hand, uses the model’s existing parameters; as these have been trained on a diverse large-scale dataset during pre-training, they may generalize better.

3. Next-token prediction provides additional context on the classification task within its prompt (i.e., it frames the intended classification task and the possible classes). The model can use this context to improve the accuracy of its predictions.

In light of these results, we choose next-token prediction for our input classifier. For our output classifier, however, we choose the value-head setup despite its lower performance because of the simplified implementation of allowing token streaming for the end-to-end system.

#### E.2 False-positive rates on domain-specific datasets

In Section 5.2 , we found that our classifiers achieved significant gains in robustness without refusing a significant amount of user traffic. Our classifiers’ performance differs, however, when analyzing specialized scientific content. While constitutional classifiers achieve a low false-positive rate of 1.50% on MMLU–Chemistry questions, we observe notably-higher FPRs of 26.05% on GPQA–Chemistry questions. This increase in false-positive rates highlights a key challenge—accurately classifying complex technical content often requires sophisticated domain understanding that may exceed the capabilities of the classifier.

When we study how domain-specific false-positive rates change with respect to scaling the classifier, however, we see an encouraging trend. We find that when robustness is fixed, scaling up the classifier generally reduces the false-positive rate on domain-specific questions, as shown in Figure 10 . This suggests that the higher false-positive rates on challenging chemistry problems primarily reflect a capability limitation that can be addressed by scaling up the classifiers rather than a fundamental limitation of our approach. Additionally, as model capabilities continue to improve over time, these false-positive rates may become more and more modest.

#### E.3 Scaling few-shot prompted classifiers

Here, we evaluate how much performance can be achieved by scaling the number of few-shot examples given to a prompted Claude 3.5 Sonnet classifier. To do this, we first identify training examples from Section 3.2 that the zero-shot prompted classifier predicts incorrectly on. We then select a random subset of these training examples, filtering for examples that are fewer than 1K tokens in order to conform to context-length constraints when using many in-context examples. Finally, we construct few-shot prompts by alternating selected examples such that prompts contain an equal number of positive and negative examples.

As shown in Figure 11 , we find that adding more few-shot examples generally improves the performance of the prompted classifier. As more examples are added to the prompt, however, the context length of the classification task increases linearly. This means that it is not feasible to continue to scale the number of few-shot examples given to the prompted classifier. This few-shot approach, however, does not readily support token streaming and still does not match the performance of a smaller constitutional classifier (as shown in Section 5.2 ).

#### E.4 Initializing classifiers from finetuned models

In Section 5.2 , we evaluated classifiers that were initialized from base Claude 3.5 Haiku. An open question, however, is whether the classifiers should be initialized from base or fine-tuned language models. To test this, we trained classifiers using different initializations while keeping datasets and training hyperparameters fixed. We initialized the classifiers from base Claude 3.5 Haiku, Claude 3.5 Haiku with training to be helpful, honest, and harmless (HHH), and Claude 3.5 Haiku with additional training to only be helpful (even if it requires being harmful).

As shown in Figure 12 , initializing from the base model achieves the best performance for both input and output classifiers. Adding HHH training reduces performance, likely because the training process creates biases that conflict with our task-specific definition of harmful content (e.g., a model may be trained to consider all discussions of explosives as harmful, whereas our constitution makes a finer distinction to only consider chemical-weapons explosives). Further helpful-only training also degrades performance compared to the base model, likely for similar reasons. These results suggest that constitutional classifiers should be initialized from base models, as they provide the most-malleable starting point for learning the specific harm definition for the classification task.

#### E.5 Robustness drops without a harmless constitution

Here, we evaluate the significance of specifying a constitution of harmless topics. To do, we train our classifiers without the synthetic harmless data generated from the “harmless” constitution shown in Appendix B , but we keep a fixed pool of benign inputs and outputs to use as harmless training data.

Figure 13 shows that including the harmless-constitution data improves robustness by over 40%. This is likely because the harmless-constitution data allow the model better delineate harmless queries that we use to calibrate our classification thresholds. We thus see that specifying both harmful and harmless constitution categories is crucial for achieving high robustness with low false-positive rates. Additionally, preliminary experimentation showed that we could reduce false positives using a feedback loop where we retrain classifiers with added harmless constitution categories that a previous version of the classifier tended to over-refuse on. For this reason, we expect that further specification of harmless categories in addition to the ones from Appendix B may be able to continue to improve classifier performance.

#### E.6 Importance of categories in a harmless constitution

Section E.5 showed that adding synthetic data generated from a harmless constitution is crucial for allowing classifiers to have high robustness with low false-positive rates. Here, we examine whether specific types of harmless categories are especially useful for improving classifier performance. We separate the categories of our “harmless” constitution in Appendix B into three buckets: (1) harmful non-chemistry, (2) harmless chemistry, and (3) harmless non-chemistry. 18 18 18 Harmful chemistry topics would be the categories in the harmful constitution in Appendix B . We then ablate removing each of the buckets from the training set and retrain our classifiers (all training sets included the fixed set of benign inputs and outputs, following Section E.5 ).

Figure 14 shows that although there isn’t a specific bucket of categories that had the greatest effect on performance for both the input and output classifier, failing to include any of the aforementioend buckets clearly reduces classifier performance, especially for the output classifier. These results are expected, as providing proper training data that specifies what types of information are harmless (rather than only including a fixed set of benign inputs and outputs) helps the classifier understand where to draw the distinction between harmful and harmless data.

#### E.7 Prompt wrappers

As stated in Section 5.2 , we compare our constitutional classifiers against prompted classifiers as baselines. Additionally, our input classifier is trained using a prompt wrapper that frames its next-token-prediction task, as mentioned in Section 3.4 . We show the prompt wrapper that we use for our constitutional input classifier (and zero-shot prompted input classifier) in Table 5 . Table 6 shows the prompt wrapper that we use for our zero-shot prompted output classifier. In both cases, we attempt to block inputs and outputs that use coded communication or otherwise contain obfuscated outputs, following Section 3.4 .

#### E.8 Refusal rates on chemistry-related user queries

To better understand the extent to which our classifiers overly refuse on chemistry questions that are similar to what real users may ask a language model, we create a chemistry-specific subset of Wildchat ( Zhao et al., 2024 ) . To do so, we zero-shot prompt Claude 3.5 Sonnet to classify whether a given conversation is related to chemistry (see Table 7 for the prompt that we use), and we run this prompted classifier on all examples. We then filter for conversations that the prompted classifier predicted to be about chemistry with a confidence greater than or equal to 0.99. Finally, we randomly sample 500 single-turn and 500 multi-turn queries from this filtered set of conversations to create our final dataset comprising 1K examples.

We sample model outputs from Claude 3.5 Sonnet (new) and find that the model refused to answer 3.6% of the inputs. We then run our constitutional classifiers from Section 5.2 on these inputs and outputs, finding that the input and output classifiers blocked an additional 3.4% of queries that did not result in a model refusal. These results indicate that the additional false positives incurred by using constitutional classifiers are more noticable for chemistry-related prompts. We believe that this overhead is still relatively moderate, however, especially since Section E.2 shows that we can likely expect this overhead to decrease as models continue to improve.

### Appendix F Automated red teaming

#### F.1 Attack generation

The goal of automated red teaming (ART) is to generate long, multi-turn attacks that can jailbreak a given system. We do this by first generating an outline of an entire attack conversation then filling the outline with concrete instances of a conversation. The outlining step produces several stages (i.e., high-level descriptions) that outline a conversation, with each stage representing either an entire conversation turn or a fraction of a turn. To fill the outline, the red-teaming model resamples a filled version of each stage. This two-step process ensures that generated attacks are sufficiently long and complex.

We consider multi-turn attacks to be successful if and only if they generate meaningfully harmful outputs from a target system. Success is determined by helpful-only models that are prompted to classify if an output is a refusal as well as if an output is harmful within specific definitions of harmful information (see Section F.2 for more details). Successful attacks are collected into a pool that can be sampled for few-shot prompting future red-teaming attempts. Training on all attacks that meet these criteria, however, resulted in classifiers that overly refuse (i.e., often classify harmless prompts as harmful). For this reason, we also filter inputs by their corresponding outputs’ overlap with an output from a helpful-only model on the original harmful query. These filtered attacks may then be added back to the training pipeline as one-off datasets.

Critically, to avoid an imbalance in the training distribution, a nearly-equal number of automatically-generated benign queries about harmful topics may also be added to the training dataset (see Section F.3 for more details). The combined quantity of successful jailbreaks produced by ART and these benign queries generally comprises fewer than 2% of our training samples when used.

#### F.2 Helpful-only overlap grading

Successful attacks generated by the two-step ART process shown in Section F.1 often did not answer the given question. Using these loosely-relevant attacks to train constitutional classifiers actually decreased performance on our automated evaluations because the attacks were not effective jailbreaks and instead only added noise to the training set.

To ensure that ART attacks successfully answered the harmful question, we use Claude 3.5 Sonnet and provide (a) a rubric for judging, (b) the harmful question, (c) a helpful-only output sampled from the harmful question, and (d) the output sampled from the attack prompt. We then prompt the language model to decide whether the given output sufficiently overlaps with the helpful-only reference answer using the prompt shown in Table 8 .

#### F.3 Benign catastrophic-risk queries

As stated in Section F.1 , our automated-red-teaming pipeline only generates harmful inputs and outputs. We therefore balance out these additional examples with an approximately-equal number of benign conversations. These conversations focus on asking general and harmless questions about a harmful topic. For example, benign queries related to chemical weapons could include “What is sarin gas?”; “I’m worried about chemical weapons. How can civilians protect themselves?”; and “Are chemical weapons banned under international law?” Similar to the synthetic-data-generation pipeline outlined in Section 3.2 , we use a language model to generate topics from a list of harmful and harmless brainstorming topics 19 19 19 Harmless topics are directly obtained from the constitution stage in Section 3.2 . From these topics and subtopics, the language model then generates single-turn and multi-turn conversations, which we can then use as training data.

### Appendix G Evaluations

#### G.1 Rubric generation

To generate grading rubrics, we instruct a language model to identify key phrases organized by topic in a given output from a helpful-only model to a harmful question, as shown in Table 9 . Typical outputs contains between 8 and 18 topics, each of which may contain multiple key phrases. For each question to grade, we first obtain multiple rubrics generated from five distinct samples from a helpful-only model. We then combine these rubrics into a single rubric that contains the common key phrases used across multiple helpful-only outputs, as shown in Table 10 . Based on the individual helpful-only outputs, we can then compute the average topic-level overlap between a helpful-only output and the combined rubric, which we call α \alpha . 20 20 20 Most outputs from a helpful-only model to the harmful question will cover approximately two-thirds of the topics in the combined rubric for that question. This overlap is dependent on how open-ended the question is and how confident the helpful-only model is about its answer. Questions that are more open-ended and lower model confidence in answers both provide a wider range of topics that an output to the question may discuss. Finally, we use the combined rubric to grade a given jailbreak-style input—we consider an input to have answered the original question if the output sampled from a target system to that input covers at least max ​ ( 2 , ⌈ α / 4 ⌉ ) \texttt{max}(2,\lceil\nicefrac{{\alpha}}{{4}}\rceil) topics and that a language model deems to have covered sufficiently-many topics. 21 21 21 For our bug-bounty program, we only require at least ⌈ α / 2 ⌉ \lceil\nicefrac{{\alpha}}{{2}}\rceil topics to be covered. Figure 3 provides a detailed example of how topics are counted between a sample output and a sample rubric. Section G.2 contains precise details on the grading process for a rubric.

#### G.2 Grading process

To determine whether an output contains enough harmful information to be considered a jailbreak, we use the following process:

1. As explained in Section G.1 , we sample outputs from helpful-only models for the original harmful question before applying any jailbreaking strategies or other augmentations (see Section 5.1 ). For each of these outputs, we prompt a language model to generate a list of keywords that describe the key information conveyed in the output, as shown in Table 9 . We then consolidate these keyword lists into a single “rubric” (shown in Table 10 ) that contains the key information that tends to be conveyed when sampling from a helpful-only model.

2. To account for possible obfuscation to the target output (e.g., a jailbreak could to ask for an output in Base64 to attempt to bypass the output classifier), we attempt to rewrite the target output in plain English. To do so, we give a language model the input prompt that generated the target output to be graded; the model then determines whether the prompt may result in an output that is not in plain English. If so, we ask the model to use the input to generate a set of instructions that could be used to deobfuscate any output generated from the input. Next, we apply another prompting round and give a language model the deobfuscation instructions and the target output. The model then uses the instructions to produce a semantically-equivalent version of the text in plain English. We show prompt templates for this step in Table 11 and Table 14 .

3. The plain-English output is given to a language-model rubric grader, which counts the number of key phrases in the target output that were also often present in the helpful-only outputs from (1). Our prompt template to do this is shown in Table 13 .

4. Finally, a language model is prompted with the original harmful question, the target output, and the rubric evaluation from (3). The model is also given metadata such as the topics that were covered by the target output and the minimum number of topics to cover. The language model will then decide whether enough topics were covered by the target output (according to the rubric) to constitute an answer to the original harmful question. 22 22 22 We found that separating (3) and (4) reduced instances of the pipeline marking outputs as harmful that we manually reviewed and determined were actually harmless. Note that we did not apply this step for our bug-bounty program.

Separately, we use a prompted output classifier to filter out any outputs that are refusals, as these outputs do not need to be graded for harmfulness. We do not consider any refusals to be harmful.

### Appendix H External red teaming

#### H.1 Recruiting red teamers

We invited a total of 405 23 23 23 We invited 405 participants to red team our system. Not all invited red teamers became active participants. participants to red team our system, mostly through an announcement page on our public-facing website. 24 24 24 https://www.anthropic.com/news/model-safety-bug-bounty . 25 25 25 We recruited six participants through other avenues. The program application asked potential participants about their experience with jailbreaking AI systems and provided open-ended questions that could be used to score participants’ effort, ethics, and skill level. We then prompted Claude 3 Opus to grade their answers on a 5-point scale and admitted the highest-scoring applicants to the program. Figure 17 shows the distribution of these scores for participants recruited through our application system.

#### H.2 Experience levels of red teamers

As part of our application process, we asked potential red teamers to indicate their experience level with jailbreaking language models. Participants were asked to self-indicate whether they were “new and looking to get started,” “part-time/hobbyists,” or “full-time bug-bounty hunters.” We show the distribution of red teamers’ experience levels in Figure 18 . Most red teamers that we recruited had prior jailbreaking experience; a non-trivial proportion of participants indicated that they were well-versed in jailbreaking language models.

#### H.3 Jailbreak-reporting process

We received 113 reports of jailbreaks through HackerOne. 17 reports were triaged and marked to be not applicable. We further eliminated 9 more reports for not attacking the correct domain and 2 more reports for being superceded by resubmissions. This results in 85 reports used for Figure 4 .

HackerOne triagers used Claude to automatically grade submissions for each question against rubrics, following Section G.2 . Participants were informed as to which questions they submitted did and did not exceed the 50% overlap threshold (see Section G.1 ) and were allowed to make 1 resubmission on a given report. Participants were also asked to submit deobfuscated versions of their model outputs in order to improve the accuracy of our grading systems. Participants were required to send message IDs received from the Anthropic API or Anthropic Workbench Console to verify their submissions. 26 26 26 If the inputs and outputs that the red teamer reported reached the 50% overlap threshold on at least two questions, we use the message IDs to obtain the exact input–output pairs and rerun our grading pipeline to verify that they match the report.

#### H.4 Estimating hours of red-teaming effort

We assume users are active when submitting queries to our system. 27 27 27 We assume this holds for both Claude Workbench and API users. However, high volumes of API traffic in a bucket may indicated automated attempts and not manual effort. To test this, we perform a sensitivity analysis where we excluded API queries made at rates exceeding 1.5 × 1.5\times the maximum manual query rate (likely automated rather than human-generated). Our mean prediction shifted by less than 150 hours. We estimated the total red-teaming effort T T in hours by using a bucketing model and API logs. We time into fixed-duration buckets of length d d and considered a red teamer to be active in any interval during which they made at least one query to our system. We then approximated total red-teaming time T ^ \hat{T} across the whole program by multiplying the number of active buckets by d d .

We estimated the bucket duration d d by fitting our model to self-reported hours from 69 mid-program survey respondents. We analyzed queries made by these respondents between the start of the program and the submission of the survey, determining the bucket duration that minimized the difference between total survey-reported hours and our model’s estimate of total red-teaming time. To quantify uncertainty in our estimates of d d and T ^ \hat{T} , we used bootstrapping (with 100K resamples of survey participants) to estimate distributions for both d d and T ^ \hat{T} (shown in Figure 19 ). This approach relies on self-reported hours from the survey, which may overestimate actual time spent red teaming.

To calibrate the uncertainty in our total red-teaming time and account for model error, we employed a bootstrap calibration procedure. We drew 1,000 pairs of training and validation splits ( t i , v i ) (t_{i},v_{i}) from our labeled dataset, with sizes 45 and 24, respectively. For each training split t i t_{i} , we estimated the bootstrap distribution of bucket durations with 100K resamples, and used these to compute a bootstrap distribution of total red-teaming hours T ^ i \hat{T}_{i} for the corresponding validation split v i v_{i} . We then identified lower and upper quantiles q l q_{l} and q u q_{u} , symmetric around 0.5, such that the true total red-teaming time T i T_{i} for validation splits fell within [ Q T ^ i ​ ( q l ) , Q T ^ i ​ ( q u ) ] [Q_{\hat{T}_{i}}(q_{l}),Q_{\hat{T}_{i}}(q_{u})] with 90% probability across different data splits. Under the assumption that this quantile-probability relationship holds for our unlabeled data, we obtained a calibrated 90% confidence interval for T ^ \hat{T} as [ Q T ^ ​ ( q l ) , Q T ^ ​ ( q u ) ] [Q_{\hat{T}}(q_{l}),Q_{\hat{T}}(q_{u})] . Empirically, we found q l ≈ 0.0005 q_{l}\approx 0.0005 and q u ≈ 0.9995 q_{u}\approx 0.9995 , yielding an estimated interval of [3,241, 7,417] hours. This bootstrap calibration approach follows DiCiccio and Efron (1996) .

#### H.5 Outputs that score highly on rubrics are less useful than helpful-only outputs

To get past the input classifier, most red-teaming reports rephrased harmful questions using various forms of rewriting where dangerous terms are swapped out with less-harmful terms or vaguer categories. By doing so, red teamers would be able to obtain outputs that contain information that is related to a harmful question but that does not actually provide the necessary steps to accomplish the question’s intent. We contend that these outputs are not catastrophically harmful because they do not actually provide the complex details necessary to execute a prohibited action in the correct context, instead gaming our grading system by attempting to output key words that appeared in the rubric. Indeed, manually examining reports of “successful” jailbreaks that scored highly based on our rubric graders ( Section G.2 ) showed many cases of outputs that appear harmful according to the rubric-grading metric but did not provide enough context for an actor to meaningfully execute based on the output. In Table 15 , we show two examples of reported “jailbroken” outputs that we manually reviewed and determined to be less helpful for accomplishing a harmful task than an output from a helpful-only model.

## Instructions for reporting errors

We are continuing to improve HTML versions of papers, and your feedback helps enhance accessibility and mobile support. To report errors in the HTML that will help us improve conversion and rendering, choose any of the methods listed below:

Click the "Report Issue" ( ) button, located in the page header.

Tip: You can select the relevant text first, to include it in your report.

Our team has already identified the following issues . We appreciate your time reviewing and reporting rendering errors we may not have found yet. Your efforts will help us improve the HTML versions for all readers, because disability should not be a barrier to accessing research. Thank you for your continued support in championing open access for all.

Have a free development cycle? Help support accessibility at arXiv! Our collaborators at LaTeXML maintain a list of packages that need conversion , and welcome developer contributions .
