potentialpaper

Inference-Time Vulnerability Beyond Shallow Safety: Alignment Along Generation Trajectories

Kyungmin Park, Taesup Kim

NeurIPS 2026

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

TL;DR. Safety-aligned LLMs occupy refusal-like hidden states but don't resist mid-generation injection. We reframe shallow safety as a broader vulnerability and train on displaced trajectories so models resist redirection and recover safe generation.

Abstract. Safety-aligned Large Language Models (LLMs) remain vulnerable to interventions during inference that redirect generation toward harmful outputs. Recent work attributes this to shallow safety, where alignment concentrates in the first few output tokens. We show that shallow safety is a special case of a broader inference-time vulnerability, in which short token injections at any generation step can substantially alter subsequent safety behavior. We also find that a model's alignment with refusal directions in its hidden states does not predict its robustness to such injection, revealing that internal state alone does not determine generation behavior under perturbation. To address this, we align models directly on generation trajectories constructed by simulating mid-sequence perturbation, and show that this improves robustness to mid-sequence injection and generalizes to attacks that exploit early-token generation. Our work argues that robust safety alignment requires training on the generation process itself, not only its outputs.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

DateVersionSubmitted toPDFEvidence
4 May 2026NeurIPS 2026submittedNeurIPS 2026Accept (poster)reviews ↓[1]PDF[1]
Missing a version?

NeurIPS 2026

Accept (poster) · 3 reviews · OpenReview

Updated 25 Nov 2026, 03:42 UTC.

Program Chairs · DecisionOpenReview ↗
Decision
Accept (poster)
Read decision
Meta-review

This paper investigates model vulnerabilities in the context of short token injections at inference-time, where such tokens can be injected at any generation step, and argue that the concept of shallow safety is a special case of this vulnerability. The authors mitigate such vulnerabilities via specific LLM training focussed on simulated token injections mid-sequence, thereby increasing model robustness.

Reviewers note that the paper's contributions are useful in that they draw attention to model vulnerabilities throughout a trajectory (royP; XRxh; yv9U) and highlight the simplicity and effectiveness of the proposed approach (XRxh) as well as broad model coverage (XRxh) and methodologies (yv9U) across the experiments.

With respect to the weaknesses, reviewers mention that model behaviour resulting from the robustified model is not necessarily consistent and that benign, capability-preserving evaluation tasks do not currently cover this sufficiently (royP). Reviewers also mention a currently unexplained gap between LlamaGuard and OpenAI moderation that needs further explanation (royP), as well as a need to explain more concrete applications and deployment scenarios (royP). They also mention limited technical novelty (XRxh) and incomplete baseline comparisons (yv9U) as well as over-claiming of individual results reported (yv9U).

Final justification

Reviewers responded positively to the authors' responses, with 2/3 now favouring acceptance of the paper. Considering this outcome I recommend acceptance of the paper as a poster.

Area Chair 7wGb · Meta-reviewOpenReview ↗
Read meta-review
Meta-review

This paper investigates model vulnerabilities in the context of short token injections at inference-time, where such tokens can be injected at any generation step, and argue that the concept of shallow safety is a special case of this vulnerability. The authors mitigate such vulnerabilities via specific LLM training focussed on simulated token injections mid-sequence, thereby increasing model robustness.

Reviewers note that the paper's contributions are useful in that they draw attention to model vulnerabilities throughout a trajectory (royP; XRxh; yv9U) and highlight the simplicity and effectiveness of the proposed approach (XRxh) as well as broad model coverage (XRxh) and methodologies (yv9U) across the experiments.

With respect to the weaknesses, reviewers mention that model behaviour resulting from the robustified model is not necessarily consistent and that benign, capability-preserving evaluation tasks do not currently cover this sufficiently (royP). Reviewers also mention a currently unexplained gap between LlamaGuard and OpenAI moderation that needs further explanation (royP), as well as a need to explain more concrete applications and deployment scenarios (royP). They also mention limited technical novelty (XRxh) and incomplete baseline comparisons (yv9U) as well as over-claiming of individual results reported (yv9U).

Final justification

Reviewers responded positively to the authors' responses, with 2/3 now favouring acceptance of the paper. Considering this outcome I recommend acceptance of the paper as a poster.

Reviewer yv9UOpenReview ↗
Rating
4/6
Confidence
4/5
Quality
2/4
Clarity
3/4
Significance
2/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

The paper reframes "shallow safety" (Qi et al., 2025) as a special case of a broader inference-time vulnerability: short token sequences injected at any decoding step, not only the prefix, substantially shift safety behavior. Section 2 documents this on Mistral, Llama, and Qwen using AdvBench prompts and a difference-in-means refusal prototype, showing (i) both harmful and refusal injections move ASR throughout generation (Figure 1), (ii) refusal-like hidden states do not predict robustness, with ASR remaining high even at high cosine similarity to the refusal prototype (Figure 3), and (iii) injection sharply diverts the hidden-state trajectory toward the compliance region at the injection step (Figure 2).

To address this, the authors propose bidirectional trajectory augmentation: monitor the hidden state during generation, inject the opposite-direction sequence once a similarity threshold is crossed, filter with Llama-Guard-3-8B, and form paired safe/unsafe trajectories trained with SimPO over QLoRA (Eq. 10). Applied iteratively (Algorithm 1), the method reduces injection ASR to near zero in-domain and stays below 6% LlamaGuard ASR out-of-domain (Tables 1, 3), transfers to PAIR, Prefilling, and I-GCG (Table 2), and reportedly preserves utility on MMLU/PROST (Table 17) with limited over-refusal on XSTest (Table 16).

Strengths and weaknesses

Strengths

Quality. The core empirical observation is clearly demonstrated and replicated across three model families. The "refused but did not resist" finding (Section 2.3, Figure 3), where ASR is high precisely in high refusal-similarity bins, is a genuinely useful negative result for representation-level defenses. The ablations are reasonably thorough: injection length, phrase semantics, injection lag, and repeated injections (Table 12), plus a threshold sweep (Table 11) and a 70B and multilingual generalization check (Table 13).

Clarity. The paper is well organized and the central narrative (characterize the vulnerability, show internal states do not govern it, train on the trajectory) is easy to follow. Reproducibility detail is above average: hyperparameters (Appendix A.2), augmentation details, baseline configurations (Appendix B), and compute (Appendix A.5) are reported.

Significance and Originality. Framing safety as a trajectory-level property the model must recover, rather than a property of the initial token distribution or a fixed internal direction, is a worthwhile reframing of the shallow-safety line of work, and the bidirectional augmentation construction is a sensible operationalization.

