MoJE: Mixture of Jailbreak Experts, Naive Tabular Classifiers as Guard for Prompt Attacks

Giandomenico Cornacchia, Giulio Zizzo, Kieran Fraser, Muhammad Zaid Hameed, Ambrish Rawat, Mark Purcell

Abstract

MoJE (Mixture of Jailbreak Experts) is a lightweight, modular guardrail system designed to detect Large Language Model (LLM) jailbreak attacks using an ensemble of simple tabular classifiers. By leveraging basic linguistic statistics instead of computationally intensive deep learning models, MoJE achieves superior accuracy and lower latency. It runs efficiently on a single CPU core, making it a practical solution for production-scale LLM safety.

Introduction

As Large Language Models (LLMs) become ubiquitous, "jailbreak" attacks—adversarial prompts designed to bypass safety filters—have become a significant security concern. Current defenses often rely on computationally expensive alignment-based methods or slow LLM-based guardrails. MoJE addresses the need for an accurate, low-latency, and easily updatable defense by focusing on the distinct linguistic "fingerprints" of jailbreak attempts.

Methodology: Mixture of Jailbreak Experts

The core innovation of MoJE is its "divide and conquer" ensemble strategy. The system consists of multiple binary "experts"—simple classifiers like Logistic Regression or XGBoost—each trained to recognize specific types of jailbreak patterns, such as role-playing or adversarial suffixes.

Overview of the MoJE training and inference pipeline.

Feature Extraction and Inference

MoJE utilizes simple n-gram counts (uni-grams and bi-grams) for feature extraction, transforming prompts into tabular data. This approach allows for extremely fast processing on standard hardware. During inference, each expert provides a probability score. If any expert's score exceeds a threshold ($\tau = 0.5$), that maximum score is used for the final verdict. If all experts are uncertain, their scores are averaged to provide a final decision.

Experimental Evaluation

MoJE was benchmarked against a diverse set of datasets, including harmful behaviors, role-playing prompts (Gandalf), and adversarial suffixes (GCG-Vicuna). It was also tested against benign datasets like Puffin and Alpaca to ensure a low false positive rate.

Results and Discussion

MoJE demonstrated exceptional performance, achieving an AUC of 0.9947 and an accuracy of 0.9944, outperforming established baselines like Llama-Guard and the OpenAI Moderation API.

True Positive (TP) rates of MoJE compared to other guardrail models across various jailbreak datasets.

A key strength of MoJE is its modularity. In out-of-distribution testing, the system's True Positive Rate jumped from ~7% to ~94% by simply adding a new expert trained on the specific data, without requiring a full system retrain. This agility is crucial for defending against evolving attack strategies.

Conclusion and Future Work

MoJE proves that simple statistical models can be more effective and efficient than complex LLMs for specific safety tasks. While it excels at pattern recognition, it faces challenges with semantic nuances, such as those found in "trap" prompts that require deep semantic understanding. Future research will explore hybrid architectures that combine MoJE's efficiency with deeper semantic reasoning to handle more complex linguistic reasoning.

Summary updated

BibTeX
@inproceedings{cornacchia2024moje,
  author = {Giandomenico Cornacchia and Giulio Zizzo and Kieran Fraser and Muhammad Zaid Hameed and Ambrish Rawat and Mark Purcell},
  title = {{MoJE: Mixture of Jailbreak Experts, Naive Tabular Classifiers as Guard for Prompt Attacks}},
  booktitle = {AIES},
  year = {2024},
  doi = {10.1609/aies.v7i1.31638},
}
Figure