Improved Large Language Model Jailbreak Detection via Pretrained Embeddings

Erick Galinkin, Martin Sablotny
12/2/2024
cs.CRcs.AIcs.LG

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

The adoption of large language models (LLMs) in many applications, from customer service chat bots and software development assistants to more capable agentic systems necessitates research into how to secure these systems. Attacks like prompt injection and jailbreaking attempt to elicit responses and actions from these models that are not compliant with the safety, privacy, or content policies of organizations using the model in their application. In order to counter abuse of LLMs for generating potentially harmful replies or taking undesirable actions, LLM owners must apply safeguards during training and integrate additional tools to block the LLM from generating text that abuses the model. Jailbreaking prompts play a vital role in convincing an LLM to generate potentially harmful content, making it important to identify jailbreaking attempts to block any further steps. In this work, we propose a novel approach to detect jailbreak prompts based on pairing text embeddings well-suited for retrieval with traditional machine learning classification algorithms. Our approach outperforms all publicly available methods from open source LLM security applications.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{galinkin2024improved,
  title  = {Improved Large Language Model Jailbreak Detection via Pretrained Embeddings},
  author = {Erick Galinkin and Martin Sablotny},
  year   = {2024},
  eprint = {2412.01547},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.01547v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.01547.svg)](https://codeofpaper.com/paper/2412.01547)

Discussion