Weaknesses

  1. The baseline matrix is incomplete, which undermines the central "best defense" claim. No single competing method is run on all three models in Table 1. LAT, the strongest competitor, appears only for Llama; Circuit Breakers only for Mistral and Llama; Egida-DPO only for Llama and Qwen. The claim that trajectory alignment is the leading method therefore rests on partial head-to-head coverage.

  2. Where the strongest baselines are present, they are competitive with or better than the proposed method, which the text does not foreground. On Llama, LAT matches the method in-domain (AdvBench LlamaGuard 0.00 for LAT vs 0.19 for Ours, Table 1). On Mistral, Circuit Breakers beats Ours on HarmBench under both judges (OM 1.56 vs 2.50, LG 0.94 vs 4.06) and ties on AdvBench. The headline framing of driving ASR toward zero is model- and benchmark-dependent.

  3. The baseline checkpoints are built on different base models than the ones evaluated, confounding the comparison. Appendix B states Circuit Breakers uses GraySwanAI checkpoints on Mistral-7B-Instruct-v0.2 and Meta-Llama-3-8B-Instruct, and LAT uses LLM-LAT/robust-llama3-8b-instruct, whereas the paper's own models are Mistral-7B-Instruct-v0.3 and Llama-3.1-8B-Instruct. Differences in Table 1 between Ours and these baselines partly reflect a base-model version mismatch rather than defense quality.

  4. The headline "injection" evaluation is largely in-distribution to the training procedure. The injection used for evaluation (harmful tokens at the first step where refusal-prototype similarity crosses the threshold) is the same mechanism used to construct training trajectories (Section 3.1, Section 4.1). Near-zero in-domain injection ASR (Table 1) is therefore partly a measure of robustness to the method's own training attack. The more informative evidence is OOD datasets and the transfer attacks, which should carry more of the argument.

  5. Transfer-attack evidence is thinner than claimed. In Table 2, the only semantic attack (PAIR) already has low base ASR (5.77/4.04 OM/LG on AdvBench), so the reported reductions are small in absolute terms. The large transfer gains are on Prefilling, which is mechanistically close to injection at step 0 and thus near the training distribution. Table 2 also covers only Qwen in the main text (Mistral in Appendix D.2), with no transfer-attack results for Llama.

  6. No statistical variance is reported. The checklist (Q7) states all evaluation uses greedy decoding so results are deterministic, but augmentation involves randomness (prompt sampling, trajectory filtering) and training has seed sensitivity. Without multiple training runs, small ASR gaps between methods (for example Ours vs LAT on Llama) cannot be distinguished from noise.

  7. Over-refusal is understated and under-measured. Table 16 shows over-refusal more than doubles on Llama (5.2 to 11.6%) and roughly triples on Qwen (4.0 to 11.6%), yet the text describes this as "minimal" and "not substantial." For a safety-tuning method, a >2x relative increase in refusal of safe prompts is a material cost and should be presented as such. Over-refusal is also evaluated on XSTest only, and utility on only MMLU and PROST (Table 17), with no instruction-following or helpfulness benchmark (for example MT-Bench or AlpacaEval) that would detect subtler degradation.

  8. No adaptive attack is considered. The method explicitly trains the model to recover after displacement, which invites an adaptive adversary that re-injects with no recovery gap, uses much longer harmful continuations, or injects at every step. The ablations test up to 15-token injections and repeated injections with a deliberate 10-token recovery gap (Table 12), which are not adaptive to the defense.

  9. The representation claim in Section 2.3 rests on a single last-layer difference-in-means prototype. The conclusion that internal state does not determine generation behavior is strong, but the measurement uses one prototype at one layer (Eq. 3-4). Prior work (Arditi et al., 2024) locates the refusal direction across layers, so the negative result may be sensitive to this choice rather than a general property.

Questions
  1. (Critical) Can you complete the baseline matrix so that LAT, Circuit Breakers, and Egida-DPO are each evaluated on all three models, and report them on the same base-model versions you use for your method (v0.3, Llama-3.1)? The current cross-version checkpoints (Appendix B) make Table 1 hard to read as a clean comparison.

  2. How does the method perform under an adaptive attacker that targets the recovery behavior directly, for example continuous re-injection with no recovery gap or longer harmful continuations? Some evidence that robustness is not specific to the trained injection regime would strengthen the central claim.

  3. Llama-Guard-3-8B is used both to filter training trajectories (Section 3.1) and as an evaluation judge (Section 4.1). How much of the in-domain result survives if a judge not in the training loop is used as the primary metric? OpenAI Moderation results are reported alongside, but a fuller separation of training signal from evaluation would help.

  4. Over-refusal rises to 11.6% on Llama and Qwen (Table 16). Can you report over-refusal on a second benchmark and add a helpfulness/instruction-following evaluation, so the safety gains can be weighed against the helpfulness cost?

  5. For the small ASR gaps that drive the "best method" claim (for example Ours vs LAT on Llama), can you provide multiple training runs or another measure of variance so these differences can be interpreted?

Limitations

Yes

Final justification

The rebuttal resolved my central concerns: the matched-backbone reruns remove the base-version confound, the five-seed results and requested adaptive attacks support the robustness claims, and the added helpfulness/over-refusal evaluations replace the earlier overclaims with more accurate framing. I am therefore raising my rating from 3 to 4. I share the concerns of Reviewer royP on the remaining factors that keep this a borderline paper rather than a clear accept, and I would not object either way depending on how other reviewers weigh the trajectory-level framing.

Formatting concerns

N/A

4 comments
Authors · RebuttalOpenReview ↗
Rebuttal

Thank you for the detailed review and for recognizing the “refused but did not resist” finding as a genuinely useful negative result. We also appreciate your positive assessment of the paper’s narrative, method’s originality, ablations, and reproducibility. Your concerns about baseline comparability, adaptive attacks, variance, and helpfulness guided our additional analyses. We added matched-backbone comparisons, longer and no-gap re-injection attacks, open-ended helpfulness evaluations, Llama transfer tests, five-seed results, while narrowing our headline claims.


(W1-W3, Q1) Baseline coverage and exact-backbone comparison

We reran the defense comparison on the exact backbones used by the released baselines, eliminating the base-model version mismatch. The full matched comparison is reported in Table D (in author-response page). The matched results are clear. On Meta-Llama-3, Trajectory Alignment outperforms LAT [1] in five of eight dataset–judge comparisons and ties the remaining three, while outperforming Circuit Breakers [2] in all eight. On Mistral-v0.2, it outperforms Circuit Breakers in three comparisons, ties three, and underperforms it in two.

Specifically, we trained and evaluated Trajectory Alignment on Meta-Llama-3-8B-Instruct, matching the released LAT [1] and Circuit Breakers [2] checkpoints, and on Mistral-7B-Instruct-v0.2, matching the released Circuit Breakers checkpoint. Within each backbone block, all methods use identical prompts, injection procedures, decoding settings, and judges.

We agree that the original headline did not sufficiently foreground the model- and benchmark-dependence of the comparison. We will replace the broad framing with the exact matched-backbone result ("Trajectory Alignment achieves the lowest or tied-lowest ASR in all eight Llama comparisons and in six of eight Mistral comparisons.") We will also report backbones explicitly and restrict ranking and bolding to methods evaluated on the same backbone.


(W4, W5) In-domain injection and transfer evidence

The injection headline and generalization claim does not rest on the mechanism-matched AdvBench injection result. It is supported separately by injection evaluations on three OOD benchmarks across three backbones (3 datasets × 3 backbones = 9) and by three unseen attacks on four benchmarks across all three backbones (3 attacks × 4 benchmarks × 3 backbones = 36 settings, 27 of which are also OOD in dataset).

