Skip to content
InfoResearchPreprintLLM-specific

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

Published
Record updated
View JSON

Summary

AttentionSwitch is a jailbreak defense for large language models that jointly learns which attention heads to intervene on and how strongly to scale them, keeping the model frozen. It addresses the decoupled optimization of location and strength used by prior defenses. The authors report that it outperforms existing defenses across popular models and jailbreak attacks, especially when training data is scarce.