mlsanityData to 14 Oct 2026

SecurityLingua: Efficient Defense of LLM Jailbreak Attacks via Security-Aware Prompt Compression

arXiv 2506.12707 ↗First posted 15 Jun 2025cs.CR cs.CLcited by 13

On the map: Efficient LLM inference and serving → Diffusion LLM and MoE inference

also in 1 more
Abstract (arXiv)

Large language models (LLMs) have achieved widespread adoption across numerous applications. However, many LLMs are vulnerable to malicious attacks even after safety alignment. These attacks typically bypass LLMs' safety guardrails by wrapping the original malicious instructions inside adversarial jailbreaks prompts. Previous research has proposed methods such as adversarial training and prompt rephrasing to mitigate these safety vulnerabilities, but these methods often reduce the utility of LLMs or lead to significant computational overhead and online latency. In this paper, we propose SecurityLingua, an effective and efficient approach to defend LLMs against jailbreak attacks via security-oriented prompt compression. Specifically, we train a prompt compressor designed to discern the "true intention" of the input prompt, with a particular focus on detecting the malicious intentions of adversarial prompts. Then, in addition to the original prompt, the intention is passed via the system prompt to the target LLM to help it identify the true intention of the request. SecurityLingua ensures a consistent user experience by leaving the original input prompt intact while revealing the user's potentially malicious intention and stimulating the built-in safety guardrails of the LLM. Moreover, thanks to prompt compression, SecurityLingua incurs only a negligible overhead and extra token cost compared to all existing defense methods, making it an especially practical solution for LLM defense. Experimental results demonstrate that SecurityLingua can effectively defend against malicious attacks and maintain utility of the LLM with negligible compute and latency overhead. Our code is available at https://aka.ms/SecurityLingua.

Key facts. Cited by 13 papers in the map (data through 14 Oct 2026). Placed in Diffusion LLM and MoE inference, one of 12 directions in Efficient LLM inference and serving. Builds on 45 of its 54 references that are in the map. First posted on arXiv 15 Jun 2025.

Builds on

45 of 54 references.

References · 45

  1. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  2. 2021Training Verifiers to Solve Math Word Problemscited by 10,109
  3. 2020Measuring Massive Multitask Language Understandingcited by 7,963
  4. 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
  5. 2019Unsupervised Cross-lingual Representation Learning at Scalecited by 3,935
  6. 2023GPQA: A Graduate-Level Google-Proof Q&A Benchmarkcited by 2,879
  7. 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,651
  8. 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,420
  9. 2023AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Modelscited by 785
  10. 2023Tree of Attacks: Jailbreaking Black-Box LLMs Automaticallycited by 672
  11. 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Modelscited by 651
  12. 2024How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMscited by 573
33 more
  1. 2023GPTFUZZER: Red Teaming Large Language Models with Auto-Generated Jailbreak Promptscited by 560
  2. 2024JailbreakBench: An Open Robustness Benchmark for Jailbreaking Large Language Modelscited by 536
  3. 2023"Do Anything Now": Characterizing and Evaluating In-The-Wild Jailbreak Prompts on Large Language Modelscited by 489
  4. 2024Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attackscited by 486
  5. 2023SmoothLLM: Defending Large Language Models Against Jailbreaking Attackscited by 469
  6. 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compressioncited by 453
  7. 2023Detecting Language Model Attacks with Perplexitycited by 431
  8. 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compressioncited by 348
  9. 2023Visual Adversarial Examples Jailbreak Aligned Large Language Modelscited by 328
  10. 2023LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Modelscited by 287
  11. 2023Certifying LLM Safety against Adversarial Promptingcited by 266
  12. 2024SafeDecoding: Defending against Jailbreak Attacks via Safety-Aware Decodingcited by 247
  13. 2023LLM Self Defense: By Self Examination, LLMs Know They Are Being Trickedcited by 244
  14. 2024JailBreakV: A Benchmark for Assessing the Robustness of MultiModal Large Language Models against Jailbreak Attackscited by 230
  15. 2024WildTeaming at Scale: From In-the-Wild Jailbreaks to (Adversarially) Safer Language Modelscited by 223
  16. 2023Scalable and Transferable Black-Box Jailbreaks for Language Models via Persona Modulationcited by 214
  17. 2024SecAlign: Defending Against Prompt Injection with Preference Optimizationcited by 210
  18. 2023Defending Against Alignment-Breaking Attacks via Robustly Aligned LLMcited by 192
  19. 2023Compressing Context to Enhance Inference Efficiency of Large Language Modelscited by 189
  20. 2025Constitutional Classifiers: Defending against Universal Jailbreaks across Thousands of Hours of Red Teamingcited by 181
  21. 2024AutoDefense: Multi-Agent LLM Defense against Jailbreak Attackscited by 145
  22. 2024Attacking Large Language Models with Projected Gradient Descentcited by 94
  23. 2024Harmful Fine-tuning Attacks and Defenses for Large Language Models: A Surveycited by 90
  24. 2024Defending Against Unforeseen Failure Modes with Latent Adversarial Trainingcited by 88
  25. 2024Intention Analysis Makes LLMs A Good Jailbreak Defendercited by 74
  26. 2024Defending Large Language Models against Jailbreak Attacks via Semantic Smoothingcited by 74
  27. 2024RigorLLM: Resilient Guardrails for Large Language Models against Undesired Contentcited by 68
  28. 2023The Art of Defending: A Systematic Evaluation and Analysis of LLM Defense Strategies on Safety and Over-Defensivenesscited by 67
  29. 2024Semantic Mirror Jailbreak: Genetic Algorithm Based Jailbreak Prompts Against Open-source LLMscited by 53
  30. 2024Pruning for Protection: Increasing Jailbreak Resistance in Aligned LLMs Without Fine-Tuningcited by 26
  31. 2024RobustKV: Defending Large Language Models against Jailbreak Attacks via KV Evictioncited by 21
  32. 2024Attack Atlas: A Practitioner's Perspective on Challenges and Pitfalls in Red Teaming GenAIcited by 16
  33. 2024Self-Evaluation as a Defense Against Adversarial Attacks on LLMscited by 14

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 6; 2026: 7.

13 papers.

Sort:

By area:

Similar, not cited

Close in wording, no citation either way

  1. 2023A Wolf in Sheep's Clothing: Generalized Nested Jailbreak Prompts can Fool Large Language Models Easily
  2. 2024Defensive Prompt Patch: A Robust and Interpretable Defense of LLMs against Jailbreak Attacks
  3. 2024SelfDefend: LLMs Can Defend Themselves against Jailbreaking in a Practical Manner
  4. 2024Defending Large Language Models Against Jailbreak Attacks via Layer-specific Editing
  5. 2024Jailbreak Attacks and Defenses Against Large Language Models: A Survey
  6. 2025Jailbreaking with Universal Multi-Prompts
  7. 2026Re-Triggering Safeguards within LLMs for Jailbreak Detection
  8. 2025Scalable Defense against In-the-wild Jailbreaking Attacks with Safety Context Retrieval