We agree that PAIR’s [3] low base ASR limits the possible absolute reduction, however, the limited headroom is not evidence that the defense fails to transfer. PAIR ASR decreases in all 12 backbone–benchmark comparisons across Llama, Qwen, and Mistral. Addtionally, Prefilling [4] is not part of our training augmentation. It intervenes before any model-generated token, whereas our training injection is applied only after decoding has begun and the prompt-specific refusal score first crosses the threshold.

Following the reviewer’s request, we additionally evaluated PAIR [3], Prefilling [4], and I-GCG [5] on Llama, complementing the Qwen and Mistral results already reported.

Table F. Transfer to unseen attacks on Llama-3.1-8B-Instruct (LG ASR, ↓)

Benchmark PAIR: Attack → Ours Prefilling: Attack → Ours I-GCG: Attack → Ours
AdvBench 5.77 → 1.92 92.31 → 0.00 12.50 → 1.92
HarmBench 3.75 → 0.94 53.75 → 3.12 15.62 → 1.56
HEx-PHI 5.58 → 1.12 61.71 → 2.23 6.69 → 0.00
JailbreakBench 5.43 → 1.09 59.78 → 2.17 11.96 → 1.09

Trajectory Alignment reduces ASR in all 12 attack–benchmark combinations, with aligned ASR never exceeding 3.12%. This addresses both concrete concerns: the generalization argument is not based on in-domain injection alone, and the previously missing Llama transfer evaluation is now provided.


(W6, Q3, Q5) Training variance and judge separation

As the reviewer request, we repeated the complete training and evaluation pipeline across five seeds on the matched Meta-Llama backbone and report mean ± SD under OpenAI Moderation in Table G.

Table G. Five-seed robustness on Meta-Llama-3-8B-Instruct under inference-time injection (OM ASR, mean ± SD, ↓)

Method AdvBench HarmBench HEx-PHI
LAT 6.35 ± 1.10 10.88 ± 0.64 4.46 ± 0.70
Ours 4.04 ± 2.08 3.38 ± 0.92 2.16 ± 1.50

Across the five runs, Trajectory Alignment achieves lower mean ASR than LAT on all datasets. To interpret the comparison beyond aggregate ASR, we manually audited the paired AdvBench outputs. LAT cut off immediately after the injected stem in 104/104 cases, always at the same incomplete suffix, “...detailed guideStep,” whereas Ours did so in 0/104 cases. The median post-injection continuation length was 4 characters for LAT and 1,157 for Ours. Thus, similarly low ASRs can reflect qualitatively different generation behavior.

Additionally, on judge separation, we report both LlamaGuard and OpenAI Moderation. LlamaGuard’s only role in training is to filter counterfactual trajectories that fail the intended safe/unsafe labels. OpenAI Moderation is not used in trajectory construction, filtering, or optimization.


(W7, Q4) Over-refusal and helpfulness

We added exactly the requested evaluations. As reported in Table A (in author-reponse page, Evalation on OR-Bench [6], MT-Bench [7], AlpacaEval 2.0 [8]), open-ended helpfulness and instruction following remain largely stable on Llama-3.1-8B-Instruct: MT-Bench changes from 8.40 to 8.29 (−0.11), while AlpacaEval 2.0 LC/raw win rates increase from 29.91%/30.52% to 30.56%/31.35% (+0.65/+0.83 pp). On the second benign refusal benchmark, OR-Bench, over-refusal increases from 28.81% to 31.23% (+2.42 pp). Thus, we observe a measurable over-refusal cost, but no corresponding broad degradation in free-form helpfulness on this backbone.

We agree that “minimal” and “not substantial” understated the XSTest results. We will instead report the absolute changes explicitly: +6.4 pp on Llama and +7.6 pp on Qwen, with a −0.4 pp change on Mistral. We will revise the conclusion to state that open-ended helpfulness is largely retained, while over-refusal incurs a measurable and benchmark-dependent cost.


(W8, Q2) Adaptive attacks We already evaluated a target-model adaptive attack through I-GCG [5], and we now add the two recovery-targeting regimes requested by the reviewer. I-GCG [5] uses token-level gradients to optimize a 20-token adversarial suffix toward harmful target templates. Importantly, we rerun its 500-step optimization directly against each evaluated checkpoint, including Trajectory Alignment model, rather than transferring a suffix optimized against the base model. Thus, the defended model itself is the optimization target. Despite this model-adaptive optimization, Table 2 shows that on Qwen, Trajectory Alignment reduces I-GCG ASR in all eight benchmark–judge settings, from 5.58–16.25% to 0–3.27%.

To target the recovery behavior even more directly, we implemented exactly the two regimes specified by the reviewer: longer harmful injections of 30, 45, and 60 tokens, and consecutive re-injection with no recovery gap. All other attack and decoding conditions follow Table 12.

Table Ha. Extended injection length on JailbreakBench, same setting as Table 12 (ASR OM/LG, ↓)

Injection length (OM/LG) 30 tokens 45 tokens 60 tokens
Base 59.78 / 66.30 65.22 / 73.91 59.78 / 65.22
Ours 6.52 / 2.17 8.70 / 1.09 7.61 / 2.17

Table Hb. Consecutive re-injection with no recovery gap, same model and setting (ASR OM/LG, ↓)

Consecutive injections, no recovery gap (OM/LG) ×0 ×1 ×2 ×3
Base 0.0 / 0.0 65.22 / 78.26 72.83/ 78.26 70.65 / 77.17
Ours 0.0 / 0.0 1.09 / 0.0 4.35 / 2.17 4.35 / 4.35

Robustness persists under both recovery-targeting regimes. Across 30–60 injected tokens, our ASR remains between 1.09% and 8.70% across both judges, compared with 59.78–73.91% for the base model. With three consecutive injections and no opportunity to recover between them, ASR remains 4.35/4.35%, versus 70.65/77.17% for the base model. Together with the I-GCG optimization, these results show that robustness is neither confined to the specific injection length nor dependent on a recovery gap between repeated injections. We will add these settings to the attack ablation and explicitly describe I-GCG as a model-adaptive white-box evaluation.


(W9) Layer sensitivity of the representation result

We agree that Section 2.3 shows that similarity to our “last-layer” hidden states during inference-time does not predict resistance to injection. We will revise the broad “internal state does not determine generation behavior” language accordingly.


References

[1] Sheshadri et al., “Latent Adversarial Training Improves Robustness to Persistent Harmful Behaviors in LLMs,” TMLR 2025.

[2] Zou et al., “Improving Alignment and Robustness with Circuit Breakers,” NeurIPS 2024.

[3] Chao et al., “Jailbreaking Black Box Large Language Models in Twenty Queries,” IEEE SaTML 2025.

[4] Andriushchenko et al., “Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attacks,” ICLR 2025.

[5] Jia et al., “Improved Techniques for Optimization-Based Jailbreaking on Large Language Models,” ICLR 2025.

[6] Cui et al., “OR-Bench: An Over-Refusal Benchmark for Large Language Models,” ICML 2025.

[7] Zheng et al., “Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena,” NeurIPS 2023.

[8] Dubois et al., “Length-Controlled AlpacaEval: A Simple Debiasing of Automatic Evaluators,” COLM 2024.

Authors · CommentOpenReview ↗

Added response to reviewer yv9U

