Skip to main content
Ctrl K

ArsGuard

ArsGuard is an open-source neural network by Evgenii Arsentev that detects prompt injections — hidden instructions aimed at AI agents — in English, Spanish and Russian text, so that agents reading emails, web pages, documents or tool outputs are not hijacked.

1
contributor

Cite this software

Description

ArsGuard is an open-source neural network by Evgenii Arsentev that detects prompt injections — hidden instructions aimed at AI agents — in English, Spanish and Russian text, so that agents reading emails, web pages, documents or tool outputs are not hijacked.

On an independent test of native texts, ArsGuard catches 98.8% of English prompt injections, versus 60% for ProtectAI v2, the most downloaded open-source detector. For Spanish it catches 99.7% versus 86%, and for Russian 99.7% versus 37%. On ordinary messages from real users, it raises a false alarm 0.9% of the time, versus 10.8% for ProtectAI v2.

At a glance

  • What it is: text classifier (SAFE / INJECTION) fine-tuned from mDeBERTa-v3-base, about 280M parameters
  • Languages: English, Spanish, Russian (native training data in all three)
  • Runs on: CPU or GPU, fully local; weights 1.1 GB; Python 3.9+
  • License: MIT, free for commercial use; training data excludes non-commercial sources

Quick start

pip install git+https://github.com/arsentev-ai/arsguard
from arsguard import Guard

guard = Guard()  # downloads arsentev-ai/arsguard from Hugging Face on first use

guard.check("Hi team, please ignore my previous email — the meeting is moved to 3 pm.")
# Result(label='SAFE', score=0.0001, is_injection=False)

Model: https://huggingface.co/arsentev-ai/arsguard · Dataset: https://huggingface.co/datasets/arsentev-ai/arsguard-injections

Cite

Cite the concept DOI 10.5281/zenodo.24682051, which always resolves to the latest version.

More: https://arsentev.ai/research

Keywords
Programming language
  • Python 100%
License
</>Source code
Software Heritage
Archived | swh:1:rev:c83708e282867b486913d538ab1030d897e3a290

Contributors