mlsanityData to 7 Oct 2026

Large Language Model Sentinel: LLM Agent for Adversarial Purification

arXiv 2405.20770 ↗First posted 24 May 2024cs.CL cs.AI cs.CRcited by 10

On the map: LLM agents and tool use → Agent threats, guardrails and governance

Abstract (arXiv)

Over the past two years, the use of large language models (LLMs) has advanced rapidly. While these LLMs offer considerable convenience, they also raise security concerns, as LLMs are vulnerable to adversarial attacks by some well-designed textual perturbations. In this paper, we introduce a novel defense technique named Large LAnguage MOdel Sentinel (LLAMOS), which is designed to enhance the adversarial robustness of LLMs by purifying the adversarial textual examples before feeding them into the target LLM. Our method comprises two main components: a) Agent instruction, which can simulate a new agent for adversarial defense, altering minimal characters to maintain the original meaning of the sentence while defending against attacks; b) Defense guidance, which provides strategies for modifying clean or adversarial examples to ensure effective defense and accurate outputs from the target LLMs. Remarkably, the defense agent demonstrates robust defensive capabilities even without learning from adversarial examples. Additionally, we conduct an intriguing adversarial experiment where we develop two agents, one for defense and one for attack, and engage them in mutual confrontation. During the adversarial interactions, neither agent completely beat the other. Extensive experiments on both open-source and closed-source LLMs demonstrate that our method effectively defends against adversarial attacks, thereby enhancing adversarial robustness.

Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 42 of its 64 references that are in the map. First posted on arXiv 24 May 2024.

Builds on

42 of 64 references.

References · 42

  1. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  2. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  3. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
  4. 2014Explaining and Harnessing Adversarial Examplescited by 7,287
  5. 2013Intriguing properties of neural networkscited by 5,114
  6. 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,854
  7. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
  8. 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,355
  9. 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
  10. 2020Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attackscited by 1,442
  11. 2020RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Modelscited by 1,235
  12. 2023AgentBench: Evaluating LLMs as Agentscited by 1,211
30 more
  1. 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!cited by 1,106
  2. 2022A Survey on In-context Learningcited by 717
  3. 2023OpenAssistant Conversations -- Democratizing Large Language Model Alignmentcited by 712
  4. 2023ChemCrow: Augmenting large-language models with chemistry toolscited by 609
  5. 2023MM-REACT: Prompting ChatGPT for Multimodal Reasoning and Actioncited by 511
  6. 2024Large Language Models: A Surveycited by 506
  7. 2023DecodingTrust: A Comprehensive Assessment of Trustworthiness in GPT Modelscited by 505
  8. 2023Jailbreaking ChatGPT via Prompt Engineering: An Empirical Studycited by 478
  9. 2023Cognitive Architectures for Language Agentscited by 422
  10. 2023A Survey on Large Language Model (LLM) Security and Privacy: The Good, the Bad, and the Uglycited by 380
  11. 2023Safety-Tuned LLaMAs: Lessons From Improving the Safety of Large Language Models that Follow Instructionscited by 377
  12. 2023EmbodiedGPT: Vision-Language Pre-Training via Embodied Chain of Thoughtcited by 276
  13. 2023Large Language Model Alignment: A Surveycited by 241
  14. 2021Adversarial GLUE: A Multi-Task Benchmark for Robustness Evaluation of Language Modelscited by 227
  15. 2023Sources of Hallucination by Large Language Models on Inference Taskscited by 168
  16. 2023SwiftSage: A Generative Agent with Fast and Slow Thinking for Complex Interactive Taskscited by 166
  17. 2023Scaling Up and Distilling Down: Language-Guided Robot Skill Acquisitioncited by 156
  18. 2021Cutting Down on Prompts and Parameters: Simple Few-Shot Learning with Language Modelscited by 139
  19. 2020Perceptual Adversarial Robustness: Defense Against Unseen Threat Modelscited by 137
  20. 2017Bilateral Multi-Perspective Matching for Natural Language Sentencescited by 120
  21. 2023An LLM can Fool Itself: A Prompt-Based Adversarial Attackcited by 111
  22. 2023Avalon's Game of Thoughts: Battle Against Deception through Recursive Contemplationcited by 102
  23. 2024BadEdit: Backdooring large language models by model editingcited by 84
  24. 2024BadChain: Backdoor Chain-of-Thought Prompting for Large Language Modelscited by 74
  25. 2024Purifying Large Language Models by Ensembling a Small Language Modelcited by 25
  26. 2021Robustness and Generalization via Generative Adversarial Trainingcited by 20
  27. 2022Text Adversarial Purification as Defense against Adversarial Attackscited by 15
  28. 2024Adversarial Training on Purification (AToP): Advancing Both Robustness and Generalizationcited by 15
  29. 2024Adversarial Text Purification: A Large Language Model Approach for Defensecited by 8
  30. 2023Language Guided Adversarial Purificationcited by 1

Built on by

Cited by year (2026 to 7 Oct)

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

10 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025A Survey of Attacks on Large Language Models
  2. 2023Survey of Vulnerabilities in Large Language Models Revealed by Adversarial Attacks
  3. 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Models
  4. 2025Data Security in Large Language Models: Risks, Defense, and Directions
  5. 2026Universal Defenses for Tool-Integrated LLM Agents Against Adversarial Attacks
  6. 2025TAMAS: Benchmarking Adversarial Risks in Multi-Agent LLM Systems
  7. 2025Adversarial Reinforcement Learning for Large Language Model Agent Safety
  8. 2024Efficient Adversarial Training in LLMs with Continuous Attacks