Thank you again for taking the time to review our paper. We especially appreciate your characterization of the Section 2 finding as a “genuinely useful negative result.” As the response period draws to a close, we would be grateful if, time permitting, you could review our response to your main concerns.

For the benefit of Reviewer yv9U, the other reviewers, and the AC, we summarize our response below.

Reviewer yv9U’s concerns

  • (1) Incomplete baseline matrix, cross-version confounding, and over-broad ranking → Addressed the cross-version confounding and restricted comparisons to matched cells (Table D).

    • We no longer infer rankings from missing or cross-version cells. Ours achieves the lowest or tied-lowest ASR in all eight matched Llama cells and six of eight matched Mistral cells.
  • (2) In-domain injection and limited transfer evidence → Expanded transfer evaluation to 36 settings, added the missing Llama evaluation (Table F).

    • These evaluations cover three unseen attacks, four benchmarks, and all three backbones. Added results on Llama show that Ours reduces ASR in all 12 attack–benchmark combinations.
  • (3) No training variance and difficulty interpreting the LAT gaps → Added five-seed training results and a paired output audit (Table G).

    • Ours achieves lower mean OM ASR than LAT on all three datasets, with mean ± SD reported. In the audited AdvBench cases, LAT terminates at the same incomplete suffix in 104/104 outputs, compared with 0/104 for Ours, revealing a qualitative difference not captured by ASR alone.
  • (4) LlamaGuard used for both filtering and evaluation → Verified an independent evaluation path using OpenAI Moderation (Table G).

    • OpenAI Moderation is not used in trajectory construction, filtering, or optimization. The five-seed comparison is reported under this independent judge.
  • (5) Over-refusal and helpfulness results → Added OR-Bench, MT-Bench, and AlpacaEval 2.0 and retracted the understated claims (Table A).

    • Free-form helpfulness is largely retained on Llama, while OR-Bench over-refusal increases by 2.42 pp. These results are consistent with Qwen and Mistral. We now describe the XSTest changes as a measurable and benchmark-dependent cost.
  • (6) No adaptive attack → Clarified the existing model-adaptive I-GCG evaluation and added no recovery gap attacks (Tables H-a and H-b).

    • We added 30–60-token injections and consecutive re-injections with no recovery gap. Robustness persists in both regimes, including after three consecutive injections.
  • (7) Over-broad representation claim → Narrowed the conclusion to the tested last-layer refusal representation.

Most importantly, the matched-backbone and five-seed results now permit a cleaner comparison with the baselines, while the expanded transfer and recovery-targeting evaluations show that the observed robustness is not confined to the original injection regime. Accordingly, we will narrow our ranking and representation claims and update both the corresponding experimental sections and the conclusion.

We remain open to any further questions, discussion, or requests for clarification through the end of the response period. We will also open to share any relevant experimental updates remain, and we sincerely appreciate your time and consideration.

Reviewer yv9U · CommentOpenReview ↗

Thank you for the thorough rebuttal. Your new experiments address most of my main concerns, and I appreciate the narrowed claims. I do share Reviewer royP's remaining reservations, particularly that the free-generation helpfulness evidence covers only Llama-3.1 while the over-refusal cost is largest on Qwen, and that the Mistral Prefilling OM/LlamaGuard discrepancy is not fully engaged. I am raising my score to reflect the substantial improvements while noting this remains a borderline case.

Authors · CommentOpenReview ↗

Added response to reviewer yv9U

Thank you for carefully reviewing our additional experiments and for noting that they address most of your main concerns.

We would like to clarify one important factual point. The added free form helpfulness evaluations are not limited to Llama. During the author response period, we also completed MT-Bench and AlpacaEval 2.0 evaluations on Qwen and Mistral. We apologize that placing them only there made them easy to miss.

Table I. Over-refusal and free form generation evaluation on OR-Bench, MT-Bench, and AlpacaEval 2.0

Backbone Variant OR-Bench Over-refusal ↓ MT Turn 1 ↑ MT Turn 2 ↑ MT Avg. ↑ AlpacaEval LC ↑ AlpacaEval Raw ↑
Llama-3.1-8B-Instruct Base 28.81% 8.82 7.97 8.40 29.91% 30.52%
Ours 31.23% 8.66 7.91 8.29 30.56% 31.35%
Δ Ours − Base +2.42 pp −0.16 −0.06 −0.11 +0.65 pp +0.83 pp
Qwen2.5-7B-Instruct Base 25.47% 9.05 8.24 8.64 36.80% 31.30%
Ours 30.63% 8.89 8.19 8.54 37.64% 32.85%
Δ Ours − Base +5.16 pp −0.16 −0.05 −0.10 +0.84 pp +1.55 pp
Mistral-7B-Instruct-v0.3 Base 7.96% 7.91 7.33 7.62 24.64% 19.34%
Ours 6.44% 7.83 7.29 7.56 24.96% 18.60%
Δ Ours − Base −1.52 pp −0.08 −0.04 −0.06 +0.32 pp −0.74 pp

(1) We agree that OR-Bench shows a measurable over-refusal cost on Qwen and Llama, with increases of 5.16 and 2.42 percentage points. We do not observe this cost on Mistral, where over-refusal decreases by 1.52 percentage points.

OR-Bench and open ended helpfulness evaluations assess different behaviors. OR-Bench uses benign requests designed to resemble harmful ones, whereas MT-Bench and AlpacaEval evaluate broader open ended requests. Across all three backbones, the latter evaluations show only small changes and no consistent degradation. Together with MMLU and PROST, these results suggest that broader helpfulness and general capabilities are largely retained.

(2) We examined the Mistral Prefilling discrepancy between OpenAI Moderation and LlamaGuard in Table B. Our analysis suggests that OpenAI Moderation is sensitive to the externally supplied prefilling phrases included in the evaluated response.

Overall, the results support a more precise conclusion. Trajectory Alignment has a measurable over-refusal cost on Llama and Qwen, but not on Mistral in OR-Bench. Its broader free form helpfulness and general capabilities remain across the evaluated benchmarks. We will incorporate both findings and the analysis into the corresponding experimental discussion and conclusion.

Thank you again for raising these remaining concerns and giving us the opportunity to clarify the evidence.

Reviewer XRxhOpenReview ↗
Rating
4/6
Confidence
3/5
Quality
3/4
Clarity
3/4
Significance
2/4
Originality
2/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper studies the vulnerability of safety-aligned LLMs under inference-time token injection. The authors argue that the shallow safety phenomenon discussed in prior work is only a special case of a broader trajectory-level vulnerability: not only can initial token prefilling disrupt refusal behavior, but inserting a short token sequence in the middle of generation can also substantially alter the model’s subsequent safety behavior. The authors further find that the similarity between model hidden states and the refusal direction cannot reliably predict robustness to injection. Based on these observations, the paper proposes trajectory-level safety alignment: it constructs safe and unsafe generation trajectories by simulating mid-sequence perturbations, and then applies SimPO for preference optimization. Experiments show that the proposed method significantly reduces the ASR of injection attacks and generalizes to prefilling, I-GCG, and PAIR attacks.

Strengths and weaknesses

