pith:HVCG4CD3
Detecting Language Model Attacks with Perplexity
Adversarial jailbreak suffixes produce high perplexity under GPT-2, allowing a classifier on perplexity and length to catch most attacks.
arxiv:2308.14132 v3 · 2023-08-27 · cs.CL · cs.AI · cs.CR · cs.LG
Add to your LaTeX paper
\usepackage{pith}
\pithnumber{HVCG4CD3HCUZZSWBBEQJSTTNJI}
Prints a linked badge after your title and injects PDF metadata. Compiles on arXiv. Learn more · Embed verified badge
Record completeness
Claims
By evaluating the perplexity of queries with adversarial suffixes using an open-source LLM (GPT-2), we found that they have exceedingly high perplexity values. [...] A Light-GBM trained on perplexity and token length resolved the false positives and correctly detected most adversarial attacks in the test set.
That the distribution of regular (non-adversarial) prompts used to measure false positives is representative of real-world usage and that future attackers will not adapt suffixes to also produce low perplexity under GPT-2.
Jailbreak prompts with adversarial suffixes have high GPT-2 perplexity, and a LightGBM model on perplexity and length detects most attacks.
References
Formal links
Cited by
Receipt and verification
| First computed | 2026-05-17T23:38:52.384790Z |
|---|---|
| Builder | pith-number-builder-2026-05-17-v1 |
| Signature | Pith Ed25519
(pith-v1-2026-05) · public key |
| Schema | pith-number/v1.0 |
Canonical hash
3d446e087b38a99ccac10920994e6d4a1c6dbdc4f1862e05219bdd4860492e3b
Aliases
· · · · ·Agent API
Verify this Pith Number yourself
curl -sH 'Accept: application/ld+json' https://pith.science/pith/HVCG4CD3HCUZZSWBBEQJSTTNJI \
| jq -c '.canonical_record' \
| python3 -c "import sys,json,hashlib; b=json.dumps(json.loads(sys.stdin.read()), sort_keys=True, separators=(',',':'), ensure_ascii=False).encode(); print(hashlib.sha256(b).hexdigest())"
# expect: 3d446e087b38a99ccac10920994e6d4a1c6dbdc4f1862e05219bdd4860492e3b
Canonical record JSON
{
"metadata": {
"abstract_canon_sha256": "ec4a9746d99896900950ab9f3086052ada3108e7580cbd70a19fafc096b18af1",
"cross_cats_sorted": [
"cs.AI",
"cs.CR",
"cs.LG"
],
"license": "http://creativecommons.org/licenses/by-nc-sa/4.0/",
"primary_cat": "cs.CL",
"submitted_at": "2023-08-27T15:20:06Z",
"title_canon_sha256": "f4426ad31296763e835ab54ae2f81682dc2297e18b9ace3e38a91745fb9b4ca0"
},
"schema_version": "1.0",
"source": {
"id": "2308.14132",
"kind": "arxiv",
"version": 3
}
}