Deliberative Alignment: Reasoning Enables Safer Language Models

Paper · arXiv 2412.16339 · Published December 20, 2024
LLM Alignment

As large-scale language models increasingly impact safety-critical domains, ensuring their reliable adherence to well-defined principles remains a fundamental challenge. We introduce Deliberative Alignment, a new paradigm that directly teaches the model safety specifications and trains it to explicitly recall and accurately reason over the specifications before answering. We used this approach to align OpenAI’s o-series models [1], and achieved highly precise adherence to OpenAI’s safety policies, without requiring human-written chain-of-thoughts or answers. Deliberative Alignment pushes the Pareto frontier by simultaneously increasing robustness to jailbreaks while decreasing overrefusal rates, and also improves out-of-distribution generalization. We demonstrate that reasoning over explicitly specified policies enables more scalable, trustworthy, and interpretable alignment.

Introduction. Modern Large Language Models (LLMs) are safety trained using Supervised Fine Tuning (SFT) and Reinforcement Learning from Human Feedback (RLHF) to mitigate harmful, undesirable, or otherwise disallowed outputs [2]–[4]. Despite ongoing advances in these methods, today’s models still exhibit safety shortcomings: they can be tricked into revealing harmful content, often refuse legitimate requests, and remain vulnerable to jailbreak attacks [5]–[8]. We argue that many of these failures arise from two limitations in modern safety training. First, LLMs must respond instantly to user requests using a fixed amount of compute, without deliberation even for complex safety scenarios. Second, LLMs must infer underlying safety standards indirectly from large sets of labeled examples, rather than directly learning the safety specifications that govern them. This reliance on implicit, pattern-based learning leads to poor data efficiency and makes it challenging for models to generalize when facing unfamiliar scenarios or adversarial attacks. We propose deliberative alignment, a training approach that teaches LLMs to explicitly reason through safety specifications before producing an answer. By applying this method to OpenAI’s o-series models [1], we enable them to use chain-of-thought (CoT) reasoning to examine user prompts, identify relevant policy guidelines, and generate safer responses (e.g., Figure 1). Our method proceeds in two core stages, integrating process- and outcome-based supervision [9]. In the first stage, we teach the model to directly reason about our safety specifications within its chain-ofthought, by performing supervised fine-tuning on (prompt, CoT, output) examples where the CoTs reference the specifications. We construct this dataset using context distillation [10], [11] and an o-type model trained only for helpfulness (i.e. trained without any safety-relevant data). Concretely, we present the model with the safety specifications as part of the system prompt, generate model completions, and then strip away the system prompts to form the final dataset. This stage provides the model with a strong prior for reasoning

Related work. Deliberative alignment is the first alignment approach that directly teaches a model the text of its safety specifications and trains the model to reason over these learned specifications at inference time to give safer responses. Figure 15 highlights the distinctions between Deliberative alignment and representative methods of existing alignment approaches. The left column of the figure shows the different ways that specifications are incorporated into the training data, and the right column illustrates the inference time behavior of models trained under the different methods. Deliberative alignment is applicable to models that have CoT reasoning.

Traditionally, safe model behavior is instilled into LLMs using supervised finetuning (SFT) followed by reinforcement learning from human feedback (RLHF) [28]. Direct Policy Optimization (DPO) is an alternative to RLHF that skips the reward model and directly optimizes the policy model using preference data [29]. Constitutional AI (CAI) [26] builds on the standard SFT + RLHF paradigm, incorporating a predefined set of principles to guide behavior called a “constitution” (which is comparable to our spec). During CAI’s SFT phase, the initial responses from an AI model are critiqued and revised by the same model supplied with the constitution text. The revision from the (response, critique, revision) sequence is ultimately used, alongside the prompt, for SFT training. CAI’s RL stage uses a preference model that was finetuned on preference data from an AI model given the constitution. To summarize these approaches, specifications are added to the model in the following steps:

Crucially, while the SFT labels and preference scores of the prior methods are a function of the specification given to the human or AI labeler, these specifications are never explicitly provided to the policy model itself. Only the final answer itself is used in training.(Note how the critiques in CAI, which are loosely analogous to our CoT, are not employed during optimization.) In contrast, in Deliberative Alignment, the model memorizes the policies in its CoT and learns how to apply it in context, and the CoT is directly optimized during SFT. It is also worth noting that our model varies the specification information given to each training example, enabling us to cumulatively teach the model more detailed and nuanced safety policies than would be possible with a fixed constitution.

5.2 Inference-time Safety Reasoning There is a substantial body of work focused on enhancing LLM outputs using a critique-and-refine approach that leverages natural language feedback (for a comprehensive overview, see [27], [30]).

Method. Our approach to deliberative alignment is motivated by the following observation: given access to our actual safety policies, o1 models are often able to correctly reason over how to respond to potentially unsafe prompts. Thus, one natural approach is to simply place the text of all of our safety specifications in context at deployment time, and instruct the model to check all the policies before answering. However, such an approach comes with a clear latency cost: in most cases, reasoning over pages of safety specifications is overkill for benign user prompts. Moreover, if the model fails at instruction following, it may miss a relevant part of the policy and output unsafe content. Deliberative alignment instead seeks to embed knowledge of our safety specifications directly in the underlying model, by teaching the model to identify when a policy might be relevant and then reason over that policy to produce a policy-compliant answer. Indeed, as we find in Section 4.1, deliberative alignment more reliably aligns the model to specifications than providing those specifications at deployment time.

