Reflex-Guard: A Low-Latency Guardrail for LLM Prompt Safety Using Dense Semantic Embeddings

📅 2026-08-18
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
本文提出Reflex-Guard,一种使用密集语义嵌入的本地轻量级防护方法,以低延迟(37.6毫秒)高精度地解决大型语言模型中精心设计的提示绕过安全控制的问题。
📝 Abstract
Large Language Models (LLMs) in real-world applications often face the risks of specially crafted prompts designed to bypass the safety controls. Existing guardrail methods, such as LLM-as-a-judge and cloud-based safety APIs are able to detect unsafe content. However, they often add a delay of about 250-900 ms to each request. This delay is too high for real-time applications, when the system usually needs to respond in less than 100 ms. Furthermore, routing user prompts through external moderation endpoints raises significant data privacy concerns. This paper introduces Reflex-Guard, a lightweight guardrail that runs locally. It uses jailbreak-aware preprocessing, compact sentence-transformer embeddings, and seven fast binary classifiers. Together, these components enable high-accuracy prompt safety filtering with much lower latency than existing solutions. Through systematic evaluation on a strategically balanced dataset of 30,568 samples drawn from five complementary sources, we demonstrate that Reflex-Guard achieves 95.9% recall on harmful prompts at 37.6 ms end-to-end latency. It is faster than existing baselines, including Llama Guard 2 at 255 ms and SafeDecoding at 723 ms. It can detect 100% of GCG suffix attacks and Base64-encoded prompts using the default threshold. However, DrAttack structured prompts required lowering the threshold to 0.03 for optimal detection, as they produced a distinct probability distribution. Reflex-Guard achieves Reflex Efficiency Score (RES) scores up to 16.79, significantly outperforming Llama Guard 2 (11.90) and SafeDecoding (9.80). This analysis offers practical deployment advice and shows that different attack types occupy distinct regions in the embedding probability space.
Problem

Research questions and friction points this paper is trying to address.

Large Language Models
Prompt Safety
Latency
Data Privacy
Guardrail
Innovation

Methods, ideas, or system contributions that make the work stand out.

low-latency
dense semantic embeddings
local execution
jailbreak-aware preprocessing
binary classifiers
🔎 Similar Papers
No similar papers found.
I
Istiaque Ahmed
Graduate School of Informatics, Osaka Metropolitan University, Osaka 558-8585, Japan
A
Afia Anjum Borsha
Dept. of Computer Science and Engineering, BRAC University, Dhaka 1212, Bangladesh
R
Ranat Das Prangon
Dept. of Chemical Engineering, Bangladesh University of Engineering and Technology (BUET), Dhaka 1000, Bangladesh
A
Abu-fuad Ahmad
New Mexico State University, Las Cruces NM 88001, USA
Thi Hong Tran
Thi Hong Tran
Graduate School of Informatics, Osaka Metropolitan University, Osaka 558-8585, Japan