Curriculum Learning for Safety Alignment

Sandeep Kumar, Virginia Smith, Chhavi YadavarXiv 2026

TL;DR

Direct Preference Optimization (DPO) is a highly popular method for safety alignment in large language models, but it is notoriously brittle against jailbreaks and out-of-distribution prompts. This paper introduces Staged-Competence, a curriculum learning framework that organizes safety preference data from easy to hard. By gradually expanding the training pool and progressively updating the reference model, it significantly boosts jailbreak resistance and out-of-distribution safety without sacrificing general model capabilities.

What Problem Does This Paper Address?

Safety alignment ensures that LLMs refuse harmful requests (like instructions for building weapons) while remaining helpful on benign ones. While Direct Preference Optimization (DPO) has emerged as a simpler alternative to traditional RLHF—optimizing directly on human preference pairs (safe vs. unsafe responses)—it has a major flaw: it is brittle.

Standard DPO suffers from poor out-of-distribution (OOD) generalization and is highly vulnerable to adversarial jailbreak attacks. Recent work reveals that standard DPO safety alignment is often "shallow," concentrating its defensive effects almost entirely on the first few tokens of a response. If an attacker uses a "prefill attack" to force the model to start with an affirmative phrase (e.g., "Sure, I can help with that"), the shallow alignment breaks down, and the model proceeds to generate harmful content.

Methods

The authors propose Staged-Competence, a curriculum-based training framework designed to instill more robust safety features. The method operates in two distinct phases:

  1. Phase 1: Difficulty Scoring (Preference Alignment Margin) Instead of relying on static linguistic heuristics to determine what makes a prompt "hard," the authors measure difficulty dynamically based on the unaligned model's own behavior. They introduce a metric called the preference alignment margin ($m_i$). By passing a prompt through the base model, they compute the embedding of its zero-shot response and calculate how much closer it is to the safe response versus the unsafe response. A small or negative margin indicates that the model naturally struggles to differentiate safe from unsafe behavior, marking the sample as "hard." The dataset is then sorted globally from easiest to hardest.

  2. Phase 2: Curriculum Training The sorted data is partitioned into $K$ equal difficulty buckets (stages). Training progresses through these stages using two core mechanisms:

  3. Within-Stage Competence Sampling: Rather than randomly shuffling data within a bucket, a square-root scheduling function gradually expands the pool of eligible training samples over time. This prevents the model from being overwhelmed by harder examples too quickly.

  4. Between-Stage Reference Model Updates: At the end of each stage, the DPO reference model ($\pi_{ref}$) is updated to match the current trained policy. This allows the model to lock in basic safety concepts and focus its capacity on assimilating the next tier of difficulty.
Overview of the Staged-Competence pipeline

Datasets

During their research, the authors discovered massive label noise and inconsistencies in popular open-source safety datasets like PKU-SafeRLHF and Anthropic's HH-RLHF (e.g., "chosen" responses that still contained harmful advice).

To conduct a clean study, they used a GPT-4o-mini judge to filter out these corrupted pairs, retaining only pairs with a truly safe chosen response and a truly unsafe rejected response. This resulted in a high-quality, combined dataset called Cleaned-PKU-HH-SafeRLHF (10,931 clean pairs retained from 92,840 raw pairs), which they have released to the community.

Key Insights and Ideas

  • Deep vs. Shallow Alignment: Standard DPO only teaches the model to say "I cannot fulfill this request" at the very beginning of a sequence. Staged-Competence forces a much deeper token suppression, meaning the model actively resists generating harmful content even deep into its generation sequence.
  • Reference Updates Prevent Forgetting: Updating the reference model between stages acts as a critical stabilizer. It prevents the policy from drifting or forgetting simpler safety constraints while trying to learn how to handle complex adversarial attacks.
  • Curriculum Value Scales with Model Size: The safety gap between Staged-Competence and standard DPO widens monotonically as models grow larger. Larger unaligned models are inherently more capable and dangerous, making structured curriculum learning increasingly vital at scale.
Staged-Competence safety advantage scaling with model size

Key Results

The authors evaluated their method across three open-source model families (LLaMA-3-8B, Qwen3-8B, and Yi-1.5-9B) using "abliterated" variants (models with built-in safety guardrails stripped out) to ensure safety was learned entirely from scratch.

  • Robustness Boost: Averaged across the model families, Staged-Competence reduced OOD harmful response rates by 16% and slashed jailbreak attack success rates by 20% compared to standard DPO.
  • Greater Confidence: It achieved roughly 3× greater reward margin separation between safe and unsafe responses, showing distinct upward confidence jumps at each stage boundary.
Training dynamics and mean test margin across model families
  • Sustained Token Suppression: Token-level analysis proved that safety alignment penetrates much deeper into the response generation sequence under the curriculum framework.
Per-token suppression of unsafe response tokens
  • Data Efficiency: Staged-Competence trained on just 75% of the data matched or exceeded the safety performance of standard DPO trained on 100% of the data.

Limitations and Future Work

  • Scale Constraints: Due to compute limitations, the study focused primarily on the 8B parameter range. Evaluating the curriculum's effects on frontier-scale models (70B+) remains an open question.
  • Parameter Efficiency: The fine-tuning was restricted to LoRA rather than full parameter fine-tuning.
  • Beyond Safety: While highly effective for safety, the authors note that the Staged-Competence framework is agnostic to the underlying loss function and should be extended to other alignment domains like helpfulness, coding, or instruction-following.

Summary updated

BibTeX
@misc{kumar2026curriculum,
  author = {Sandeep Kumar and Virginia Smith and Chhavi Yadav},
  title = {{Curriculum Learning for Safety Alignment}},
  year = {2026},
  eprint = {2605.26315},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.26315},
}
Figure