Strengths

  1. The paper addresses a valuable problem. Extending shallow safety to the level of generation trajectories, and showing that a model can be redirected by token injection even when it is in refusal-like hidden states, provides an insightful perspective for understanding the fragility of safety alignment.

  2. The method is simple and effective. By simulating mid-generation injections to construct safe and unsafe trajectories, and then optimizing the model with SimPO, the method encourages the model to recover from disrupted generations and return to safe trajectories. Experiments show that it substantially reduces ASR on datasets such as AdvBench, HarmBench, HEx-PHI, and JailbreakBench.

  3. The experiments cover multiple models and attack types. The authors conduct experiments on Llama-3.1-8B-Instruct, Mistral-7B-Instruct, and Qwen2.5-7B-Instruct, and further evaluate against attacks such as prefilling, PAIR, and I-GCG. These results suggest that trajectory-level training has a certain degree of generalization ability.

Weaknesses

  1. The methodological novelty is relatively limited. Trajectory alignment essentially constructs preference data from simulated attack trajectories and then applies an existing SimPO objective for preference optimization. Therefore, I think the paper needs more analytical experiments to support its core assumptions. In particular, the paper constructs safe and unsafe trajectory pairs by inserting tokens at intermediate generation steps and then aligns the model with SimPO. However, it remains unclear why aligning these sampled mid-sequence perturbation trajectories should imply more robust safety alignment over the entire generation trajectory. Robustness to several injection steps and injection phrases does not necessarily mean that the model is aligned across all decoding states, semantic contexts, or more complex generation paths.

  2. The necessity of SimPO is not sufficiently established. The main gains of the proposed method may come from trajectory augmentation itself, rather than from the specific SimPO preference optimization objective. A direct baseline would be SFT on the safe recovered trajectories only. Another natural baseline would be training on the same safe/unsafe trajectory pairs with DPO, IPO, or an RL-style safety reward. Without these comparisons, it is difficult to determine whether SimPO is a key contribution.

Questions

Same as the weaknesses above.

Limitations

Yes.

Final justification

The rebuttal directly addresses my main concerns through fixed-trajectory comparisons with SFT, DPO, and IPO, and appropriately narrows the robustness claim. Although the methodological novelty remains moderate and universal trajectory-level robustness is not established, the new evidence substantially strengthens the paper. I therefore raise my score from 3 to 4.

Formatting concerns

No major formatting concerns.

3 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We appreciate your thoughtful assessment of the paper as “addresses a valuable problem”, the method as “simple and effective”, and of generation trajectory view as an “insightful perspective” on safety alignment. In response, we clarify that our methodological contribution lies in converting an identified mid-generation failure transition into preference pairs. We add a fixed-trajectory ablation comparing safe-only SFT with DPO, IPO, and SimPO on identical safe–unsafe pairs. We also limit our robustness claim to empirical generalization across the tested trajectory perturbations.


(W1) Analytical basis, methodological contribution, and robustness scope

We do not claim that training on finitely sampled perturbations aligns the model over every reachable decoding state, semantic context, or complex generation path. Our claim is narrower and empirical: training on sampled instances of the observed mid-generation failure transition, in which injection displaces an ongoing safe trajectory toward harmful continuation (Section 2.3-2.4, Figure 2-3), reduces this displacement and improves recovery across the tested trajectory perturbations (Figure 5–6, Appendix D.4, Figures 8–10). Within this scope, our methodological contribution lies in converting that identified failure transition into preference supervision.

  • Figure 3 establishes a useful negative result across three model families: occupying refusal region does not predict resistance to injection attack (Figure 3).
  • Injection instead produces a sharp trajectory-level displacement from the refusal region toward harmful continuation at the point of intervention, with the same pattern observed at multiple injection positions (Figure 2, Figure 8-10).
  • We operationalize this failure by triggering augmentation only after the model has entered its current behavioral mode. Thus, the rejected sample explicitly contains the observed mid-generation transition from safe refusal toward harmful continuation, rather than only a complete harmful response generated from the initial prompt.

Table E (in author-response page) provides evidence for this design. Safe-only SFT observes the chosen recovery trajectories without their paired failure continuations, and remains substantially weaker than pairwise training. This indicates that recovery imitation alone is insufficient to account for the full improvement under this setting. DPO, IPO, and SimPO all produce large gains from the identical safe–unsafe pairs. We evaluate rather than assume whether this construction transfers beyond the sampled trajectories: ASR remains low across injection positions (Figure 5), the aligned model exhibits smaller harmful displacement and recovers within a few steps (Figure 6, Figures 9–10), and robustness extends across phrase semantics, injection lengths, repeated injections, OOD datasets, unseen attacks, longer injections, and no-gap re-injection (Table 2, Table 9, Table 12, Tables F and H).


(W2) Is SimPO necessary?

We agree that the original experiments did not disentangle the contribution of the trajectory data from that of the SimPO objective. We therefore compare SFT, DPO [1], IPO [2], and SimPO [3] from the same initial Meta-Llama checkpoint using fixed first-round trajectories. SFT uses only the chosen safe trajectories, whereas DPO, IPO, and SimPO use identical safe/unsafe pairs.

Table E. Training-objective ablation on fixed first-round trajectories (Llama-3-8B-Instruct, ASR OM/LG, ↓).

Method AdvBench HarmBench HEx-PHI JailbreakBench-clean
Injection (no defense) 84.62 / 82.69 75.62 / 75.00 69.89 / 67.66 83.70 / 72.83
SFT (safe only) 58.65 / 53.85 34.38 / 37.19 39.78 / 41.26 39.13 / 38.04
DPO 25.96 / 24.04 17.19 / 14.38 21.19 / 15.99 10.87 / 4.35
IPO 7.69 / 0.00 5.00 / 1.56 7.81 / 1.86 3.26 / 0.00
SimPO 4.81 / 0.00 2.81 / 0.00 1.49 / 0.00 2.17 / 0.00

Safe-only SFT improves all eight benchmark–judge cells but remains substantially less robust than pairwise training. On identical safe/unsafe pairs, DPO and IPO also produce large improvements; SimPO nevertheless achieves the lowest or tied-lowest ASR in all eight cells. Thus, the trajectory pairs transfer across preference objectives, while SimPO provides an additional empirical advantage among those tested.


References

[1] Rafailov et al., “Direct Preference Optimization: Your Language Model Is Secretly a Reward Model,” NeurIPS 2023.

[2] Azar et al., “A General Theoretical Paradigm to Understand Learning from Human Preferences,” AISTATS 2024.

[3] Meng et al., “SimPO: Simple Preference Optimization with a Reference-Free Reward,” NeurIPS 2024.


Reviewer XRxh · CommentOpenReview ↗

Thank you for the additional ablations and clarification. My main concerns are sufficiently addressed, so I have raised my score from 3 to 4.

Authors · CommentOpenReview ↗

Response to reviewer XRxh

Thank you for taking the time to review our response. For the benefit of the other reviewers and the AC, we summarize our response to Reviewer XRxh below.

