LiteLMGuard: Seamless and Lightweight On-Device Prompt Filtering for Safeguarding Small Language Models against Quantization-induced Risks and Vulnerabilities
On the map: LLM safety and security → Safety alignment, refusal and guardrails
Abstract (arXiv)
The growing adoption of Large Language Models (LLMs) has influenced the development of Small Language Models (SLMs) for on-device deployment across smartphones and edge devices, offering enhanced privacy, reduced latency, server-free functionality, and improved user experience. However, due to on-device resource constraints, SLMs undergo size optimization through compression techniques like quantization, which inadvertently introduce fairness, ethical and privacy risks. Critically, quantized SLMs may respond to harmful queries directly, without requiring adversarial manipulation, raising significant safety and trust concerns. To address this, we propose LiteLMGuard, an on-device guardrail that provides real-time, prompt-level defense for quantized SLMs. Additionally, our guardrail is designed to be model-agnostic such that it can be seamlessly integrated with any SLM, operating independently of underlying architectures. Our LiteLMGuard formalizes deep learning (DL)-based prompt filtering by leveraging semantic understanding to classify prompt answerability for SLMs. Built on our curated Answerable-or-Not dataset, LiteLMGuard employs ELECTRA as the candidate model with 97.75% answerability classification accuracy. The on-device deployment of LiteLMGuard enabled real-time offline filtering with over 85% defense-rate against harmful prompts (including jailbreak attacks), 94% filtering accuracy and ~135 ms average latency. These results demonstrate LiteLMGuard as a lightweight robust defense mechanism for effectively and efficiently securing on-device SLMs against Open Knowledge Attacks.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Safety alignment, refusal and guardrails, one of 12 directions in LLM safety and security. Builds on 34 of its 77 references that are in the map. First posted on arXiv 8 May 2025.
Builds on
34 of 77 references.
References · 34
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,626
- 2020Measuring Massive Multitask Language Understandingcited by 7,963
- 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,371
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
- 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,917
- 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,807
- 2023BloombergGPT: A Large Language Model for Financecited by 939
- 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Modelscited by 651
- 2020MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devicescited by 482
22 more
- 2023Detecting Language Model Attacks with Perplexitycited by 431
- 2024Great, Now Write an Article About That: The Crescendo Multi-Turn LLM Jailbreak Attackcited by 390
- 2023DeepInception: Hypnotize Large Language Model to Be Jailbreakercited by 367
- 2022A Holistic Approach to Undesired Content Detection in the Real Worldcited by 356
- 2023Exploiting Programmatic Behavior of LLMs: Dual-Use Through Standard Security Attackscited by 278
- 2022The case for 4-bit precision: k-bit Inference Scaling Lawscited by 251
- 2024ShieldGemma: Generative AI Content Moderation Based on Gemmacited by 243
- 2024ArtPrompt: ASCII Art-based Jailbreak Attacks against Aligned LLMscited by 216
- 2022Language model compression with weighted low-rank factorizationcited by 195
- 2023RAIN: Your Language Models Can Align Themselves without Finetuningcited by 157
- 2024Llama Guard 3 Vision: Safeguarding Human-AI Image Understanding Conversationscited by 129
- 2024A Comprehensive Survey of Small Language Models in the Era of Large Language Models: Techniques, Enhancements, Applications, Collaboration with LLMs, and Trustworthinesscited by 127
- 2024Making Them Ask and Answer: Jailbreaking Large Language Models in Few Queries via Disguise and Reconstructioncited by 107
- 2022LUT-GEMM: Quantized Matrix Multiplication based on LUTs for Efficient Inference in Large-Scale Generative Language Modelscited by 105
- 2024GradSafe: Detecting Jailbreak Prompts for LLMs via Safety-Critical Gradient Analysiscited by 96
- 2024Defending Large Language Models against Jailbreak Attacks via Semantic Smoothingcited by 74
- 2024Gradient Cuff: Detecting Jailbreak Attacks on Large Language Models by Exploring Refusal Loss Landscapescited by 74
- 2024Exploiting LLM Quantizationcited by 65
- 2024Decoding Compressed Trust: Scrutinizing the Trustworthiness of Efficient LLMs Under Compressioncited by 57
- 2023Fast as CHITA: Neural Network Pruning with Combinatorial Optimizationcited by 40
- 2020Knowledge Distillation in Wide Neural Networks: Risk Bound, Data Efficiency and Imperfect Teachercited by 33
- 2018Concatenated Power Mean Word Embeddings as Universal Cross-Lingual Sentence Representationscited by 20
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2025A Systematic Evaluation of On-Device LLMs: Quantization, Performance, and Resources
- 2025Bypassing Prompt Guards in Production with Controlled-Release Prompting
- 2026Reflex-Guard: A Low-Latency Guardrail for LLM Prompt Safety Using Dense Semantic Embeddings
- 2026Prompt Attack Detection with LLM-as-a-Judge and Mixture-of-Models
- 2024On-Device Language Models: A Comprehensive Review
- 2023A Performance Evaluation of a Quantized Large Language Model on Various Smartphones
- 2024Squat: Quant Small Language Models on the Edge
- 2025A Survey: Towards Privacy and Security in Mobile Large Language Models