Sentinel: SOTA-model om promptinjecties te voorkomen
Sentinel: SOTA model to protect against prompt injections
June 5, 2025
Auteurs: Dror Ivry, Oran Nahum
cs.AI
Samenvatting
Grote Taalmodellen (LLMs) worden steeds krachtiger, maar blijven kwetsbaar voor prompt injection-aanvallen, waarbij kwaadaardige invoer het model doet afwijken van de beoogde instructies. Dit artikel introduceert Sentinel, een nieuw detectiemodel, qualifire/prompt-injection-sentinel, gebaseerd op de \answerdotai/ModernBERT-large-architectuur. Door gebruik te maken van de geavanceerde functies van ModernBERT en afstemming op een uitgebreide en diverse dataset die enkele open-source en privécollecties omvat, bereikt Sentinel state-of-the-art prestaties. Deze dataset combineert verschillende aanvalstypen, van role-playing en instructiekaping tot pogingen om bevooroordeelde inhoud te genereren, naast een breed scala aan goedaardige instructies, waarbij privé-datasets specifiek gericht zijn op genuanceerde foutcorrectie en real-world misclassificaties. Op een uitgebreide, onbekende interne testset toont Sentinel een gemiddelde nauwkeurigheid van 0,987 en een F1-score van 0,980. Bovendien presteert het bij evaluatie op openbare benchmarks consistent beter dan sterke baselines zoals protectai/deberta-v3-base-prompt-injection-v2. Dit werk beschrijft gedetailleerd de architectuur van Sentinel, de zorgvuldige curatie van de dataset, de trainingsmethodologie en een grondige evaluatie, waarbij de superieure detectiecapaciteiten worden benadrukt.
English
Large Language Models (LLMs) are increasingly powerful but remain vulnerable
to prompt injection attacks, where malicious inputs cause the model to deviate
from its intended instructions. This paper introduces Sentinel, a novel
detection model, qualifire/prompt-injection-sentinel, based on the
\answerdotai/ModernBERT-large architecture. By leveraging ModernBERT's advanced
features and fine-tuning on an extensive and diverse dataset comprising a few
open-source and private collections, Sentinel achieves state-of-the-art
performance. This dataset amalgamates varied attack types, from role-playing
and instruction hijacking to attempts to generate biased content, alongside a
broad spectrum of benign instructions, with private datasets specifically
targeting nuanced error correction and real-world misclassifications. On a
comprehensive, unseen internal test set, Sentinel demonstrates an average
accuracy of 0.987 and an F1-score of 0.980. Furthermore, when evaluated on
public benchmarks, it consistently outperforms strong baselines like
protectai/deberta-v3-base-prompt-injection-v2. This work details Sentinel's
architecture, its meticulous dataset curation, its training methodology, and a
thorough evaluation, highlighting its superior detection capabilities.