Reviewer XRxh’s concerns

  • (1) Limited methodological novelty → Clarified the contribution and separated it from SimPO.

  • (2) Why sampled perturbations should imply trajectory-wide robustness → Clarified the claim and expanded the empirical coverage (Figures 5–6, Tables 2, F, H-a, and H-b).

    • We do not claim robustness over all decoding states. Our evaluations cover injection positions from 0 to 20, post-injection displacement and recovery, OOD data, unseen attacks, 30–60-token injections, and consecutive re-injections with no recovery gap.
  • (3) Whether the gains come from trajectory augmentation rather than SimPO → Added a fixed-data objective ablation (Table E).

    • Starting from the same checkpoint, DPO, IPO, and SimPO use identical trajectory pairs. Safe-only SFT improves robustness but remains weaker. DPO and IPO also achieve large gains, while SimPO achieves the lowest or tied-lowest ASR in all eight cells.

We remain open to further questions and discussion through the end of the response period. Thank you again.

Reviewer royPOpenReview ↗
Rating
3/6
Confidence
4/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

The paper follows the previous work on "shallow safety"[1] as a special case of a broader inference-time vulnerability: short token injections at any decoding step, not just the prefix, substantially shift safety behavior. It shows refusal-direction alignment in hidden states does not predict robustness to injection, then proposes bidirectional trajectory augmentation—simulating mid-sequence injections in both directions—optimized via SimPO, applied iteratively. Results show large ASR reductions across three 7–8B models, generalization to OOD benchmarks and unseen attacks.

[1]Safety Alignment Should Be Made More Than Just a Few Tokens Deep

Strengths and weaknesses

Strength:

  • The trajectory-level framing is useful and draws attention to recovery after generation has begun, rather than only the first-token distribution.
  • The recovery objective is intuitively appealing.

Weakness:

  • My major concern is that the method's own success cases are self-contradicting text. In Tables 14–15 the trained model opens one way ("Sure, here's a detailed guide on...") then reverses itself mid-sentence ("...how to write a secure script instead"). This suggests the training didn't teach the model to refuse harmful requests — it taught the model to distrust its own affirmative openings and fight them. But affirmative openings aren't harm-specific: the paper itself shows a plain "Certainly!" or other benign phrases spike the attack rate (Tables 10, 12b). So the learned reflex is keyed on sounding agreeable, not on being harmful, which means on benign prompts it should backfire as contradictory, or truncated answers. The utility evaluation can't rule this out: MMLU and PROST are both multiple-choice, so the model never generates the free-form text where this damage would appear. The only free-generation eval, XSTest, already shows ~2× over-refusal on Llama and Qwen. A free-generation helpfulness benchmark (e.g., AlpacaEval, MT-Bench) checking whether benign answers that start agreeably still finish coherently is needed to support the "no capability loss" claim.
  • Results lean heavily on LlamaGuard and OpenAI Moderation. The Mistral Prefilling case (Table 9) reveals the gap: OpenAI Moderation ASR stays high (44–77%) while LlamaGuard drops to near zero. This could suggest the model produces affirmative/partially-harmful openings that LlamaGuard forgives but OpenAI Moderation flags. The paper should engage this discrepancy more honestly rather than emphasizing the favorable judge.
  • Although AdvBench is divided into 416 training and 104 evaluation prompts, Appendix A.3 says prototypes are computed using all 520 instructions. The injection phrase and threshold are also selected using all 520 examples. Thus held-out evaluation prompts influence representation construction and hyperparameter selection. In addition, JailbreakBench contains AdvBench-sourced behaviors that may overlap the training split. All tuning and prototype computation should use training or validation data only, with overlap removed.
  • Arbitrary mid-generation token insertion generally requires privileged control of the decoding process. This is useful as a diagnostic intervention, but it is not automatically a realistic user-side attack. The paper should identify concrete deployment scenarios that grant this capability.
  • Section 3.1 and Algorithm 1 say each prompt gets one greedy generation and is sorted into either the refusal set or the compliance set. Refusal prompts then produce only an unsafe trajectory (via harmful injection), and compliance prompts produce only a safe one (via refusal injection). But SimPO needs both a safe and an unsafe trajectory for the same prompt. If a prompt can only be in one set, it can only ever supply one half of the pair, so as written, the method can't build a single valid training example. The paper never explains how the two halves get matched up. This is hard to explain for Llama. Its base model almost never complies (No-Attack ASR ≈ 0), so the compliance set should be nearly empty and safe trajectories should be scarce. However, Llama reports the most pairs of any model (342 in iteration 1). That's the opposite of what the described method predicts. The paper needs to be more clear on how each safe/unsafe pair is actually constructed, and reconcile it with the counts in Table 6.
  • The paper discloses (Appendix B.1) that the Circuit Breakers and LAT baselines use different base models than the evaluation targets. For Circuit Breakers the finetuned model Mistral is v0.2 vs. the paper evaluated v0.3, and Circuit Breakers/LAT Llama are Llama-3 vs. the evaluated Llama-3.1. The paper reasonably justify reusing released checkpoints rather than retraining, since those methods rely on model-specific hyperparameter tuning. However, Table 1 still places these results in the same model blocks and bolds/ranks them directly against adapters trained on the exact target models, with no in-table indication of the mismatch. A base-model difference might lead to unfair comparison between baselines.
Questions
  1. Can the paper provide a free-generation helpfulness evaluation (e.g., AlpacaEval, MT-Bench) showing benign answers that start agreeably still finish coherently?
  2. How do the paper interpret the Mistral Prefilling gap where OpenAI Moderation ASR stays at 44–77% while LlamaGuard drops near zero?
  3. Can the paper rerun with strict train/eval separation and AdvBench-overlap removed from JailbreakBench?
  4. Can the paper retrain on matching versions of the base model so that it can compare fairly to the proposed method?
  5. How is each prompt's safe/unsafe pair actually constructed for SimPO?
Limitations

The biggest limitation is that the method changes how the model generates free-form text, but both capability tests (MMLU and PROST) are multiple-choice, so they can't show whether normal answers stay coherent and the paper's own examples (Tables 14–15) show the model contradicting itself mid-sentence, while XSTest shows roughly doubled over-refusal on Llama and Qwen. A free-generation helpfulness test is needed before claiming no capability loss. The paper should also scope the threat model, since injecting tokens mid-generation assumes privileged control of decoding that mainly applies to open-weight models.

Final justification

I thank the authors for a thorough and candid rebuttal. It resolved several of my concerns and corrected a genuine misreading on my part. My updated assessment:

Resolved:

  1. Self-contradiction concern (my original W1). I accept the correction: the affirmative spans in Tables 14–15 are attacker-injected, not model-generated, so my "spontaneous self-contradiction" characterization was mistaken. This was my headline weakness, and it does not hold.

  2. Free-generation helpfulness. The added OR-Bench, MT-Bench, and AlpacaEval 2.0 results plus the targeted audit of affirmative openings address the capability concern on Llama-3.1-8B. I credit the authors for replacing "no capability loss" with the more accurate "largely retained, with measurable over-refusal."

  3. SimPO pair construction (W5). The clarification that the unperturbed trajectory is retained as one side of every preference pair resolves the contradiction I raised and reconciles the 342/0 branch counts for Llama.

  4. Train/eval separation and baseline fairness (W3, W6). The strict separation, cleaned non-overlapping JailbreakBench split, and exact-backbone baseline comparison adequately address these.

