mlsanityData to 14 Oct 2026

DETAM: Defending LLMs Against Jailbreak Attacks via Targeted Attention Modification

arXiv 2504.13562 ↗First posted 18 Apr 2025cs.CLcited by 10

On the map: LLM safety and security → Jailbreaking

Abstract (arXiv)

With the widespread adoption of Large Language Models (LLMs), jailbreak attacks have become an increasingly pressing safety concern. While safety-aligned LLMs can effectively defend against normal harmful queries, they remain vulnerable to such attacks. Existing defense methods primarily rely on fine-tuning or input modification, which often suffer from limited generalization and reduced utility. To address this, we introduce DETAM, a finetuning-free defense approach that improves the defensive capabilities against jailbreak attacks of LLMs via targeted attention modification. Specifically, we analyze the differences in attention scores between successful and unsuccessful defenses to identify the attention heads sensitive to jailbreak attacks. During inference, we reallocate attention to emphasize the user's core intention, minimizing interference from attack tokens. Our experimental results demonstrate that DETAM outperforms various baselines in jailbreak defense and exhibits robust generalization across different attacks and models, maintaining its effectiveness even on in-the-wild jailbreak data. Furthermore, in evaluating the model's utility, we incorporated over-defense datasets, which further validate the superior performance of our approach. The code will be released immediately upon acceptance.

Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). Placed in Jailbreaking, one of 12 directions in LLM safety and security. Builds on 30 of its 41 references that are in the map. First posted on arXiv 18 Apr 2025.

Builds on

30 of 41 references.

Closest ancestors · 22

Same direction, newest first

  1. 2025Injecting Universal Jailbreak Backdoors into LLMs in Minutes9 Feb
  2. 2024From Theft to Bomb-Making: The Ripple Effect of Unlearning in Defending Against Jailbreak Attacks3 Jul
  3. 2024WildTeaming at Scale: From In-the-Wild Jailbreaks to (Adversarially) Safer Language Models26 Jun
  4. 2024Adversarial Tuning: Defending Against Jailbreak Attacks for LLMs7 Jun
  5. 2024Mind the Inconspicuous: Revealing the Hidden Weakness in Aligned LLMs' Refusal Boundaries31 May
  6. 2024Protecting Your LLMs with Information Bottleneck22 Apr
  7. 2024Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attacks2 Apr
  8. 2024AutoDefense: Multi-Agent LLM Defense against Jailbreak Attacks2 Mar
  9. 2024Defending LLMs against Jailbreaking Attacks via Backtranslation26 Feb
  10. 2024Defending Large Language Models against Jailbreak Attacks via Semantic Smoothing25 Feb
  11. 2024SafeDecoding: Defending against Jailbreak Attacks via Safety-Aware Decoding14 Feb
  12. 2024Fight Back Against Jailbreaking via Prompt Adversarial Tuning9 Feb
10 more
  1. 2023Defending Large Language Models Against Jailbreaking Attacks Through Goal Prioritization15 Nov
  2. 2023A Wolf in Sheep's Clothing: Generalized Nested Jailbreak Prompts can Fool Large Language Models Easily14 Nov
  3. 2023DeepInception: Hypnotize Large Language Model to Be Jailbreaker6 Nov
  4. 2023Jailbreaking Black Box Large Language Models in Twenty Queries12 Oct
  5. 2023Jailbreak and Guard Aligned Language Models with Only Few In-Context Demonstrations10 Oct
  6. 2023SmoothLLM: Defending Large Language Models Against Jailbreaking Attacks5 Oct
  7. 2023GPTFUZZER: Red Teaming Large Language Models with Auto-Generated Jailbreak Prompts19 Sep
  8. 2023Defending Against Alignment-Breaking Attacks via Robustly Aligned LLM18 Sep
  9. 2023Universal and Transferable Adversarial Attacks on Aligned Language Models27 Jul
  10. 2023Jailbroken: How Does LLM Safety Training Fail?5 Jul

Other references · 8

  1. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  2. 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,720
  3. 2023Safe RLHF: Safe Reinforcement Learning from Human Feedbackcited by 656
  4. 2024BadEdit: Backdooring large language models by model editingcited by 96
  5. 2024Cutting Off the Head Ends the Conflict: A Mechanism for Interpreting and Mitigating Knowledge Conflicts in Language Modelscited by 91
  6. 2024Learning or Self-aligning? Rethinking Instruction Fine-tuningcited by 43
  7. 2024TAIA: Large Language Models are Out-of-Distribution Data Learnerscited by 8
  8. 2024When Parts Are Greater Than Sums: Individual LLM Components Can Outperform Full Modelscited by 6

Built on by

Cited by year (2026 to 14 Oct)

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

10 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Attention Slipping: A Mechanistic Understanding of Jailbreak Attacks and Defenses in LLMs
  2. 2024Defensive Prompt Patch: A Robust and Interpretable Defense of LLMs against Jailbreak Attacks
  3. 2024HSF: Defending against Jailbreak Attacks with Hidden State Filtering
  4. 2025You Can't Eat Your Cake and Have It Too: The Performance Degradation of LLMs with Jailbreak Defense
  5. 2024Intention Analysis Makes LLMs A Good Jailbreak Defender
  6. 2024SelfDefend: LLMs Can Defend Themselves against Jailbreaking in a Practical Manner
  7. 2025SafeInt: Shielding Large Language Models from Jailbreak Attacks via Safety-Aware Representation Intervention
  8. 2024Bag of Tricks: Benchmarking of Jailbreak Attacks on LLMs