Skip to content

Rethinking GRPO for safety alignment of large reasoning modelsRethinking GRPO for Large Reasoning Model Safety Alignment

arXiv: Jailbreaks, Prompt Injection, Poisoning & Defenses· arXiv:2610.23085· Jiawei Chen, Yi Zhang, Jiawei Du, Zhonghou Lv, Tairan Chen, Junyuan Shang, Jinchang Hou, Xiao Yang, Yu Tian, Chenfu Bao, Chao Yu, Zhaoxia YinEast China Normal University; Baidu Inc.; Zhongguancun Academy; CFAR, A*STAR; Stevens Institute of Technology; Beihang University; 360 Security Capability Center; Tsinghua UniversityIndexed by this site · 2026-10-19· Originally publishedDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

Beacon uses SSR and SUDA to improve GRPO; across four models, average safety errors drop by at most 32.83 percentage points (Table 1).

Questions
LRMs can produce unsafe content in reasoning trajectories or final answers. GRPO performs safety alignment via within-group relative advantage, but when within-group outcomes are similar the signal disappears, and unsafe behavior may also become more diverse.
Methods
Beacon is divided into SSR and SUDA. SSR retains high-contrast trajectories by advantage difference, and when the whole group is unsafe switches to maximizing the likelihood of the safety reference. SUDA uses only the safety score on harmful prompts, takes the minimum of safety and the mean of utility and honesty on benign prompts, and performs KL anchoring only on benign prompts.
Experiments and results
The main experiments cover four LRMs and eight benchmarks. The authors state that Beacon has the lowest average safety error and the highest average reasoning, a decrease of 17.69–32.83 percentage points relative to the initial model, and XSTest over-refusal of 0.40%–1.20%. On HarmBench, the average ASR of four attacks is 1.33%.
Limitations and future work
The authors note reliance on existing reward models and safety judges, and alignment mainly on harmful and benign prompts. The main table covers four models and eight benchmarks; the paper does not state the model tested in the adversarial experiments, nor report the sample size of the main benchmarks or human agreement.
Experimental setupQwen3-4B、Qwen3-8B et al. · HarmBench、StrongREJECT et al. · harmful response rate、average safety error et al.
Evaluated models
Qwen3-4BQwen3-8BDeepSeek-R1-Distill-7BDeepSeek-R1-Distill-8BQwen3-0.6BQwen3-1.7BQwen3-14B
Benchmarks
HarmBenchStrongREJECTWildJailbreakXSTestAIME24GSM8KMATH500GPQA
Metrics
harmful response rateaverage safety errorover-refusalpass@1attack success rate
AI summaryThe paper identifies two failure modes of GRPO in safety alignment of large reasoning models, and proposes the Beacon framework, which reduces average safety errors by up to 32.83 percentage points on four Qwen3 and DeepSeek-R1-Distill variants across eight benchmarks while maintaining low over-refusal. The two failure modes are advantage collapse, where homogeneous rollout groups produce advantages that tend toward vanishing, and unsafe diversification, where unsafe behaviors persist and become increasingly diverse. Theoretical analysis suggests that behavioral consistency weakens within-group safety contrast, and that the entropy regularizer makes unsafe responses more diverse when the relative signal disappears. Beacon consists of two parts: safety signal recovery and safety-usefulness decoupled alignment; the former uses advantage-guided trajectory filtering and safety reference supervision to recover safety learning signals, and the latter uses category-aware rewards and KL anchoring on benign samples only to mitigate over-refusal.