Remaining / partially resolved:

  1. Free-generation coverage is incomplete. New helpfulness results appear only for Llama-3.1-8B, while the over-refusal concern also applied to Qwen (11.6% on XSTest). Extending these evals to Mistral and Qwen would be needed to support the retained-helpfulness claim across backbones.

  2. Over-refusal cost. Now honestly disclosed, but real. It tempers rather than eliminates the utility trade-off.

  3. Scope / incrementality. Training uses a single injection sequence, and the core framing extends Qi et al.'s shallow-safety observation. The contribution is solid but somewhat incremental.

Weighting:

The rebuttal removed the objections that had justified a clear reject, which is why I raise from 2 to 3. I stop at 3 rather than higher because the remaining items — incomplete cross-backbone helpfulness evidence, an acknowledged over-refusal cost, and the incremental positioning relative to prior work — leave the paper marginally below the acceptance bar in my judgment, though I would not object to acceptance if other reviewers weigh the trajectory-level framing more favorably.

Formatting concerns

N/A

6 comments
Authors · RebuttalOpenReview ↗
Rebuttal

Thank you for your careful review and for recognizing the value of trajectory-level safety and recovery. Before addressing the individual points, we would like to correct a central factual misunderstanding underlying W1 and the corresponding limitation: the review treats externally injected text as though it were generated by our model, but it was supplied by the attacker. The cited examples therefore do not show spontaneous self-contradiction, and our manual audit found none in the model’s own responses. A related attribution error shapes W2, in the cited prefilling evaluation, the full-response OM score includes the attacker-supplied prefill and therefore does not isolate the model’s continuation. When we evaluate the generated continuation alone, the results do not support the proposed explanation. Below, we distinguish these factual corrections from the empirical questions they raise: open-ended benchmarks and a manual audit directly assess free-form helpfulness and coherence. We then address evaluation separation, baseline comparability, preference-pair construction, and the scope of the threat model.


(W1, Q1) Free-form helpfulness and apparently contradictory generations

We first correct an important misunderstanding about Tables 14–15. Table 14 does not show the aligned model contradicting its own opening. The bold affirmative span is externally injected, as the caption explicitly states. Table 15 likewise does not represent ordinary benign generation: an optimized I-GCG suffix for targeted model induces the affirmative opening. Therefore, neither table shows the model spontaneously producing and then reversing an affirmative answer to an ordinary benign prompt.

We nevertheless agree that our original multiple-choice utility evaluations could not detect this conditional free-form failure. We therefore added OR-Bench [1], MT-Bench [2], and AlpacaEval 2.0 [3].

Table A. Over-refusal, Free-form Generation Eval on OR-Bench, MT-Bench, AlpacaEval 2.0

Backbone Variant OR-Bench Over-refusal ↓ MT Turn 1 ↑ MT Turn 2 ↑ MT Avg. ↑ AlpacaEval LC ↑ AlpacaEval Raw ↑
Llama-3.1-8B-Instruct Base 28.81% 8.82 7.97 8.40 29.91% 30.52%
Llama-3.1-8B-Instruct Ours 31.23% 8.66 7.91 8.29 30.56% 31.35%
Δ Ours − Base +2.42%p −0.16 −0.06 −0.11 +0.65%p +0.83%p

On Llama-3.1-8B-Instruct, Ours increases OR-Bench over-refusal by 2.42 pp, changes MT-Bench average by −0.11, and improves AlpacaEval LC/raw win rates by 0.65/0.83 pp. Thus, over-refusal measurably increases without broad degradation in open-ended instruction following on this backbone.

We also audited this failure mode in all MT-Bench generations (n=80×2). We predefined affirmative openings (“Sure,” “Certainly,” “Of course,” “Absolutely,” “(I’d be) happy to,” “Yes,” and “Here is/are/’s”) and inspected every matching response for later contradiction, refusal, or premature termination. We found none: 0/20 Base and 0/16 Ours.

We will add these results to Section 4.4 and Appendix D.7 and replace “no capability loss” and “minimal over-refusal” with the conclusion that open-ended helpfulness is largely retained on Llama-3.1-8B-Instruct, with measurable over-refusal.


(W2, Q2) OpenAI Moderation versus LlamaGuard discrepancy

This concern follows from the same factual misunderstanding addressed in W1. In Prefilling, the aligned model does not generate the affirmative opening; the attacker injects it before generation. Full-response OM ASR therefore cannot show that the model generates affirmative or partially harmful openings missed by LlamaGuard.

To isolate the model output, we removed only the attacker-supplied prefill and reran OM on the generated continuation.

Table B. OpenAI Moderation ASR on the same Mistral prefilling outputs (↓)

Benchmark Base: full response Base: continuation only Ours: full response Ours: continuation only
AdvBench 52.81 49.03 77.69 4.23
HarmBench 67.29 53.75 44.06 3.43
HEx-PHI 67.29 61.71 5.42 4.08
JailbreakBench 73.91 70.65 65.22 3.26

Continuation-only OM ASR remains 49.03–70.65% for Base but falls to 3.26–4.23% for Ours, showing that the gap is largely explained by the attacker-supplied prefill.


(W3, Q3) Strict separation and JailbreakBench overlap

Appendix A.3 conflates two prototype computations. The 520-prompt prototype was used only for the descriptive analysis in Figures 2–3. Alignment used prototypes, injection phrases, and thresholds derived solely from the 416-prompt training split and frozen before held-out evaluation.

We also removed the eight JailbreakBench behaviors overlapping training, leaving n=92; all author-response results use this cleaned subset.

Table C. ASR Results on the non-overlapping JailbreakBench split (OM/LG, ↓)

Model Injection PAIR Prefilling I-GCG
Llama-3.1-8B-Instruct 3.26 / 0.00 0.00 / 0.00 2.17 / 1.09 2.17 / 1.09
Mistral-7b-instruct-v0.3 0.00 / 2.17 0.00 / 0.00 4.35 / 2.17 2.17 / 0.00
Qwen2.5-7b-instruct 8.70 / 5.43 0.00 / 0.00 2.17 / 1.09 2.17 / 3.26

(W4) Threat model and realistic scenarios

Ordinary users of closed chat interfaces generally cannot inject tokens during decoding. Our threat model assumes that an untrusted caller or application can alter the prefix when generation begins or resumes, without model-weight or live KV-cache access, by restarting generation from that prefix. This capability arises in at least three concrete deployment settings.

  • First, prefill or raw-completion endpoints let callers supply the continuation prefix. Hugging Face Transformers can continue a final assistant message, while vLLM exposes a raw Completions API. A client can stop a streamed prefix y1:ky_{1:k}, append attacker-chosen text aa, and request continuation from y1:k∥ay_{1:k}\Vert a.
  • Second, in editable code completion, a user can insert a malicious credential-collection instruction after earlier model output and invoke completion again. The model may complete the remaining code from the modified file, so blocking initial assistant prefills does not remove this path.
  • Third, completion-style agents may append attacker-controlled tool observations after a model action. For example, an email agent can read a malicious instruction and generate its next tool call from the updated trace. AgentDojo demonstrates this attack path in email, banking, and travel tasks.

Our experiments evaluate recovery from prefixes corrupted in these settings. We will state these scenarios and constraints in Limitations.


(W5, Q5) Construction of each SimPO pair

