Why Safeguarded Ships Run Aground? Aligned Large Language Models' Safety Mechanisms Tend to Be Anchored in The Template Region
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
- 2024NLSR: Neuron-Level Safety Realignment of Large Language Models Against Harmful Fine-Tuning17 Dec
- 2024Safety Layers in Aligned Large Language Models: The Key to LLM Security30 Aug
- 2024SORRY-Bench: Systematically Evaluating Large Language Model Safety Refusal20 Jun
- 2024ChatBug: A Common Vulnerability of Aligned LLMs Induced by Chat Templates17 Jun
- 2024Safety Alignment Should Be Made More Than Just a Few Tokens Deep10 Jun
- 2024No Two Devils Alike: Unveiling Distinct Mechanisms of Fine-tuning Attacks25 May
- 2024Uncovering Safety Risks of Large Language Models through Concept Activation Vector18 Apr
- 2024Assessing the Brittleness of Safety Alignment via Pruning and Low-Rank Modifications7 Feb
- 2024A Mechanistic Understanding of Alignment Algorithms: A Case Study on DPO and Toxicity3 Jan
- 2023Safe RLHF: Safe Reinforcement Learning from Human Feedback19 Oct
- 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!5 Oct
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Models27 Jul
1 more
Other references · 41
- 2017Attention Is All You Needcited by 59,932
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2022Constitutional AI: Harmlessness from AI Feedbackcited by 2,950
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
- 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,928
- 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,565
- 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,330
- 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,326
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,307
- 2023Representation Engineering: A Top-Down Approach to AI Transparencycited by 1,239
- 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
29 more
- 2024Refusal in Language Models Is Mediated by a Single Directioncited by 960
- 2023The Geometry of Truth: Emergent Linear Structure in Large Language Model Representations of True/False Datasetscited by 673
- 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 522
- 2023Dissecting Recall of Factual Associations in Auto-Regressive Language Modelscited by 512
- 2024Mechanistic Interpretability for AI Safety -- A Reviewcited by 415
- 2024Sparse Feature Circuits: Discovering and Editing Interpretable Causal Graphs in Language Modelscited by 412
- 2023Finding Neurons in a Haystack: Case Studies with Sparse Probingcited by 328
- 2024Improving Alignment and Robustness with Circuit Breakerscited by 302
- 2013Direct and Indirect Effectscited by 276
- 2023The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context Learningcited by 251
- 2024When Attention Sink Emerges in Language Models: An Empirical Viewcited by 200
- 2024How to use and interpret activation patchingcited by 191
- 2024Programming Refusal with Conditional Activation Steeringcited by 191
- 2024AmpleGCG: Learning a Universal and Transferable Generative Model of Adversarial Suffixes for Jailbreaking Both Open and Closed LLMscited by 160
- 2023Linear Representations of Sentiment in Large Language Modelscited by 157
- 2021Causal Analysis of Syntactic Agreement Mechanisms in Neural Language Modelscited by 127
- 2024Keeping LLMs Aligned After Fine-tuning: The Crucial Role of Prompt Templatescited by 94
- 2024Representation Noising: A Defence Mechanism Against Harmful Finetuningcited by 93
- 2023Successor Heads: Recurring, Interpretable Attention Heads In The Wildcited by 77
- 2023Copy Suppression: Comprehensively Understanding an Attention Headcited by 73
- 2023Aligning Large Language Models with Human Preferences through Representation Engineeringcited by 71
- 2024Confidence Regulation Neurons in Language Modelscited by 57
- 2023Self-Detoxifying Language Models via Toxification Reversalcited by 45
- 2024Operationalizing a Threat Model for Red-Teaming Large Language Models (LLMs)cited by 44
- 2024Competition of Mechanisms: Tracing How Language Models Handle Facts and Counterfactualscited by 40
- 2024What Features in Prompts Jailbreak LLMs? Investigating the Mechanisms Behind Attackscited by 24
- 2024Locking Down the Finetuned LLMs Safetycited by 22
- 2024Constrain Alignment with Sparse Autoencoderscited by 11
- 2024Jailbreak Instruction-Tuned LLMs via end-of-sentence MLP Re-weightingcited by 4
Built on by
Citing papers per year: 2025: 4; 2026: 1.
5 papers.
- 2025LLMs Encode Harmfulness and Refusal Separatelycited by 75
- 2025Overcoming Sparsity Artifacts in Crosscoders to Interpret Chat-Tuningcited by 31
- 2025Safety Subspaces are Not Linearly Distinct: A Fine-Tuning Case Studycited by 6
- 2025Strong but Brittle: Simple Attacks Subvert Reasoning-based Safety Guardrailscited by 2
- 2026Beyond a Single Direction: Chain-of-Thought Disrupts Simple Steering of Refusalcited by 0
- 2026Beyond a Single Direction: Chain-of-Thought Disrupts Simple Steering of Refusal26 May 2026
- 2025Strong but Brittle: Simple Attacks Subvert Reasoning-based Safety Guardrails13 Oct 2025
- 2025LLMs Encode Harmfulness and Refusal Separately16 Jul 2025
- 2025Safety Subspaces are Not Linearly Distinct: A Fine-Tuning Case Study20 May 2025
- 2025Overcoming Sparsity Artifacts in Crosscoders to Interpret Chat-Tuning3 Apr 2025
Similar, not cited
Close in wording, no citation either way
- 2025Decoding One Safety Trigger Token for Balancing Safety and Usability in Large Language Models
- 2026SecureBreak -- A dataset towards safe and secure models
- 2026Safety Paradox: How Enhanced Safety Awareness Leaves LLMs Vulnerable to Posterior Attack
- 2025STAIR: Improving Safety Alignment with Introspective Reasoning
- 2026Understanding and Preserving Safety in Fine-Tuned LLMs
- 2026Inference-Time Vulnerability Beyond Shallow Safety: Alignment Along Generation Trajectories
- 2025When Style Breaks Safety: Defending LLMs Against Superficial Style Alignment
- 2025The Hidden Dimensions of LLM Alignment: A Multi-Dimensional Analysis of Orthogonal Safety Directions