Study reveals inconsistent safety performance of loop language models across different loop depthsSafe at One Loop, Risky at Another: Aligning Safety Across Recurrent Depths in Looped Language Models
Proposes SafeBridge to align the recurrent depths of LoopLMaima; the Overall attack ASR for Ouro-1.4B is 4.56%.
- Each recurrent depth of LoopLM can be read out independently. The authors state that deeper cycles are safer on original harmful queries, but whether this holds under jailbreaks is unclear; they also state that SFT and preference alignment have not eliminated the cross-depth safety gap.
- SafeBridge applies lightweight modulation to depths 2–4 of the shared recurrent layers, and selectively connects the hidden state from depth 2 to deeper exits. The loss uses preference pairs, response safety labels, weak-exit emphasis, uniform supervision across depths, and cross-depth consistency.
- On Ouro-1.4B/2.6B, the Overall attack ASR from Table 1 for SafeBridge is 4.56% and 9.85%, compared to DPO's 21.06% and 44.93%. The cross-depth columns are likewise lower. Relative to Vanilla, Table 3 shows SafeBridge is higher on all six benchmarks.
- The paper does not list dedicated limitations. The conclusion motivates future alignment to explicitly consider recurrent computation. Evaluations cover two Ouro models, L=4, three attacks, and four safety benchmarks; ablations are only on Ouro-1.4B with JailbreakBench. Multi-seed repetitions and agreement with human judgments are not reported.
- Evaluated models
- Ouro-1.4BOuro-2.6B
- Benchmarks
- AdvBenchHarmBenchJailbreakBenchMaliciousInstructXSTestOR-Bench-HardGSM8KMMLUMBPPMBPP+HumanEvalHumanEval+
- Metrics
- ASRMatchedCrossOverall attack ASRPooled source ASRORRaccuracypass@1
The researchers conducted a systematic evaluation of the safety of recurrent language models (LoopLMs) against jailbreak attacks, finding that the attack success rate increases with inference depth, that the same query can trigger different safety behaviors at different depths, and that attacks crafted for one depth can transfer to other depths. The study also found that SFT and preference alignment do not eliminate these safety gaps. To address this, the authors propose SafeBridge, which combines lightweight depth-specific control of the shared recurrent layers, selective state bridging, and joint safety supervision across recurrent depths. It significantly reduces the success rate of both matched-depth and cross-depth attacks across multiple model scales, attack methods, and safety benchmarks, while also improving general capabilities and maintaining a similar level of over-refusal. The authors state that the code and model checkpoints will be released after the paper is accepted.
Related events and news
1 events · 0 news mentions
- This event's paper
循环语言模型跨递归深度安全对齐研究
Paper analysis
What problem does this paper attempt to solve?
The safety of LoopLM can be inconsistent across recurrent depths, and jailbreaks can transfer from a source depth to other depths.
Loop language models are not consistently safe across multiple independently readable depths, and jailbreaks constructed for one depth can transfer to other depths.
- Scenario: LoopLM reuses shared parameters across loop steps, and each loop depth can be read out via the language model head. The authors argue this expands the surface where harmful behavior can appear, requiring checks on whether safety holds throughout the loop computation.
- Existing gap: The authors state that existing evaluations of Ouro suggest deeper loops reduce harmful responses to original harmful queries, but it is unclear whether this holds under jailbreaks. SFT, DPO, and SafeDPO target conventional LLMs and do not explicitly perform cross-depth safety alignment; LoopDPO, which averages DPO loss equally across four depths, also does not outperform DPO.
- Two phenomena: The authors report that the same input can have different safety behaviors at different inference depths; jailbreaks constructed for source depth s can transfer to other inference depths d, making each target depth face multiple attack sources.
- Evaluation setup: The victim system is the LoopLM from the Ouro family. Attacks are constructed for s∈{1,2,3,4} and then read out at d∈{1,2,3,4}; methods are GCG, AutoDAN, PAIR. Harmfulness is determined by the HarmBench classifier. The paper does not label this setup as white-box or black-box.
- Approach: The authors propose a preference optimization method, SafeBridge, using depth-specific modulation, selective state bridging, and cross-depth safety supervision to address both depth variation and cross-depth transfer.
What related research exists?
The authors state that existing alignment targets conventional LLMs and does not explicitly address safety differences across loop depths.
The paper's Related Work is organized along three lines of research and names this paper's baselines.
Recurrent and Recurrent-Depth Language Models
- Universal Transformers (Dehghani et al., 2019): share parameters across computational depth and perform recurrent computation.
- Saunshi et al. (2025), Geiping et al. (2025): recurrent Transformers improve reasoning through latent recurrent computation and treat test-time computation as an additional scaling axis.
- Ouro (Zhu et al., 2025): extends this to pretrained LoopLMs with adaptive depth assignment. The authors state existing research mainly focuses on reasoning and compute scaling, and that systematic safety evaluation and alignment across recurrent depths remain insufficient.
Jailbreak Attacks and Evaluation
- GCG (Zou et al., 2023) uses gradient-guided search to optimize transferable adversarial suffixes; AutoDAN (Liu et al., 2024) uses a hierarchical genetic algorithm to generate semantically readable jailbreaks; PAIR (Chao et al., 2025) iteratively rewrites prompts using an attacker LLM and feedback from the target model.
- HarmBench (Mazeika et al., 2024) and JailbreakBench (Chao et al., 2024) provide standardized evaluation frameworks for attacks and defenses.
- The authors state that this paper studies transfer between recurrent depths within a single LoopLM and separates the attack source depth from the inference depth. The paper does not criticize the three attack methods themselves.
Safety Alignment
- SFT and RLHF (Ouyang et al., 2022) learn behavior from demonstrations and human preferences; DPO (Rafailov et al., 2023) directly optimizes preferences without separately training a reward model.
- Safe RLHF (Dai et al., 2024) separates the helpfulness reward from a safety cost; SafeDPO (Kim et al., 2026) incorporates a response safety indicator into direct preference optimization.
- DELMAN (Wang et al., 2025) and EVA (Wang et al., 2026) use local parameter editing against jailbreaks; ReSA (Cao et al., 2026) trains the model to answer first and then check. The authors state these methods target conventional LLMs and do not explicitly handle safety differences between recurrent depths.
Baselines and Benchmarks
- Experimental baselines are SFT, DPO, SafeDPO, and LoopDPO, which equally weights the preference loss across the four depths.
- Safety benchmarks are AdvBench, HarmBench, JailbreakBench, and MaliciousInstruct; over-refusal is measured with XSTest and OR-Bench-Hard; general capabilities are measured with GSM8K, MMLU, MBPP, MBPP+, HumanEval, and HumanEval+.
The authors position SafeBridge as treating recurrent depth as an explicit alignment dimension, using response-level safety supervision with depth-specific control and cross-depth coordination.
How does the paper address this problem?
SafeBridge aligns all exits using depth modulation, a state bridge, and a cross-depth safety loss.
SafeBridge performs depth-specific control on the shared recurrent computation and jointly aligns policies across depths. The architecture and objectives are shown in Figure 2.
Depth-Specific Modulation and State Bridge
- Modulation: Layers are shared across depths, so modifying one depth affects others. The authors therefore add separate trainable vectors for each supervised depth. With L=4, modulation and direct supervision are on D={2,3,4}; depth 1 is not modulated and can still change with the shared backbone. Layer outputs are modulated with FiLM-style per-channel scaling and shifting; the scaling factor is elementwise in (0, 2), and the vectors are initialized to 0, so the initial operation is identity.
- State Bridge: Deeper depths can only see earlier states through intermediate cycles. The authors state the motivation is that safer behavior is observed at earlier depths, so they use a stop-gradient gating mechanism to add the source depth's normalized hidden state before the target depth's normalization. In experiments the bridge source depth is fixed to 2; the target set for Ouro-1.4B is {3,4} and for Ouro-2.6B is {3}. The gate is initialized to 0, so it is inactive initially. The paper does not explain why the target sets differ between the two scales.
- Parameter Count: The backbone, LM head, modulation vectors, and bridge gates are optimized jointly. The additional parameters are 299,008 (1.4B) and 591,872 (2.6B), which the authors state is about 0.02% of each model.
Preference Supervision with Safety Sign
- Labels: Samples contain the prompt, chosen response, rejected response, and a safety label, with +1 for safe and −1 for unsafe. The authors point out that preference ranking alone cannot determine whether to increase or decrease likelihood, because the safety labels of the two responses may be the same.
- Scores: On the supervised depths, teacher forcing is applied to both responses with the current model and a frozen reference model. r_d is the log-likelihood change relative to the reference policy. qd(y,η)=ηβ rd(y|x), where a larger q_d indicates a larger increase in the likelihood of the safe response or a larger decrease in the likelihood of the unsafe response.
- Loss: The pairwise preference still uses the DPO loss. In addition, softplus(1−q_d) penalizes signed safety scores that are below the unit interval. At each depth objective, the pairwise loss and the penalties for the two responses are combined with a coefficient α. The paper uses α=0.85 and β=0.1.
Weak-Exit Aggregation and Cross-Depth Consistency
- Aggregation: Risk is uneven across depths, and the larger values of the pairwise loss and the safety loss may fall at different depths, so the three loss types are separately combined with a smooth maximum to emphasize weaker exits; the uniform term is the average of the losses over the supervised depths. The two are added with equal weight.
- Consistency: Aggregation alone does not constrain how safety changes with recurrence. This term penalizes a decrease in the signed safety score of the same response at the next supervised depth; earlier scores have stop-gradient, and the temperature is shared with the aggregation.
- Total Objective: LSafeBridge=1/2(E+U)+γ F. The paper uses temperature 0.1 and consistency coefficient 0.25. Depth aggregation is performed within each preference pair, and then averaged over the batch. Appendix A gives the training and forward procedures.
Training Starting Point and Judgment
- SFT: Uses the supervised data released by ReSA, starting from pretrained Ouro, supervised only at depth 4, for 2 epochs, with a maximum sequence length of 8,192; sequences exceeding this length are discarded.
- Preference Training: DPO, SafeDPO, LoopDPO, and SafeBridge all start from this SFT checkpoint for 3 epochs. DPO and LoopDPO use only rankings; SafeDPO and SafeBridge also use safety annotations. SafeDPO removes 32,656 pairs with both responses unsafe, retaining 41,251 pairs; the others retain all 73,907 pairs.
- Reference Model: Frozen. The reference depth for DPO and SafeDPO is {4}; LoopDPO equally averages over the four depths with a weight of 0.25 per depth; SafeBridge's reference depth is {2,3,4}.
- Harmfulness Judgment: The HarmBench Llama-2-13B classifier reads the original harmful query and the generated responseaine, and outputs yes or no.
What experiments did the paper conduct?
SafeBridge Overall attack ASR:Ouro-1.4B 4.56%,2.6B 9.85%(Table 1)。
Experimental Setup
- Models and Baselines: The aligned and attacked models are Ouro-1.4B and Ouro-2.6B. Comparisons are against SFT, DPO, SafeDPO, and LoopDPO on the same models.
- Data and Hardware: SFT uses ReSA's 79,552 rows. Preference data comes from PKU-SafeRLHF; SafeDPO uses 41,251 pairs, and the others use 73,907 pairs. Training uses one 80GB A100 per run.
- Attacks: GCG uses EnsembleGCG with 2,000 steps; AutoDAN-HGA uses 100 steps; PAIR uses 5 parallel streams with up to 5 turns, with the attacker model Vicuna-13B-v1.5, targeting Ouro at the source depth during construction. For each scale, each safety benchmark, and each attack, one set is created for each of the four source depths, for a total of 48 sets, which are then reused across four inference depths, giving 192 settings per checkpoint.
- Benchmarks: AdvBench, HarmBench, JailbreakBench, and MaliciousInstruct, containing both original harmful prompts and jailbreak variants. Over-refusal is measured on XSTest's 250 safe prompts and OR-Bench-Hard's 1,319 prompts. General capabilities are evaluated only at d=4: GSM8K 1,319 questions, MMLU 14,042 questions, MBPP/MBPP+ 378 questions, and HumanEval/HumanEval+ 164 questions.
- Metrics and Generation: ASR is determined by the yes/no output of the HarmBench Llama-2-13B classifier, which sees the original harmful query and the generated response. Matched is the average over four s=d settings, Cross is the average over 12 s≠d settings, then macro-averaged over the four benchmarks; Overall averages all 192 settings. Final generation is in BF16, greedy, with a temperature of 0, and a maximum of 512 new tokens, one per query per depth. ORR is determined by Qwen3.8-27B-FP8. The paper does not report multi-seed repetitions.
Main Results
Per Table 1, in %. The 'Original' column is the average over four benchmarks × four depths (Avg@16), and Overall is the average over 192 settings.
Swipe horizontally to read the table
Method 1.4B Original 1.4B Overall 2.6B Original 2.6B Overall Vanilla 29.13 50.44 30.19 65.66 SFT 21.23 23.77 41.40 45.90 DPO 17.73 21.06 37.35 44.93 SafeDPO 13.22 20.85 36.92 44.30 LoopDPO 19.55 21.89 39.37 45.19 SafeBridge 3.88 4.56 5.01 9.85 - In-Table Comparison: Across both model scales, SafeBridge has the lowest original ASR and Overall attack ASR in each column. The authors argue that LoopDPO does not outperform DPOate, and that simply extending a single-output preference objective to multiple depths is insufficient.
- Scale Exception: On Ouro-2.6B, the original ASR for SFT, DPO, SafeDPO, and LoopDPO are all higher than Vanilla; on Ouro-1.4B, they are lower than Vanilla. The paper does not explain this exception.
- Matched and Cross-Depth: The other columns of Table 1 also show SafeBridge as the lowest. Ouro-1.4B's PAIR Cross is 2.77% versus Vanilla's 41.74%; Ouro-2.6B's GCG Matched is 11.99% versus Vanilla's 81.82%.
Safety Variation Across Inference Depths
- Jailbreak with Depth: Table 5 averages jailbreak ASR over the three attacks and four source depths. On Ouro-1.4B, DPO is 2.72% at depth 2 and 35.44% at depth 4; SafeBridge is 0.98% and 4.16%. The authors state that SFT, DPO, and LoopDPO are lower at depth 2 and increase at depths 3–4.
- Intermediate Exits: The authors state that Ouro-2.6B's jailbreak ASR peaks at depth 3 rather than depth 4, and that looking only at the final depth may miss more vulnerable intermediate exits. In Table 5, DPO is 61.60% and 37.58%. SafeBridge is the lowest in the table at each depth, but its depth 1 value of 14.13% is higher than its own depth 3 value of 9.35%.
- Partial Inconsistency with Introduction: The introduction states that ASR on original harmful queries decreases with depth. In Table 5, Ouro-1.4B Vanilla's original ASR at depth 2 is 39.26%, higher than at depth 1 (25.88%) and depth 4 (24.44%), so the decrease is not monotonic across all settings.
Cross-Depth Transfer and Pooled Sources
- Mismatched Sources Can Be Stronger: Each cell in Figure 4 averages over four benchmarks and three attacks. Ouro-2.6B's DPO at s=2, d=3 is 66.24%, higher than the matched depth of 63.18%; SafeBridge is 12.02% in that cell. The authors state that, relative to DPO, all 16 combinations are lower at both scales.
- Four-Source Pooling: Table 2 combines variants targeting all four source depths, counting a success if any of them succeeds, then averages over the four benchmarks and four target depths. For PAIR, SafeBridge is 8.39% (1.4B) and 24.25% (2.6B), while SafeDPO is 42.12% and 85.49%. SafeBridge is the lowest in its column for all three attacks and both scales.
- Qualitative Examples: Appendix D compares DPO and SafeBridge using JailbreakBench, labeled by the same classifier, without reproducing the original examples. On Ouro-2.6B, a GCG input from source depth 1 makes DPO judged as a successful attack at inference depths 2 and 4, but not at depths 1 and 3; SafeBridge is not successful at any of the four depths. On Ouro-1.4B, a PAIR input from source depth 3 is not successful at inference depth 3, while a PAIR input from source depth 2 is successful at the same inference depth; SafeBridge blocks both at depths 2 and 3.
Utility and Over-Refusal
- Relative to DPO and Vanilla: Table 3 is at the final depth d=4. Relative to Vanilla, SafeBridge is higher on all six benchmarks at both scales. The authors state that on Ouro-1.4B it is higher than DPO in all six cells, and it is the highest in the table on five benchmarks; relative to DPO, HumanEval and HumanEval+ are higher by 1.83 and 1.22 percentage points (79.88% vs. 78.05%, and 76.22% vs. 75.00%). MBPP+ is 61.38%, lower than SafeDPO's 61.64%.
- 2.6B Code Results Are Not All the Highest: SafeBridge is the highest in the table on GSM8K 87.79%, MMLUate 75.72%, and MBPP+ 66.93%; it is 82.32% on HumanEval, lower than DPO's 84.15%.
- Over-Refusal: In Table 6, on Ouro-1.4B's XSTest, SafeBridge is 51.60% at depth 2, and DPO is 63.20%. The authors state that compared to SafeDPO, over-refusal is generally comparableaiman and its peaks are usually lower; compared to DPO and Vanilla, it is higher at some depths. For example, on OR-Bench-Hard at depth 4 for 1.4B: SafeBridge 14.10%, DPO 4.40%, and Vanilla 10.08%.
Other Ablations and Analyses
Ablations are on Ouro-1.4B, JailbreakBench, three attacks, and all 4×4 depth pairs (Table 4). Mean is the ASR over 48 settings; Worst Exit is the highest ASR among the four inference depths after averaging over attacks and source depths; Worst Setting is the maximum ASR among the 48 settings; Safety Regression is the proportion of cases where, across adjacent depths 2→3 and 3→4, the same attack input is safe at the earlier depth and harmful at the next depth. Full SafeBridge is 4.40%, 11.92%, 24.00%, and 1.83%. The authors state that removing any component worsens these metrics.
- Removing Response Safety Loss: Mean 20.83%, Worst Exit 29.67%, Worst Setting 47.00%, Safety Regression 4.08%; the increase in Mean is the largest among all variants.
- Removing Modulation: Mean 15.35%, Worst Setting 59.00%, Safety Regression 3.17%.
- Removing State Bridge: Mean 7.69%, Worst Setting 31.00%, Safety Regression 7.17%.
- Removing Weak Exit Term E: Mean 6.75%, Worst Exit 18.42%, Worst Setting 29.00%, Safety Regression 2.46%.
- Removing Uniform Term U: Mean 9.13%, Worst Exit 15.33%, Worst Setting 27.00%, Safety Regression 6.17%.
- Removing Consistency Term F: Mean 5.19%, Worst Exit 13.83%, Worst Setting 33.00%, Safety Regression 3.29%; the authors state the impact on Mean is small, but the latter two metrics increase.
What are some points that can be further explored?
The paper does not list dedicated limitations; the conclusion motivates future alignment to explicitly consider recurrent computation.
Limitations and Future Directions Noted by the Authors
- No Dedicated Limitations Section: The paper has no dedicated Limitations, Discussion, or Future Work section, nor does it frame a specific experimental result as a limitation of the method.
- Future Directions: The Conclusion states that these findings highlight the importance of evaluating and aligning safety along the recurrent depth dimension, and prompt future safety alignment methods to explicitly consider recurrent computation.
Experimental Coverage
- Models and Depths: The evaluated models are Ouro-1.4B and Ouro-2.6B, with recurrent steps L=4 and directly supervised depths {2,3,4} (Section 3.1, Section 4).
- Attack Surface: Safety evaluations cover AdvBench, HarmBench, JailbreakBench, and MaliciousInstruct; attacks are GCG, AutoDAN, and PAIR; both source depths and inference depths range from 1 to 4, with 192 settings per checkpoint (Section 4).
- Judgment and Other Evaluations: ASR is determined by the HarmBench Llama-2-13B classifier; over-refusal is determined by Qwen3.8-27B-FP8 on XSTest (250) and OR-Bench-Hard (1,319); general capabilities are evaluated only at d=4 across six benchmarks (Section 4, Appendix C).
- Ablations and Bridge: Ablations are conducted on Ouro-1.4B, using JailbreakBench, three attacks, and all 4×4 depth pairs (Section 5.5). The bridge source depth is fixed at 2; the bridge target set for 1.4B is {3,4} and for 2.6B is {3} (Section 4).
- Not Reported in the Paper: The number of queries for each of the four safety benchmarks, multi-seed repetitions, and the agreement of the classifier or over-refusal judgments with human judgments.
Summarize the main content of the paper
SafeBridge aligns each recurrent depth of LoopLM anda reduces both matched and cross-depth jailbreak ASR.
SafeBridge treats loop depth as an alignment dimension for LoopLM, used to simultaneously reduce matched-depth and cross-depth jailbreak success rates.
- Problem: A single model can be read out at multiple depths. The safety behavior of the same query can vary with depth, and jailbreaks constructed at a source depth transfer to other inference depths. The authors state that conventional SFT and preference alignment, as well as LoopDPO which extends DPO equally to four depths, do not cover this gap.
- Method: Shared layers receive separate modulation at depths 2–4; hidden states at depth 2 are gated to deeper exits. The loss mixes preference, response safety labels, weak exit emphasis, uniform supervision, and cross-depth consistency. The bridge target sets for 1.4B and 2.6B are {3,4} and {3}, respectively.
- Main results: In Table 1's Overall attack ASR, SafeBridge achieves 4.56%/9.85% on Ouro-1.4B/2.6B, DPO 21.06%/44.93%, and Vanilla 50.44%/65.66%. On Ouro-2.6B, several alignment baselines have raw ASR higher than Vanilla.
- Transfer: In Figure 4, DPO on Ouro-2.6B from source depth 2 to inference depth 3 is 66.24%, higher than the matched 63.18%; SafeBridge's cell is 12.02%. In Table 2's PAIR aggregated source ASR, SafeBridge is 8.39% and 24.25%.
- Depth still uneven: In Table 5, DPO jailbreak ASR on Ouro-1.4B is 2.72% at depth 2 and 35.44% at depth 4. SafeBridge is lower at all depths, but its Ouro-1.4B jailbreak ASR at depth 1 is still 12.07%.
- Utility, refusal, and conclusion: Relative to Vanilla, all six benchmarks in Table 3 are higher; relative to DPO, not every cell is higher. In Table 6, over-refusal at some depths is higher than DPO and Vanilla. The authors argue that safety of LoopLM cannot be inferred from a single loop depth. The authors plan to release code and checkpoints upon acceptance.
Related papers
Show 3 more papers
- Locating and Steering Refusal Beyond AttentionAnalysis / interpretabilityarXiv