mlsanityData to 7 Oct 2026

Why Safeguarded Ships Run Aground? Aligned Large Language Models' Safety Mechanisms Tend to Be Anchored in The Template Region

arXiv 2502.13946 ↗First posted 19 Feb 2025cs.CL cs.AI cs.CRcited by 5

On the map: LLM alignment / RLHF / preference optimisation → Safety alignment and jailbreak attacks

also in 1 more
Abstract (arXiv)

The safety alignment of large language models (LLMs) remains vulnerable, as their initial behavior can be easily jailbroken by even relatively simple attacks. Since infilling a fixed template between the input instruction and initial model output is a common practice for existing LLMs, we hypothesize that this template is a key factor behind their vulnerabilities: LLMs' safety-related decision-making overly relies on the aggregated information from the template region, which largely influences these models' safety behavior. We refer to this issue as template-anchored safety alignment. In this paper, we conduct extensive experiments and verify that template-anchored safety alignment is widespread across various aligned LLMs. Our mechanistic analyses demonstrate how it leads to models' susceptibility when encountering inference-time jailbreak attacks. Furthermore, we show that detaching safety mechanisms from the template region is promising in mitigating vulnerabilities to jailbreak attacks. We encourage future research to develop more robust safety alignment techniques that reduce reliance on the template region.

Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Placed in Safety alignment and jailbreak attacks, one of 10 directions in LLM alignment / RLHF / preference optimisation. Builds on 54 of its 71 references that are in the map. First posted on arXiv 19 Feb 2025.

Builds on

54 of 71 references.

Closest ancestors · 13

Same direction, newest first

  1. 2024NLSR: Neuron-Level Safety Realignment of Large Language Models Against Harmful Fine-Tuning17 Dec
  2. 2024Safety Layers in Aligned Large Language Models: The Key to LLM Security30 Aug
  3. 2024SORRY-Bench: Systematically Evaluating Large Language Model Safety Refusal20 Jun
  4. 2024ChatBug: A Common Vulnerability of Aligned LLMs Induced by Chat Templates17 Jun
  5. 2024Safety Alignment Should Be Made More Than Just a Few Tokens Deep10 Jun
  6. 2024No Two Devils Alike: Unveiling Distinct Mechanisms of Fine-tuning Attacks25 May
  7. 2024Uncovering Safety Risks of Large Language Models through Concept Activation Vector18 Apr
  8. 2024Assessing the Brittleness of Safety Alignment via Pruning and Low-Rank Modifications7 Feb
  9. 2024A Mechanistic Understanding of Alignment Algorithms: A Case Study on DPO and Toxicity3 Jan
  10. 2023Safe RLHF: Safe Reinforcement Learning from Human Feedback19 Oct
  11. 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!5 Oct
  12. 2023Universal and Transferable Adversarial Attacks on Aligned Language Models27 Jul
1 more
  1. 2023BeaverTails: Towards Improved Safety Alignment of LLM via a Human-Preference Dataset10 Jul

Other references · 41

  1. 2017Attention Is All You Needcited by 59,932
  2. 2024The Llama 3 Herd of Modelscited by 14,192
  3. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  4. 2022Constitutional AI: Harmlessness from AI Feedbackcited by 2,950
  5. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
  6. 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,928
  7. 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,565
  8. 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,330
  9. 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,326
  10. 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,307
  11. 2023Representation Engineering: A Top-Down Approach to AI Transparencycited by 1,239
  12. 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
29 more
  1. 2024Refusal in Language Models Is Mediated by a Single Directioncited by 960
  2. 2023The Geometry of Truth: Emergent Linear Structure in Large Language Model Representations of True/False Datasetscited by 673
  3. 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 522
  4. 2023Dissecting Recall of Factual Associations in Auto-Regressive Language Modelscited by 512
  5. 2024Mechanistic Interpretability for AI Safety -- A Reviewcited by 415
  6. 2024Sparse Feature Circuits: Discovering and Editing Interpretable Causal Graphs in Language Modelscited by 412
  7. 2023Finding Neurons in a Haystack: Case Studies with Sparse Probingcited by 328
  8. 2024Improving Alignment and Robustness with Circuit Breakerscited by 302
  9. 2013Direct and Indirect Effectscited by 276
  10. 2023The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context Learningcited by 251
  11. 2024When Attention Sink Emerges in Language Models: An Empirical Viewcited by 200
  12. 2024How to use and interpret activation patchingcited by 191
  13. 2024Programming Refusal with Conditional Activation Steeringcited by 191
  14. 2024AmpleGCG: Learning a Universal and Transferable Generative Model of Adversarial Suffixes for Jailbreaking Both Open and Closed LLMscited by 160
  15. 2023Linear Representations of Sentiment in Large Language Modelscited by 157
  16. 2021Causal Analysis of Syntactic Agreement Mechanisms in Neural Language Modelscited by 127
  17. 2024Keeping LLMs Aligned After Fine-tuning: The Crucial Role of Prompt Templatescited by 94
  18. 2024Representation Noising: A Defence Mechanism Against Harmful Finetuningcited by 93
  19. 2023Successor Heads: Recurring, Interpretable Attention Heads In The Wildcited by 77
  20. 2023Copy Suppression: Comprehensively Understanding an Attention Headcited by 73
  21. 2023Aligning Large Language Models with Human Preferences through Representation Engineeringcited by 71
  22. 2024Confidence Regulation Neurons in Language Modelscited by 57
  23. 2023Self-Detoxifying Language Models via Toxification Reversalcited by 45
  24. 2024Operationalizing a Threat Model for Red-Teaming Large Language Models (LLMs)cited by 44
  25. 2024Competition of Mechanisms: Tracing How Language Models Handle Facts and Counterfactualscited by 40
  26. 2024What Features in Prompts Jailbreak LLMs? Investigating the Mechanisms Behind Attackscited by 24
  27. 2024Locking Down the Finetuned LLMs Safetycited by 22
  28. 2024Constrain Alignment with Sparse Autoencoderscited by 11
  29. 2024Jailbreak Instruction-Tuned LLMs via end-of-sentence MLP Re-weightingcited by 4

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 4; 2026: 1.

5 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Decoding One Safety Trigger Token for Balancing Safety and Usability in Large Language Models
  2. 2026SecureBreak -- A dataset towards safe and secure models
  3. 2026Safety Paradox: How Enhanced Safety Awareness Leaves LLMs Vulnerable to Posterior Attack
  4. 2025STAIR: Improving Safety Alignment with Introspective Reasoning
  5. 2026Understanding and Preserving Safety in Fine-Tuned LLMs
  6. 2026Inference-Time Vulnerability Beyond Shallow Safety: Alignment Along Generation Trajectories
  7. 2025When Style Breaks Safety: Defending LLMs Against Superficial Style Alignment
  8. 2025The Hidden Dimensions of LLM Alignment: A Multi-Dimensional Analysis of Orthogonal Safety Directions