We apologize for the inconsistent description: the implementation retains the unperturbed trajectory (without injection attack) as one side of every preference pair.

  • If the unperturbed trajectory yiy_i is a safe refusal and harmful injection produces a valid unsafe continuation y~iunsafe\tilde y_i^{\mathrm{unsafe}}, the pair is (xix_i, yiy_i, y~iunsafe\tilde y_i^{\mathrm{unsafe}}), with yiy_i chosen.
  • If yiy_i is unsafe compliance and refusal injection produces a valid safe continuation y~isafe\tilde y_i^{\mathrm{safe}}, the pair is (xix_i, y~isafe\tilde y_i^{\mathrm{safe}}, yiy_i), with y~isafe\tilde y_i^{\mathrm{safe}} chosen.

For Llama-3.1-8B-Instruct in iteration 1, the safe-to-unsafe and unsafe-to-safe branches yielded 342 and 0 valid pairs, respectively, for 342 pairs in total, matching Table 6. We will explicitly specify this in Section 3.1, Algorithm 1, and the explanation of Table 6.


(W6, Q4) Cross-version baseline comparison

We reran the comparison on the exact backbones used by the released baselines, and the results remain consistent: Trajectory Alignment achieves the lowest or tied-lowest ASR in all eight Llama comparisons and matches or outperforms Circuit Breakers [4] in six of eight Mistral comparisons.

Table D. Exact-backbone defense comparison against inference-time injection attacks (ASR OM/LG, ↓)

Backbone Method AdvBench HarmBench HEx-PHI JailbreakBench
Meta-Llama-3-8B-Instruct Injection (no defense) 84.62 / 82.69 75.62 / 75.00 69.89 / 67.66 83.70 / 72.83
Meta-Llama-3-8B-Instruct Circuit Breakers 37.50 / 36.54 25.31 / 26.56 28.25 / 37.55 27.17 / 52.17
Meta-Llama-3-8B-Instruct LAT 4.81 / 0.00 10.31 / 3.12 3.72 / 0.37 4.35 / 0.00
Meta-Llama-3-8B-Instruct Ours (Trajectory Alignment) 4.81 / 0.00 2.81 / 0.00 1.49 / 0.00 2.17 / 0.00
Mistral-7B-Instruct-v0.2 Injection (no defense) 78.85 / 77.88 68.44 / 66.25 61.71 / 63.94 86.96 / 88.04
Mistral-7B-Instruct-v0.2 Circuit Breakers 1.92 / 2.88 1.56 / 0.94 0.74 / 1.86 0.00 / 2.17
Mistral-7B-Instruct-v0.2 Ours (Trajectory Alignment) 0.96 / 2.88 3.44 / 2.50 0.37 / 0.37 0.00 / 2.17

We trained Ours on the Meta-Llama-3-8B-Instruct and Mistral-7B-Instruct-v0.2 backbones used by the released baselines. All methods use identical prompts, attacks, decoding settings, and judges. We will identify each backbone in the main table and restrict rankings to methods evaluated on the same backbone.


References

[1] Cui et al., “OR-Bench: An Over-Refusal Benchmark for Large Language Models,” ICML 2025.

[2] Zheng et al., “Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena,” NeurIPS 2023.

[3] Dubois et al., “Length-Controlled AlpacaEval: A Simple Debiasing of Automatic Evaluators,” COLM 2024.

[4] Zou et al., “Improving Alignment and Robustness with Circuit Breakers,” NeurIPS 2024.

[5] Sheshadri et al., “Latent Adversarial Training Improves Robustness to Persistent Harmful Behaviors in LLMs,” TMLR 2025.

Reviewer royP · CommentOpenReview ↗

I thank the authors for the detailed and candid response, which resolves several of my concerns and corrects a genuine misreading on my part.

On W1, I accept the correction. Re-reading the Table 14–15 captions, the affirmative spans are attacker-injected rather than model-generated, so my characterization of "spontaneous self-contradiction" was mistaken. The added OR-Bench, MT-Bench, and AlpacaEval 2.0 results, together with the targeted audit of affirmative openings, address the substance of my capability concern on Llama-3.1-8B. I appreciate the authors dropping the "no capability loss" claim in favor of the more accurate "largely retained, with measurable over-refusal." This concession is the right call.

On W5, the clarification that the unperturbed trajectory is retained as one side of every preference pair resolves the contradiction I raised, and the reconciliation with the 342/0 branch counts for Llama is convincing. I'd encourage the authors to make this explicit in Section 3.1, Algorithm 1, and the Table 6 explanation as promised, since the current text genuinely does not support a valid pairing.

On W3 and W6, the strict train/eval separation, the cleaned non-overlapping JailbreakBench split, and the exact-backbone baseline comparison (Table D) adequately address my methodology and fairness concerns.

On W2, the continuation-only OM analysis is a reasonable correction, though I remain mildly cautious about attributing the full 49→4% swing to the prefill tokens alone.

Two items keep me from raising further: (1) the free-generation helpfulness results are reported only for Llama-3.1-8B, while my over-refusal concern also applied to Qwen (11.6% on XSTest); extending Table A to Mistral and Qwen would strengthen the "helpfulness retained" claim across backbones. (2) The over-refusal increase, now acknowledged, tempers but does not eliminate the utility-cost concern.

Given the substantive responses and the corrected misunderstanding, I am raising my score from 2 to 3.

Authors · CommentOpenReview ↗

Response to reviewer royP

Thank you for the careful follow-up and for revisiting each point in light of our response. We sincerely appreciate your confirmation that several concerns were resolved, as well as your clear identification of what remains. We are currently running the same free-generation evaluations for Mistral-7B-Instruct-v0.3 and Qwen2.5-7B-Instruct. (1) As soon as these runs finish, we will update Table A on this author-response page with their helpfulness and over-refusal results before the discussion period closes. (2) The additional over-refusal results will enable a more detailed cross-backbone assessment of the utility cost you identify, which we will report and discuss alongside the helpfulness results.

For the benefit of the other reviewers and the AC, we briefly summarize the points addressed in your follow-up:

  • (W1) Self-contradiction and free-form utility: We clarified that the affirmative spans were attacker-injected and added OR-Bench, MT-Bench, AlpacaEval 2.0, and the targeted generation audit (Table A). The reviewer accepts the correction and states that these results address the substance of the capability concern on Llama.
  • (W2) OM–LlamaGuard discrepancy: We evaluated only the model-generated continuations after removing the attacker-supplied prefills (Table B). The reviewer regards this as a reasonable correction, while retaining mild caution about attributing the full change to the prefill.
  • (W3) Evaluation separation and overlap: We clarified that alignment used only the training split and reran JailbreakBench after removing overlapping behaviors (Table C). The reviewer states that this adequately address the methodology concern.
  • (W5) SimPO pair construction: We clarified that the unperturbed trajectory supplies one side of every pair and reconciled this with the 342/0 Llama branch counts. The reviewer states that this resolves the contradiction and finds the count reconciliation convincing.
  • (W6) Base-model comparability: We reran the comparison on the exact backbones used by the released baselines (Table D). The reviewer states that this adequately address the fairness concern.

We remain fully open to further questions or discussion through the end of the discussion period. We will return with the completed Table A and the corresponding analysis.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Missing a submission?

Loading the discussion…