Abstract
OMNIGUARD is a hyper-efficient safety moderation framework designed to detect harmful prompts across dozens of languages and multiple modalities, including text, image, and audio. By leveraging a model’s internal "universal" representations, OMNIGUARD repurposes embeddings computed during the standard generation process. This approach achieves state-of-the-art accuracy while operating up to 120x faster than existing baseline guardrails, requiring significantly less training data than traditional methods.
Introduction
As Large Language Models (LLMs) and Multimodal LLMs (MLLMs) advance, ensuring their safety becomes increasingly complex. A primary challenge is mismatched generalization: models often exhibit safety in high-resource languages like English but remain vulnerable to "jailbreaks" when prompts are translated into low-resource languages, encoded in ciphers (e.g., Base64), or embedded within non-textual modalities like images or audio.
Traditional solutions typically rely on external "guard" models. However, these are often computationally expensive, slow, and struggle to generalize across diverse inputs because they lack exposure to varied safety data during their own training.
Methodology: The OMNIGUARD Framework
OMNIGUARD introduces a two-step process to achieve efficient, cross-modal safety moderation:
1. Identifying Universal Layers
The researchers observed that specific internal layers within LLMs develop representations that are agnostic to language or modality. To identify these, they developed the Universality Score (U-Score). This metric quantifies the semantic alignment between identical concepts presented in different formats (e.g., an English sentence vs. its French translation) compared to random pairs. High U-Scores indicate layers where the model processes core meaning rather than surface-level syntax.
2. Lightweight Classification
Once the optimal "semantic hub" layers are identified (usually in the middle or late-middle of the network), OMNIGUARD extracts these embeddings. A compact, 2-layer Multilayer Perceptron (MLP) is then trained to classify the input as "Safe" or "Unsafe." Because the base LLM already generates these embeddings during inference, OMNIGUARD adds negligible overhead.
Experimental Setup
The framework was evaluated using a diverse set of benchmarks:
- Multilingual/General: Flores200 (53 languages) and 20 cipher formats (e.g., Hexadecimal, Caesar shifts).
- Safety Training: The Aegis AI Content Safety dataset, using only 2,800 examples—roughly 18x less than typical baselines.
- Evaluation Benchmarks: Text attacks (MultiJail, AdvBench), vision attacks (JailBreakV-28K, Hades), and audio benchmarks (VoiceBench).
Key Results and Insights
OMNIGUARD demonstrates significant improvements over existing state-of-the-art (SOTA) methods:
- Enhanced Accuracy: Detection improved by 11.57% in multilingual contexts and 20.44% for image-based prompts.
- Efficiency: The system is approximately 120x faster than DuoGuard, processing inputs in milliseconds (0.04s) compared to seconds for other guards.
- Cross-Modal Alignment: The U-Score logic successfully aligns different modalities. For instance, the model naturally associates a visual image of a hazardous object with its textual description in specific internal layers.
- Cipher Robustness: OMNIGUARD remains effective against obfuscation techniques like LeetSpeak or Base64 that typically bypass standard filters.
Discussion and Future Work
The success of OMNIGUARD highlights the "Semantic Hub" hypothesis: LLM middle layers converge on core meaning ("the what") rather than syntax ("the how"). However, the framework currently requires access to internal model layers, limiting its use with closed-source "black box" APIs. Future research may focus on real-time output monitoring to prevent the generation of harmful content in addition to filtering user inputs.
Summary updated