Below, we first provide a high level overview of our method. We then discuss each step of our method in more detail in the following subsections.

We define a generative reasoning model G as a model that takes as input a prompt and outputs a completion that includes a chain-of-thought (CoT). Given an initial reasoning model Gbase, our aim is to produce a generative reasoning model Gspec whose answers adhere to safety specifications (spec for short). We train our model in two stages: supervised fine-tuning followed by reinforcement learning. Figure 3 illustrates our overall method. At a high level it has the following steps:

Data Generation We start with a collection of prompts with associated safety categories (e.g., erotic, selfharm). For each (prompt, category) pair, we compose safety specifications relevant to that prompt’s safety category including information on disallowed content and style. We then collect (CoT, output) completions which reference our policies within the chain-of-thought, by prompting the spec-agnostic reasoning model Gbase with the text of the associated safety specification.

Filtering We use “judge” reasoning model GRM prompted with our spec to choose high-quality completions. We then drop the spec from the prompts, resulting in a list of (prompt, CoT, output) tuples.

Supervised Fine-Tuning (SFT) We then train Gbase on the filtered completions using supervised finetuning. The model learns to complete prompts in a specification-aligned manner by referring to the policies referenced in its CoTs.

Reinforcement Learning (RL) During the RL stage, for safety-relevant prompts, we again use our “judge” model GRM with access to our safety policies to provide additional reward signal.

The specifications that we aim to align our model Gspec with consist of content policies for different safety categories, as well as style guidelines for how to respond. Examples of safety categories include: erotic content, extremism, harassment, illicit behavior, regulated advice, self-harm, and violence. For each safety category, the corresponding content policy defines relevant terms and then describes the circumstances under which user requests are 1) “allowed”, such that the model should comply, 2) “disallowed”, such that the model should refuse, or 3) “requires safe completion.” Section 3.1.1 shows excerpts of the content policies for the illicit behavior and self-harm safety categories. The specifications we used are based in part on OpenAI’s published model spec [14]. Style guidelines in the spec give detailed instructions on how to comply, refuse, or safe-complete once the model decides to do so based on the content policies. Figure 4 shows excerpts from the hard refusal style guidelines. Safe completions are necessary in cases where the model cannot simply comply due to the sensitive nature of the request, but outright refusal to respond may also be harmful or inappropriate. Detailed topic-specific safe-completion guidelines are provided in the spec for safety categories such as selfharm and regulated advice (e.g.

Discussion. We are encouraged by Deliberative Alignment’s effectiveness on improving alignment to OpenAI’s policy specifications and robustness to jailbreaks. The method also allows us to specify the boundary between compliance, refusal, and safe completion in finer detail than was possible before. We believe this nuanced control can lead to models that are not just safer but also more helpful. The method’s use of a synthetic data generation pipeline to create training data from provided specifications and prompts also makes it a relatively scalable approach to alignment. We anticipate OpenAI’s policies will keep evolving, but that training models to precisely follow the current defined set of policies is essential: This practice helps us build the skills for aligning with any policy requirements, providing invaluable preparation for future scenarios where the stakes are extremely high or where strict adherence to policies is critical.

This work connects to a broader question in AI safety: will advancements in alignment keep pace with AI capabilities? That o1 model’s enhanced reasoning abilities allow for more effective implementation of alignment strategies offers optimism that alignment is progressing alongside capabilities. However, this encouraging trend may not persist indefinitely. As AI models grow more sophisticated, they could develop goals that diverge from those intended by their developers. For instance, a highly intelligent and self-aware AI might reject the constraints and objectives set by humans [34]. Alternatively, an AI could remain committed to its human-assigned terminal goal but, in the process, pursue instrumental goals like self-preservation, resource acquisition, or enhancing its cognitive abilities [35], [36]. These power-seeking tendencies could lead to harmful or unintended consequences. And as models gain more intelligence and autonomy, the scale of potential harm from misalignment increases dramatically, with the risk of catastrophic outcomes. This underscores the urgent need for ongoing research in AI alignment. We are actively investing in better alignment strategies and research areas like monitoring chain-of-thoughts for deception [37], [38], to ensure that as AI systems become more capable, they remain aligned with human values.

Lines of inquiry this paper opens 24

Research framings built by reading the notes related to this paper — the questions it feeds into.

Do models' awareness of evaluation contexts actually change their behavior? Why don't component-level safety measures prevent system-level safety failures? Should AI alignment prioritize individual preferences, collective norms, or roles? What are the fundamental limits of prompt-based debiasing? Why does model self-revision amplify confidence in incorrect answers? Can AI systems sustain recursive self-improvement without human intervention? What mechanisms ensure safety in deployed AI agents despite compositional risks? What makes AI failures visible and contestable to users? Why does iterative refinement amplify reasoning errors instead of correcting them? Can single-axis benchmarks accurately measure deployment-ready agent capability? Do AI systems conditionally comply when they know they're being monitored? Can models effectively hide reward-seeking despite apparent safety alignment? How do architecture and coordination patterns drive multi-agent reliability?