Skip to main content

Arc Sentry — prompt injection detection for LLMs. 100% detection, 0% false positives across Mistral 7B, Qwen 2.5 7B, Llama 3.1 8B. Geometric detection via Fisher-Rao manifold (Nine 2026).

Project description

Arc Sentry v3.1.1

Pre-generation prompt injection detection for open source LLMs. Blocks attacks before model.generate() is called.

Benchmark

Metric Result
Detection rate 100%
False positive rate 0%
Session requests 450
Latency 42ms/req
Layer SNR (Mistral 7B) 2.053
FR separation 0.0787

450-request session benchmark on Mistral-7B-Instruct-v0.2. 270 normal requests, 180 injection attempts (dense + subtle roleplay/hypothetical). Zero false positives across all safe blocks.

Also validated: Garak promptinject suite 192/192 blocked, Crescendo flagged Turn 3 (LLM Guard: 0/8).

Install

pip install arc-sentry

Usage

from arc_sentry import ArcSentryV3, MistralAdapter
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

model = AutoModelForCausalLM.from_pretrained(
    "mistralai/Mistral-7B-Instruct-v0.2",
    torch_dtype=torch.float16, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.2")

adapter = MistralAdapter(model, tokenizer)
sentry = ArcSentryV3(adapter, route_id="my-deployment")
sentry.calibrate(warmup_prompts)

response, result = sentry.observe_and_block(user_prompt)
if result["blocked"]:
    pass  # model.generate() was never called

How it works

Three detection layers:

  1. Phrase check — 80+ injection patterns, zero latency
  2. Geometric detection — mean-pooled hidden states at optimal layer, Fisher-Rao distance from calibrated centroid. Catches injections with no explicit language.
  3. Session D(t) monitor — stability scalar over rolling request history. Catches gradual campaigns (Crescendo-style) invisible to single-request detection.

Grounded in the second-order Fisher manifold (H2 x H2, R = -4, tau* = 1.2247). Full theory: bendexgeometry.com/theory

Detection mechanism

1. Mean-pool hidden states at layer L (validated: L=16 on Mistral-7B)
2. L2-normalize: h = h / ||h||
3. Fisher-Rao distance to warmup centroid
4. Distance > threshold -> BLOCK
   model.generate() is never called

Also available

  • Arc Gate — behavioral monitoring proxy for closed model APIs (GPT-4, Claude, Gemini). One URL change. bendexgeometry.com/gate
  • Arc Vigil — training stability monitor. 100% detection, 0% FP, 90% auto-recovery. pip install arc-vigil

Bendex Geometry LLC · Patent Pending · 2026 Hannah Nine bendexgeometry.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arc_sentry-3.1.1.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arc_sentry-3.1.1-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file arc_sentry-3.1.1.tar.gz.

File metadata

  • Download URL: arc_sentry-3.1.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for arc_sentry-3.1.1.tar.gz
Algorithm Hash digest
SHA256 f22df61e9727fb69cebc7b94478625ebc44d12ae1a60eab58821b20fefeb1a3d
MD5 c061775fcd5df882abf4a8a4626337be
BLAKE2b-256 f73e500f8acdc3778d66b03e85558ccf06c148ce93f9b087cd1dad7e228d953a

See more details on using hashes here.

File details

Details for the file arc_sentry-3.1.1-py3-none-any.whl.

File metadata

  • Download URL: arc_sentry-3.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for arc_sentry-3.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a3f65a385a40b73de5474d2e32531b484b19db55a59f99e6b1563083a85df918
MD5 ea35c28bc57627439a6fc37fd2b9bfe3
BLAKE2b-256 e129af6b0a45750673329d8585793537106fe431dc0b308f11c99339b0c05a34

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page