Skip to content
NewA calmer, faster ZeroHour

AttentionSwitch: Joint Learning for LLM Jailbreak Defense

Original title: AttentionSwitch: Jailbreak Defense for LLMs via Joint Learning of Sparse Attention-Head Selection and Scaling

arXiv cs.CRby Doniyorkhon Obidov ()1 min read
AI summary · x-ai/grok-4.7Summaries by Vani AI

AttentionSwitch jointly optimizes sparse attention head selection and query-conditioned scaling to defend LLMs against jailbreaks without catastrophic forgetting.

Large language models remain susceptible to jailbreak attacks that circumvent safety mechanisms. Existing defenses typically decouple intervention site selection from modification strength, which can be suboptimal. AttentionSwitch is the first method to jointly learn a sparse set of attention heads together with multiplicative scaling factors on frozen LLMs, allowing attenuation or amplification of selected heads without altering representation directions. Across popular language models and jailbreak attacks, it outperforms existing defenses, with particularly strong results when training data is scarce.

Key facts
  • First joint optimization of intervention sites and strengths on frozen LLMs
  • Learns sparse attention heads with query-conditioned scaling factors
  • No change to representation directions in selected heads
  • Outperforms prior defenses under data-scarce conditions
  • Applies to popular language models and multiple attacks
Explain this AI news with Vani AIWhat was announced, what is new and why it matters, in a new chat

From the original article

1 min read at arxiv.org

Large language models have achieved remarkable performance across a wide range of tasks, yet they remain susceptible to jailbreak attacks that circumvent safety mechanisms and elicit harmful or unintended outputs. Although safety can be improved through model fine-tuning, such approaches can be computationally expensive and may degrade previously acquired capabilities through catastrophic forgetting.

arXiv cs.CR

By Doniyorkhon Obidov · arxiv.org

Read the full article at arXiv cs.CR

A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.