Stronger Enforcement of Instruction Hierarchy via Augmented Intermediate Representations
On the map: LLM safety and security → Prompt injection and agent security
Abstract (arXiv)
Prompt injection attacks are a critical security vulnerability in large language models (LLMs), allowing attackers to hijack model behavior by injecting malicious instructions within the input context. Recent defense mechanisms have leveraged an Instruction Hierarchy (IH) Signal, often implemented through special delimiter tokens or additive embeddings to denote the privilege level of input tokens. However, these prior works typically inject the IH signal exclusively at the initial input layer, which we hypothesize limits its ability to effectively distinguish the privilege levels of tokens as it propagates through the different layers of the model. To overcome this limitation, we introduce a novel approach that injects the IH signal into the intermediate token representations within the network. Our method augments these representations with layer-specific trainable embeddings that encode the privilege information. Our evaluations across multiple models and training methods reveal that our proposal yields between 1.6× and 9.2× reduction in attack success rate on gradient-based prompt injection attacks compared to state-of-the-art methods, without significantly degrading the model's utility.
Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). Placed in Prompt injection and agent security, one of 12 directions in LLM safety and security. Builds on 21 of its 29 references that are in the map. First posted on arXiv 25 May 2025.
Builds on
21 of 29 references.
Closest ancestors · 8
Same direction, newest first
- 2025DataSentinel: A Game-Theoretic Detection of Prompt Injection Attacks15 Apr
- 2024Instructional Segment Embedding: Improving LLM Safety with Instruction Hierarchy9 Oct
- 2024SecAlign: Defending Against Prompt Injection with Preference Optimization7 Oct
- 2024AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agents19 Jun
- 2024The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions19 Apr
- 2024Neural Exec: Learning (and Learning from) Execution Triggers for Prompt Injection Attacks6 Mar
- 2024StruQ: Defending Against Prompt Injection with Structured Queries9 Feb
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection23 Feb
Other references · 13
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
- 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 832
- 2023AlpacaFarm: A Simulation Framework for Methods that Learn from Human Feedbackcited by 748
- 2023Detecting Language Model Attacks with Perplexitycited by 431
- 2025Constitutional Classifiers: Defending against Universal Jailbreaks across Thousands of Hours of Red Teamingcited by 181
- 2021Position Information in Transformers: An Overviewcited by 103
- 2024Can LLMs Separate Instructions From Data? And What Do We Even Mean By That?cited by 81
- 2024Boosting Jailbreak Attack with Momentumcited by 40
Built on by
Citing papers per year: 2025: 2; 2026: 7.
9 papers.
- 2025Defending Against Prompt Injection with DataFiltercited by 35
- 2026Prompt Injection as Role Confusioncited by 17
- 2025Meta SecAlign: A Secure Foundation LLM Against Prompt Injection Attackscited by 10
- 2026SecOPD: Mitigating Adaptive Prompt Injections by On-Policy Distillationcited by 3
- 2026System-Prompt Anchoring with Cross-Attention Layerscited by 0
- 2026PIPES: Securing Agent Perception with Provenance and Priorscited by 0
- 2026Semantic Overlays: Mitigating Prompt Injection with Annotations Beyond Tokens and Steering Vectorscited by 0
- 2026When the Agent Becomes the Kernel: A Systematization of Security on the Path to AI-Native Operating Systemscited by 0
- 2026Pincer: Resource Authorization for Agents using a Digital Twincited by 0
- 2026Pincer: Resource Authorization for Agents using a Digital Twin1 Oct 2026
- 2026When the Agent Becomes the Kernel: A Systematization of Security on the Path to AI-Native Operating Systems20 Sep 2026
- 2026Semantic Overlays: Mitigating Prompt Injection with Annotations Beyond Tokens and Steering Vectors24 Aug 2026
- 2026SecOPD: Mitigating Adaptive Prompt Injections by On-Policy Distillation21 Aug 2026
- 2026PIPES: Securing Agent Perception with Provenance and Priors13 Aug 2026
- 2026System-Prompt Anchoring with Cross-Attention Layers10 May 2026
- 2026Prompt Injection as Role Confusion22 Feb 2026
- 2025Defending Against Prompt Injection with DataFilter22 Oct 2025
- 2025Meta SecAlign: A Secure Foundation LLM Against Prompt Injection Attacks3 Jul 2025
Similar, not cited
Close in wording, no citation either way
- 2025Defending against Indirect Prompt Injection by Instruction Detection
- 2023Evaluating the Instruction-Following Robustness of Large Language Models to Prompt Injection
- 2025Backdoor-Powered Prompt Injection Attacks Nullify Defense Methods
- 2026Know Thy Enemy: Securing LLMs Against Prompt Injection via Diverse Data Synthesis and Instruction-Level Chain-of-Thought Learning
- 2026Beyond Over-Refusal: Defending Indirect Prompt Injection via Latent Instruction Manifolds
- 2024Defense Against Prompt Injection Attack by Leveraging Attack Techniques
- 2023Jatmo: Prompt Injection Defense by Task-Specific Finetuning
- 2025Robustness via Referencing: Defending against Prompt Injection Attacks by Referencing the Executed Instruction