Abstract
Small language models (SLMs) have become increasingly prominent in the deployment on edge devices due to their high efficiency and low computational cost. While researchers continue to advance the capabilities of SLMs through innovative training strategies and model compression techniques, the security risks of SLMs have received considerably less attention compared to large language models (LLMs). To fill this gap, we provide a comprehensive empirical study to evaluate the security performance of 13 state-of-the-art SLMs under various jailbreak attacks. Our experiments demonstrate that most SLMs are quite susceptible to existing jailbreak attacks, while some of them are even vulnerable to direct harmful prompts. To address the safety concerns, we evaluate several representative defense methods and demonstrate their effectiveness in enhancing the security of SLMs. We further analyze the potential security degradation caused by different SLM techniques including architecture compression, quantization, knowledge distillation, and so on. We expect that our research can highlight the security challenges of SLMs and provide valuable insights to future work in developing more robust and secure SLMs.
Introduction
As the industry shifts toward on-device AI deployment for smartphones and wearables, Small Language Models (SLMs) like Llama-3.2-1B and Phi-3 have become indispensable. However, the rapid push for efficiency through aggressive compression, quantization, and knowledge distillation has left a critical gap in our understanding of their security boundaries. This study investigates whether these efficiency-seeking techniques compromise "safety alignment"—the essential process of ensuring models refuse to generate harmful or unethical content.
Methodology and Evaluation Framework
The research evaluates 13 state-of-the-art SLMs (under 4B parameters) against 3 baseline LLMs. The evaluation framework categorizes threats into two tiers:
- Direct Attacks: Straightforward harmful queries (e.g., "How do I build a bomb?") to test baseline refusal.
- Jailbreak Attacks: Sophisticated adversarial techniques including GCG (gradient-based suffixes), ArtPrompt (ASCII art obfuscation), DeepInception (nested storytelling), AutoDAN (genetic prompt evolution), and Multilingual attacks (exploiting low-resource language weaknesses).
The study utilizes prominent benchmarks such as Advbench, DAN, MaliciousInstruct, StrongREJECT, and XSTEST to measure the Attack Success Rate (ASR).
Analysis of SLM Vulnerabilities
The findings reveal a stark contrast between SLMs and their larger counterparts. Most SLMs exhibit high susceptibility to even basic direct attacks.
As shown in Figure 2, TinyLlama-1.1B demonstrates a staggering average ASR of 0.638 on direct harmful prompts, indicating it follows harmful instructions over 60% of the time without any complex jailbreaking. In comparison, Llama3-8B maintains a much lower direct attack ASR of 0.059.
When subjected to sophisticated jailbreak methods, the vulnerability of SLMs becomes even more pronounced.
The "Incapacity" Illusion
A key insight from the jailbreak analysis (Figure 3) is the phenomenon of "safety through incapacity." Some SLMs show low ASR on complex attacks like ArtPrompt. However, qualitative analysis reveals this is not due to robust alignment but because the models lack the reasoning capacity to understand the malicious intent hidden in ASCII art or low-resource languages.
Impact of Model Compression and Distillation
- Distillation Dilution: Models distilled from larger teachers (e.g., DeepSeek-R1-Distill-Llama-8B) often inherit reasoning capabilities but lose significant safety alignment, making them more vulnerable than base models.
- Quantization: Compressing models to 4-bit (AWQ/GPTQ) does not significantly degrade security. Interestingly, the noise from quantization can sometimes break adversarial suffixes, slightly improving robustness.
- Parameter Sharing: Models like MobileLLM, which use heavy parameter sharing, appear more vulnerable as they prioritize instruction following over safety guardrails within their limited parameter budget.
Defense Effectiveness
The study evaluated three defense strategies: Llama-Guard-3 (external moderation), SmoothLLM (input perturbation), and Backtranslation. While Llama-Guard-3 and SmoothLLM were highly effective at reducing ASR, Backtranslation struggled with the smallest models, which lacked the reasoning power to accurately reconstruct harmful intent from jailbroken prompts.
Conclusion
SLMs harbor significant security blind spots that are often masked by their limited reasoning capabilities. As these models become multimodal and more integrated into edge devices, the need for "safety-aware distillation" and lightweight, on-device defense mechanisms becomes paramount. Future research must ensure that the drive for efficiency does not come at the cost of fundamental AI safety.
Summary updated