Defense against Prompt Injection Attacks via Mixture of Encodings
On the map: LLM safety and security → Prompt injection and agent security
Abstract (arXiv)
Large Language Models (LLMs) have emerged as a dominant approach for a wide range of NLP tasks, with their access to external information further enhancing their capabilities. However, this introduces new vulnerabilities, known as prompt injection attacks, where external content embeds malicious instructions that manipulate the LLM's output. Recently, the Base64 defense has been recognized as one of the most effective methods for reducing success rate of prompt injection attacks. Despite its efficacy, this method can degrade LLM performance on certain NLP tasks. To address this challenge, we propose a novel defense mechanism: mixture of encodings, which utilizes multiple character encodings, including Base64. Extensive experimental results show that our method achieves one of the lowest attack success rates under prompt injection attacks, while maintaining high performance across all NLP tasks, outperforming existing character encoding-based defense methods. This underscores the effectiveness of our mixture of encodings strategy for both safety and task performance metrics.
Key facts. Cited by 14 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 27 of its 33 references that are in the map. First posted on arXiv 10 Apr 2025.
Builds on
27 of 33 references.
Closest ancestors · 5
Same direction, newest first
- 2024The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions19 Apr
- 2024Defending Against Indirect Prompt Injection Attacks With Spotlighting20 Mar
- 2023Benchmarking and Defending Against Indirect Prompt Injection Attacks on Large Language Models21 Dec
- 2023Tensor Trust: Interpretable Prompt Injection Attacks from an Online Game2 Nov
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection23 Feb
Other references · 22
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
- 2020Measuring Massive Multitask Language Understandingcited by 7,963
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
- 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,073
- 2021WebGPT: Browser-assisted question-answering with human feedbackcited by 1,745
- 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,651
- 2018Don't Give Me the Details, Just the Summary! Topic-Aware Convolutional Neural Networks for Extreme Summarizationcited by 1,317
- 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 832
- 2021Scaling Vision with Sparse Mixture of Expertscited by 747
- 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Modelscited by 651
10 more
- 2019SAMSum Corpus: A Human-annotated Dialogue Dataset for Abstractive Summarizationcited by 535
- 2022Language Models are Multilingual Chain-of-Thought Reasonerscited by 530
- 2015Compositional Semantic Parsing on Semi-Structured Tablescited by 515
- 2024WildGuard: Open One-Stop Moderation Tools for Safety Risks, Jailbreaks, and Refusals of LLMscited by 496
- 2023Detecting Language Model Attacks with Perplexitycited by 431
- 2023GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Ciphercited by 423
- 2024Defending LLMs against Jailbreaking Attacks via Backtranslationcited by 70
- 2022PromptBoosting: Black-Box Text Classification with Ten Forward Passescited by 36
- 2023Token-Level Adversarial Prompt Detection Based on Perplexity Measures and Contextual Informationcited by 33
- 2023PREFER: Prompt Ensemble Learning via Feedback-Reflect-Refinecited by 28
Built on by
Citing papers per year: 2025: 5; 2026: 9.
14 papers.
Sort:
By area:
- 2025Beyond the Protocol: Unveiling Attack Vectors in the Model Context Protocol (MCP) Ecosystemcited by 19
- 2026AgentSys: Secure and Dynamic LLM Agents Through Explicit Hierarchical Memory Managementcited by 10
- 2025PromptSleuth: Detecting Prompt Injection via Semantic Intent Invariancecited by 8
- 2025VortexPIA: Indirect Prompt Injection Attack against LLMs for Efficient Extraction of User Privacycited by 7
- 2026Your Agentic LLMs Secretly Encode Indirect Prompt-Injection Exposure in Hidden Statescited by 7
- 2026SkillScope: Toward Fine-Grained Least-Privilege Enforcement for Agent Skillscited by 5
- 2026Conjunctive Prompt Attacks in Multi-Agent LLM Systemscited by 2
- 2026Large Language Models for Agentic NetOps and AIOps: Architectures, Evaluation, and Safetycited by 2
- 2025SteganoBackdoor: Evading Data-Poisoning Defenses via Steganographic Backdoorscited by 1
- 2026Depth Charge: Jailbreak Large Language Models from Deep Safety Attention Headscited by 1
- 2025Context-Aware Hierarchical Learning: A Two-Step Paradigm towards Safer LLMscited by 0
- 2026Clouding the Mirror: Stealthy Prompt Injection Attacks Targeting LLM-based Phishing Detectioncited by 0
- 2026Origin Is All You Need: Provenance-Aware Transformers for Structural Trust-Boundary Separation17 Sep 2026
- 2026Your Agentic LLMs Secretly Encode Indirect Prompt-Injection Exposure in Hidden States1 Aug 2026
- 2026SafeMed-R1: Clinician-Audited Safety and Ethics Alignment for Medical Large Language Models27 May 2026
- 2026Large Language Models for Agentic NetOps and AIOps: Architectures, Evaluation, and Safety12 May 2026
- 2026SkillScope: Toward Fine-Grained Least-Privilege Enforcement for Agent Skills7 May 2026
- 2026Conjunctive Prompt Attacks in Multi-Agent LLM Systems17 Apr 2026
- 2026Depth Charge: Jailbreak Large Language Models from Deep Safety Attention Heads6 Mar 2026
- 2026AgentSys: Secure and Dynamic LLM Agents Through Explicit Hierarchical Memory Management7 Feb 2026
- 2026Clouding the Mirror: Stealthy Prompt Injection Attacks Targeting LLM-based Phishing Detection5 Feb 2026
- 2025Context-Aware Hierarchical Learning: A Two-Step Paradigm towards Safer LLMs3 Dec 2025
- 2025SteganoBackdoor: Evading Data-Poisoning Defenses via Steganographic Backdoors18 Nov 2025
- 2025VortexPIA: Indirect Prompt Injection Attack against LLMs for Efficient Extraction of User Privacy5 Oct 2025
- 2025Beyond the Protocol: Unveiling Attack Vectors in the Model Context Protocol (MCP) Ecosystemcited by 19
- 2026AgentSys: Secure and Dynamic LLM Agents Through Explicit Hierarchical Memory Managementcited by 10
- 2026Your Agentic LLMs Secretly Encode Indirect Prompt-Injection Exposure in Hidden Statescited by 7
- 2026SkillScope: Toward Fine-Grained Least-Privilege Enforcement for Agent Skillscited by 5
- 2026Conjunctive Prompt Attacks in Multi-Agent LLM Systemscited by 2
- 2026Large Language Models for Agentic NetOps and AIOps: Architectures, Evaluation, and Safetycited by 2
- 2026Your Agentic LLMs Secretly Encode Indirect Prompt-Injection Exposure in Hidden States1 Aug 2026
- 2026Large Language Models for Agentic NetOps and AIOps: Architectures, Evaluation, and Safety12 May 2026
- 2026SkillScope: Toward Fine-Grained Least-Privilege Enforcement for Agent Skills7 May 2026
- 2026Conjunctive Prompt Attacks in Multi-Agent LLM Systems17 Apr 2026
- 2026AgentSys: Secure and Dynamic LLM Agents Through Explicit Hierarchical Memory Management7 Feb 2026
- 2025Beyond the Protocol: Unveiling Attack Vectors in the Model Context Protocol (MCP) Ecosystem31 May 2025
- 2025PromptSleuth: Detecting Prompt Injection via Semantic Intent Invariancecited by 8
- 2025VortexPIA: Indirect Prompt Injection Attack against LLMs for Efficient Extraction of User Privacycited by 7
- 2026Depth Charge: Jailbreak Large Language Models from Deep Safety Attention Headscited by 1
- 2026Clouding the Mirror: Stealthy Prompt Injection Attacks Targeting LLM-based Phishing Detectioncited by 0
- 2026Origin Is All You Need: Provenance-Aware Transformers for Structural Trust-Boundary Separationcited by 0
- 2026Origin Is All You Need: Provenance-Aware Transformers for Structural Trust-Boundary Separation17 Sep 2026
- 2026Depth Charge: Jailbreak Large Language Models from Deep Safety Attention Heads6 Mar 2026
- 2026Clouding the Mirror: Stealthy Prompt Injection Attacks Targeting LLM-based Phishing Detection5 Feb 2026
- 2025VortexPIA: Indirect Prompt Injection Attack against LLMs for Efficient Extraction of User Privacy5 Oct 2025
- 2025PromptSleuth: Detecting Prompt Injection via Semantic Intent Invariance28 Aug 2025
Similar, not cited
Close in wording, no citation either way
- 2024Automatic and Universal Prompt Injection Attacks against Large Language Models
- 2024Defense Against Prompt Injection Attack by Leveraging Attack Techniques
- 2025A Critical Evaluation of Defenses against Prompt Injection Attacks
- 2025Robustness via Referencing: Defending against Prompt Injection Attacks by Referencing the Executed Instruction
- 2025Prompt Injection as an Emerging Threat: Evaluating the Resilience of Large Language Models
- 2025Attack and defense techniques in large language models: A survey and new perspectives
- 2026An Empirical Evaluation of Prompt Injection Vulnerabilities in Large Language Models Across Multilingual and Obfuscated Attack Scenarios
- 2023Prompt Injection attack against LLM-integrated Applications