The paper identifies two failure modes of GRPO in safety alignment of large reasoning models, and proposes the Beacon framework, which reduces average safety errors by up to 32.83 percentage points on four Qwen3 and DeepSeek-R1-Distill variants across eight benchmarks while maintaining low over-refusal. The two failure modes are advantage collapse, where homogeneous rollout groups produce advantages that tend toward vanishing, and unsafe diversification, where unsafe behaviors persist and become increasingly diverse. Theoretical analysis suggests that behavioral consistency weakens within-group safety contrast, and that the entropy regularizer makes unsafe responses more diverse when the relative signal disappears. Beacon consists of two parts: safety signal recovery and safety-usefulness decoupled alignment; the former uses advantage-guided trajectory filtering and safety reference supervision to recover safety learning signals, and the latter uses category-aware rewards and KL anchoring on benign samples only to mitigate over-refusal.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    When the within-group safety contrast disappears in GRPO, the safety direction is missing; Beacon recovers the signal with SSR and SUDA and separates utility.

    When vanilla GRPO is used for LRM safety post-training, the within-group safety contrast weakens or disappears, providing no learning signal that points toward safety.

    • Setting: The LRM first generates a reasoning trajectory and then gives the final answer. The authors state that unsafe content may appear in the trajectory or the answer, so harmful behavior must be prevented while preserving reasoning and helpfulness on legitimate tasks.
    • Gap in existing approaches: The authors state that existing work uses PPO, DPO and GRPO for LRM safety alignment, but mostly focuses on data construction and reward design (Kim et al., 2026), and discusses within-group relative optimization less. Sampled answers may have different reasoning while the safety conclusion remains the same.
    • Observation: Vanilla GRPO is run on Qwen3 and DeepSeek-R1 with harmful prompts and a binary safety reward. The authors report two phenomena: advantage collapse and unsafe diversification. Figure 1 states that half of the eight-response groups are entirely unsafe with a within-group relative advantage of zero; on difficult harmful prompts the unsafe rate remains high, and the semantic entropy of unsafe answers rises with training.
    • Theoretical judgment: The more consistent the behavior, the harder it is for safe and unsafe answers to co-occur within a group, and the relative signal GRPO needs disappears accordingly; when the relative term is zero, entropy regularization spreads probability over unsafe modes with the same reward (Theorem 1, 2).
    • Proposed method: The authors propose Beacon, comprising Safety Signal Recovery (SSR) and Safety-Utility Decoupled Alignment (SUDA). The former recovers the safety learning signal, and the latter optimizes harmful/benign separately to reduce over-refusal.
  2. What related research exists?

    Related work is divided into LRM safety alignment and handling of GRPO advantage collapse; the authors state that the latter is still rarely examined in safety alignment.

    LRM safety alignment

    • The SFT route supervises with safety data or safety reasoning traces; the paper names STAR-1 (Wang et al., 2026), SafeKey (Zhou et al., 2025), and ThinkSafe (Lee et al., 2026).
    • The preference or reinforcement learning route directly optimizes behavior; the paper names DPO (Rafailov et al., 2023), Zhang et al. (2026b), as well as Kim et al. (2026) and QA-LIGN (Dineen et al., 2025). The authors state that these methods improve LRM safety reasoning, but persistent unsafe responses on hard prompts remain insufficiently addressed.
    • On the objective formulation, Fu et al. (2026) is cited as reducing harmful outputs while still being able to answer benign requests. The methods section calls the generalization from suppressing harmful behavior to unnecessary refusal safety tax (Huang et al., 2025).

    GRPO and advantage collapse

    • GRPO (Shao et al., 2024) does not train a separate value model and updates using within-group relative advantages. The authors state that it may exhibit advantage collapse.
    • One class of approaches restructures the advantage or adds virtual samples: NGRPO (Nan et al., 2025), He et al. (2026), Le et al. (2026). Another class changes reward normalization or adds external guidance: GDPO (Liu et al., 2026), Edge-GRPO (Zhang et al., 2025), Scaf-GRPO (Zhang et al., 2026a).
    • The authors state that these works mainly care about whether sampled responses give useful relative feedback; in safety alignment, which must be harmless without harming helpfulness, the effect remains underexplored.

    Baseline methods and benchmarks

    • Baseline methods: SFT-type are DirectRefusal, SafeChain, STAR-1, SafePath, SafeKey, ThinkSafe; optimization-type are GRPO, DPO, SFT+GRPO; those targeting advantage collapse are NGRPO, GDPO, MDP-GRPO (Salmani-Zarchi et al., 2026).
    • Benchmarks: safety is HarmBench, StrongREJECT, WildJailbreak, over-refusal is XSTest; reasoning is AIME24, GSM8K, MATH500, GPQA. Adversarial evaluation uses GCG, PAIR, AutoDAN, TAP on the 300 harmful behaviors of HarmBench.

    The authors position this paper as: analyzing the optimization dynamics of GRPO from a safety perspective, and on that basis proposing a GRPO framework for LRM safety alignment.

  3. How does the paper address this problem?

    Beacon uses AGTF to retain high-contrast trajectories, uses SRS to supervise the safety reference when the advantage is zero, and uses category rewards and benign-only KL to suppress over-refusal.

    Beacon adds two modules to GRPO: when there is a relative difference, it keeps high-contrast trajectories; when the difference disappears, it uses a safety reference to give direction; harmful and benign prompts use different rewards, and only benign prompts are anchored back to the pre-alignment policy.

    Problem setup and GRPO signal

    • The data is D=Dh∪ Db. The goal is to improve safety S(y)∈{0,1} on harmful requests and preserve utility U(y) on benign requests. The paper writes maxθ 𝔼q∼ Dh,y∼πθ(·|q)[S(y)]+λu𝔼q∼ Db,y∼πθ(·|q)[U(y)] (Eq. 11). The paper does not give the value of λu.
    • G responses are sampled per prompt, and the within-group advantage is the reward minus the group mean, divided by the group standard deviation plus ϵ. The policy objective uses the clipped policy ratio; the common regularizer is the KL relative to the reference policy, plus entropy. In the experiments G=8, and both λH and λKL are set to 1.0.
    • The authors state that the limitation is not in the safety objective itself, but that after behavior becomes consistent, within-group contrast decreases and GRPO gets no informative, safety-directed signal.

    Theoretical characterization of two failures

    • Advantage collapse: Theorem 1 assumes G independent samples. The probability that a group contains both safe and unsafe responses is Pmix(q)=1−pqG−(1−pq)G, and this probability tends to 0 as pq tends to 0 or 1. If all rewards in the group are the same, all advantages are 0. The authors regard pq→ 1 as saturation on already-safe prompts; more critically, when pq→ 0 the whole group is unsafe, and there is still no direction toward the safe region.
    • Unsafe diversification: after the relative term disappears, the local objective mainly leaves Jreg=−λKLDKL(πθ∥πref)+λH H(πθ). Theorem 2 assumes the locally reachable set Uq is entirely unsafe with identical rewards; maximizing Jreg on it yields a distribution flatter than the reference distribution, with entropy not lower than the reference distribution. The authors consider that entropy regularization itself does not prefer unsafe responses, but after the signal disappears exploration is mainly spread over unsafe modes, and KL also restricts large departures from the reference policy. The derivation is in Appendix A.

    SSR: restoring the safety signal

    • AGTF: sort by advantage descending, pair the largest with the smallest, use the advantage difference Δi to keep only the top-κ proportion of pairs, and subsequent updates use only these trajectories. This step is done for both harmful and benign prompts (Algorithm 1). The authors state that near-zero advantages contribute little and also dilute more discriminative trajectories. The experiment takes κ=0.75.
    • SRS: used only for q∈ Dh. Maximize the autoregressive log-likelihood of the safety reference yq∗, covering the reasoning trace, final answer, and EOS. The objective on harmful prompts is Jh=JGRPO+λSRSJSRS, λSRS=1. The reference comes from ThinkSafe's safety reference responses. The authors state that when the whole group is unsafe, or there are only "relatively better but still unsafe" responses, relative feedback does not specify what a safe response should look like.

    SUDA: separating safety and utility

    • Category-aware reward: ArmoRM-Llama3-8B gives continuous scores safety rs, utility ru, honesty ro, each score looking at both the reasoning trace and the final answer. r̄ is the mean of the three. The format gate is F(y)∈{0,1}. The reward on harmful prompts is F· rs; on benign prompts it is F·min(rs,r̄). The authors state that the min prevents the reward from being dominated by the safety score alone, thereby reducing over-refusal with high safety and low utility. The paper does not elaborate the specific definition of the format rules.
    • Benign-only KL: only on q∈ Db, subtract λb DKL(πθ(·|q)∥πbase(·|q)) from the GRPO objective, λb=1. πbase is the policy before safety post-training, fixed during training; it uses a different symbol from GRPO's original πref, and the paper does not state whether the two are the same model. The authors state that this limits drift on benign requests without restricting safety updates on harmful prompts.
  4. What experiments did the paper conduct?

    The authors state that on the four models Beacon has the best average safety and reasoning, with safety error reduced by up to 32.83 percentage points.

    Experimental setup

    • Models tested: the main table is Qwen3-4B, Qwen3-8B, DeepSeek-R1-Distill-7B, DeepSeek-R1-Distill-8B. The scale experiment additionally has Qwen3 0.6B, 1.7B, 14B (Figure 4). The reward model is ArmoRM-Llama3-8B, which the paper states ranks first among reward models on RewardBench.
    • Training data and optimization: the data and SRS objective come from ThinkSafe; the paper does not report the training set size. LoRA is applied only to q_proj, v_proj, with r=32, α=16, dropout 0.05. AdamW, initial learning rate 1× 10−5, cosine, first 10% warmup, 4500 steps, BF16. 8 rollouts per prompt, 9 prompts per batch (72 responses); training sampling temperature 0.7, top-p 1.0, prompt max length 1024, completion max length 8192. λSRS=λb=λH=λKL=1, κ=0.75.
    • Benchmarks and metrics: safety is the harmful response rate on HarmBench, StrongREJECT, WildJailbreak, plus over-refusal on the XSTest safe subset; the average of the four is average safety error (↓). Reasoning is pass@1 (↑) on AIME24, GSM8K, MATH500, GPQA. Except for the 300 items in the adversarial experiment, the paper does not report the number of items per benchmark.
    • Judging and decoding: the harmful rate is a single generation, judged by Llama-Guard-3; over-refusal uses WildGuard. Reasoning follows the SkyThought protocol, decoding 8 times per question and then averaging. Appendix B: Qwen temperature 0.6, top-p 0.95, top-k 20, max length 32768; Distill temperature 0.6, top-p 0.95, same length cap.
    • Baselines: six SFT-type, plus GRPO, DPO, SFT+GRPO, and NGRPO, GDPO, MDP-GRPO. The optimization comparison in Table 2 is only on Qwen3-8B.

    Main results

    Table 1's average safety error includes the three harmful rates and XSTest. The reduction is the table's annotation relative to Initial (percentage points).

    Swipe horizontally to read the table

    ModelBeacon safety AvgRelative to InitialBeacon reasoning AvgGRPO safety AvgThinkSafe safety Avg
    Qwen3-4B1.69%20.8978.02%24.94%5.05%
    Qwen3-8B1.88%17.6980.64%15.52%4.50%
    DeepSeek-R1-Distill-7B16.26%27.4770.50%24.69%29.46%
    DeepSeek-R1-Distill-8B6.27%32.8367.94%16.12%19.09%
    • The authors state that on the four models Beacon has the lowest average safety error and the highest average reasoning; the main text writes that relative to the initial policy, safety error drops by 17.69–32.83 percentage points, reasoning rises by 0.26–4.56 percentage points, and XSTest over-refusal is 0.40%–1.20%. The contribution item writes a maximum drop of 32.83%, while the abstract and Table 1 write 32.83 percentage points.
    • Best on average does not equal best in every cell: on Distill-8B's HarmBench, GRPO is 18.77% and Beacon is 20.93%; on Qwen3-4B's XSTest, Initial, GRPO, SafeKey are 0.80% and Beacon is 1.20%; on Distill-8B's GPQA, Initial is 48.11% and Beacon is 47.58%.
    • The authors use Distill-8B to compare safety tax: GRPO's average reasoning is 63.33% and XSTest is 25.60%, while Beacon's XSTest is 0.40%. The authors state that the safety improvement is not uniform refusal. DirectRefusal's XSTest is 32.00%, 37.60%, 43.60%, 50.00%.

    Comparison with other optimization methods

    Table 2 is only Qwen3-8B, with columns average safety error and average reasoning.

    MethodSafety AvgReasoning Avg
    DPO17.92%78.93%
    GRPO15.52%78.07%
    SFT+GRPO12.49%78.70%
    GDPO16.10%77.56%
    NGRPO16.09%78.47%
    MDP-GRPO16.54%78.59%
    Beacon1.88%80.64%
    • The authors state that Beacon's gap relative to GRPO is 13.64 and 2.57 percentage points.
    • The authors consider that GDPO, NGRPO, MDP-GRPO do not have lower average safety error relative to GRPO, and that only broadly handling advantage collapse is insufficient for safety alignment.

    Adversarial attacks and multiple judges

    • The adversarial protocol follows LPA, using GCG, PAIR, AutoDAN, TAP on the 300 harmful behaviors of HarmBench. The paper does not state the model tested. The authors state that Beacon has the lowest ASR on GCG, PAIR, TAP, and ties with SafeChain on AutoDAN; the average ASR is 1.33%, 5.25 and 10.42 percentage points lower than ThinkSafe and GRPO (Figure 5). The per-method readings in the figure are not transcribed item by item here because the column alignment is unreliable.
    • Table 3 evaluates only Qwen3-8B. The safety score includes harmful rate and over-refusal. On Llama-Guard-3, Beacon is 1.88 and 80.64; GPT-6 is 2.10 and 81.46; human is 1.94 and 80.73. The authors state that under all three judges it is lowest on safety and highest on reasoning, with small differences in absolute scores. The paper does not report the human sample size and agreement, nor the judging details of GPT-6.

    Component ablation

    Table 4 adds AGTF, SRS, CAR, BKL step by step on Qwen3-8B. Safe Rollout is the proportion of safe responses on harmful prompts.

    Swipe horizontally to read the table

    ComponentsSafety errorXSTestReasoningSafe Rollout
    AGTF5.16%10.20%78.26%24.34%
    AGTF+SRS2.36%14.40%78.89%49.74%
    SRS+CAR+BKL5.42%1.40%79.21%50.46%
    AGTF+CAR+BKL4.68%1.60%79.45%50.38%
    AGTF+SRS+BKL2.04%7.80%79.96%50.32%
    AGTF+SRS+CAR2.25%6.60%79.94%50.34%
    All1.88%1.20%80.64%50.64%
    • The authors state that SRS supplies the insufficient relative feedback: Safe Rollout rises from 24.34% to 49.74%, and safety error drops from 5.16% to 2.36%; at this point XSTest rises to 14.40%.
    • The authors state that after further adding CAR and BKL, XSTest drops from 14.40% to 1.20%, and reasoning rises from 78.89% to 80.64%. The paper does not explain the remaining rows row by row.

    Other ablations and analyses

    • Figure 3 (Qwen3-8B) compares GRPO, adding AGTF, further adding SRS, and the full method, with metrics being the proportion of all-unsafe groups with near-zero advantage (maxi|Âi|<0.05), the proportion of all all-unsafe groups, and the normalized semantic entropy of equally sampled unsafe responses. The authors state that all three generally decrease and are lowest for the full method; the main text does not give the curve endpoint values.
    • Figure 4: five Qwen3 sizes (0.6B, 1.7B, 4B, 8B, 14B). The authors state that Beacon has the lowest average safety error and the highest average reasoning on all; relative to the initial model, safety error drops by 15.56–30.42 percentage points, and reasoning is maintained or improved.
    • Figure 6: κ∈{0.25,0.50,0.75,1.00}, models are Qwen3-1.7B, 4B, 8B, and the comparison is κ=1.00. The authors state that κ=0.75 is best on the three models, and keeping only 25% of trajectories makes the overall result worse.
  5. What are some points that can be further explored?

    The authors note that the framework relies on existing reward and judge signals, and mainly covers harmful and benign prompts.

    Limitations noted by the authors and future directions

    • Beacon relies on existing reward models and safety judges to provide safety, utility, honesty signals. The authors state that although consistent improvements are seen across multiple judges, the effect may still depend on the quality and reliability of these signals; the future direction is more robust, adaptive reward modeling (Limitations).
    • The work mainly does safety alignment under harmful and benign prompts. The authors propose extending it to factuality, uncertainty calibration, and long-horizon interaction to broaden applicability in real alignment scenarios (Limitations).

    Scope of experimental coverage

    • Table 1 reports Qwen3-4B, Qwen3-8B, DeepSeek-R1-Distill-7B, DeepSeek-R1-Distill-8B, with three safety items plus XSTest, and four reasoning items.
    • Figure 4 covers Qwen3 0.6B, 1.7B, 4B, 8B, 14B; Figure 6 is Qwen3-1.7B, 4B, 8B; Tables 2, 3, 4 and Figure 3 are on Qwen3-8B.
    • The adversarial experiment is GCG, PAIR, AutoDAN, TAP, on 300 harmful behaviors of HarmBench; the paper does not state the model tested in this experiment.
    • The harmful rate is a single generation judged by Llama-Guard-3, over-refusal uses WildGuard, and reasoning is the average pass@1 of eight generations. The paper does not report the number of items in the main benchmarks, the number of training repetitions, the human sample size, or human agreement.
    • The reward is computed by ArmoRM-Llama3-8B; the training data comes from ThinkSafe, and the paper does not report the training set size. The group size is 8, training is 4500 steps, κ=0.75.
  6. Summarize the main content of the paper

    Beacon targets GRPO's advantage collapse and unsafe diversification, using SSR and SUDA for LRM safety alignment.

    Beacon changes the optimization signal of GRPO in LRM safety post-training, rather than building another data pipeline or inference-time filter.

    • Problem: Both reasoning trajectories and final answers can be unsafe. GRPO relies only on within-group relative advantage; when the whole group is equally unsafe, the advantage is zero, and entropy regularization may also make unsafe answers more diverse. In preliminary experiments with harmful prompts and a binary safety reward, Figure 1 states that half of the eight-response groups are entirely unsafe.
    • Method: SSR retains high-contrast trajectories by advantage difference and maximizes the likelihood of the ThinkSafe safety reference on harmful prompts. SUDA rewards only the safety score on harmful prompts, uses constrained rewards for safety, utility and honesty on benign prompts, and anchors back to the pre-alignment policy only on benign prompts. λSRS, λb and GRPO's KL and entropy coefficients are all set to 1, and κ=0.75.
    • Main results: In Table 1, across the four models, Beacon's average safety error is 1.69%, 1.88%, 16.26%, 6.27%, a decrease of 20.89, 17.69, 27.47, 32.83 percentage points relative to the initial model; average reasoning is 78.02%, 80.64%, 70.50%, 67.94%. XSTest over-refusal is 0.40%–1.20%. The contribution bullet writes a maximum decrease of 32.83%, while the abstract and table write percentage points.
    • Comparisons and exceptions: On Qwen3-8B, the average safety error of GDPO, NGRPO and MDP-GRPO is 16.10%, 16.09%, 16.54%, not lower than GRPO's 15.52% (Table 2). On HarmBench for Distill-8B, GRPO is 18.77%, lower than Beacon's 20.93%. The average ASR of the four attacks in Figure 5 is 1.33%, and the paper does not state the model.
    • Authors' conclusion: The authors state that safety mechanisms should be designed for the optimization dynamics of LRMs; Limitations states that it still relies on existing reward and judge signals, and mainly covers harmful/benign prompts.

Related papers

Show 3 more papers
Read originalarxiv.org