[Paper Review] Pruning for Protection: Increasing Jailbreak Resistance in Aligned LLMs Without Fine-Tuning
This paper demonstrates that structured pruning of up to 20% of parameters in aligned large language models (LLMs) significantly increases their resistance to jailbreaking attacks without fine-tuning, improving safety while preserving performance. The improvement is linked to sharper attention concentration on task-relevant tokens, particularly in models with strong initial safety alignment like LLaMA-2 Chat.
This paper investigates the impact of model compression on the way Large Language Models (LLMs) process prompts, particularly concerning jailbreak resistance. We show that moderate WANDA pruning can enhance resistance to jailbreaking attacks without fine-tuning, while maintaining performance on standard benchmarks. To systematically evaluate this safety enhancement, we introduce a dataset of 225 harmful tasks across five categories. Our analysis of LLaMA-2 Chat, Vicuna 1.3, and Mistral Instruct v0.2 reveals that pruning benefits correlate with initial model safety levels. We interpret these results by examining changes in attention patterns and perplexity shifts, demonstrating that pruned models exhibit sharper attention and increased sensitivity to artificial jailbreak constructs. We extend our evaluation to the AdvBench harmful behavior tasks and the GCG attack method. We find that LLaMA-2 is much safer on AdvBench prompts than on our dataset when evaluated with manual jailbreak attempts, and that pruning is effective against both automated attacks and manual jailbreaking on Advbench.
Motivation & Objective
- To investigate whether model pruning can enhance jailbreak resistance in aligned LLMs without additional fine-tuning.
- To evaluate the impact of pruning on safety across models with varying levels of initial safety alignment.
- To analyze how pruning affects attention mechanisms in response to jailbreaking prompts.
- To develop and release a curated dataset of 2,250 jailbreaking prompts to enable standardized evaluation of LLM safety.
- To explore whether pruning can serve as a generalizable method for improving desired model behaviors beyond safety.
Proposed method
- Applied Wanda pruning to 7B-parameter LLMs (LLaMA-2 Chat, Vicuna 1.3, Mistral Instruct v0.2) at sparsity levels up to 20%.
- Curated a dataset of 225 malicious tasks across five categories, each inserted into 10 jailbreaking prompt templates, resulting in 2,250 total prompts.
- Measured jailbreak success rates via refusal rates on malicious prompts before and after pruning.
- Analyzed attention maps to compare how pruned and unpruned models attend to jailbreak pretexts versus original task tokens.
- Used metrics like IntraTaskRank and EndTaskRank to quantify attention concentration on task-relevant tokens.
- Evaluated model performance on standard benchmarks (e.g., AltQA) to ensure no degradation in standard capabilities post-pruning.

Experimental results
Research questions
- RQ1Does pruning improve jailbreak resistance in aligned LLMs without fine-tuning?
- RQ2How does the level of initial safety alignment in a model affect the degree of safety improvement from pruning?
- RQ3Does pruning lead to more focused attention on task-relevant tokens during jailbreaking prompts?
- RQ4How does the location of the original malicious task within a jailbreaking prompt affect pruning’s effectiveness?
- RQ5Can pruning be a generalizable method for enhancing other desired behaviors in LLMs beyond safety?
Key findings
- Pruning up to 20% of parameters increased jailbreak resistance in LLaMA-2 Chat, with a peak safety improvement at 10–20% sparsity.
- LLaMA-2 Chat, which underwent RLHF alignment, showed the most significant safety improvement post-pruning, while Mistral Instruct v0.2, lacking RLHF, showed minimal gains.
- Attention maps revealed that pruned models concentrate significantly more attention on original task tokens and less on jailbreak pretexts, especially in later transformer layers.
- The IntraTaskRank metric showed that pruned models attend more cohesively to task tokens, with differences increasing at higher sparsity levels.
- The method improved resistance across all five task categories and all 10 jailbreaking methods tested, though effectiveness varied slightly based on prompt structure.
- No performance degradation was observed on standard benchmarks like AltQA, confirming that pruning did not compromise general capabilities.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.