SelfGrader: LLM Jailbreak Detection via Anchored Token-Level Logits
On the map: LLM safety and security → Jailbreaking
Abstract (arXiv)
Large Language Models (LLMs) are powerful tools for answering user queries, yet they remain highly vulnerable to jailbreak attacks. Existing guardrail methods typically rely on internal features or textual responses to detect malicious queries, which either introduce substantial latency or suffer from randomness in text generation. To overcome these limitations, we propose SelfGrader, a lightweight guardrail method that formulates jailbreak detection as a numerical grading problem using anchored token-level logits. Specifically, SelfGrader evaluates the safety of a user query within a compact set of numerical tokens (NTs) (e.g., 0-9) and interprets their logit distribution as an internal safety signal. To align these signals with the target safety rubric, SelfGrader constructs Probably Approximately Correct-guided ICL anchor examples and introduces a dual-perspective scoring rule that considers both the maliciousness and benignness of the query, yielding a stable and interpretable score that reflects harmfulness and reduces the false positive rate simultaneously. Extensive experiments across diverse jailbreak benchmarks, adaptive attacks, benign prompt benchmarks, multiple LLMs, and state-of-the-art guardrail baselines demonstrate that SelfGrader achieves strong robustness with low false positive rates, memory overhead, and latency.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Jailbreaking, one of 12 directions in LLM safety and security. Builds on 29 of its 41 references that are in the map. First posted on arXiv 1 Apr 2026.
Builds on
29 of 41 references.
Closest ancestors · 12
Same direction, newest first
- 2025X-Teaming: Multi-Turn Jailbreaks and Defenses with Adaptive Multi-Agents15 Apr
- 2024Emoji Attack: Enhancing Jailbreak Attacks Against Judge LLM Detection1 Nov
- 2024SelfDefend: LLMs Can Defend Themselves against Jailbreaking in a Practical Manner8 Jun
- 2024Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attacks2 Apr
- 2024Gradient Cuff: Detecting Jailbreak Attacks on Large Language Models by Exploring Refusal Loss Landscapes1 Mar
- 2024DrAttack: Prompt Decomposition and Reconstruction Makes Powerful LLM Jailbreakers25 Feb
- 2024GradSafe: Detecting Jailbreak Prompts for LLMs via Safety-Critical Gradient Analysis21 Feb
- 2023Tree of Attacks: Jailbreaking Black-Box LLMs Automatically4 Dec
- 2023Jailbreaking Black Box Large Language Models in Twenty Queries12 Oct
- 2023Low-Resource Languages Jailbreak GPT-43 Oct
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Models27 Jul
- 2023Jailbroken: How Does LLM Safety Training Fail?5 Jul
Other references · 17
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,339
- 2020What Disease does this Patient Have? A Large-scale Open Domain Question Answering Dataset from Medical Examscited by 1,324
- 2019PubMedQA: A Dataset for Biomedical Research Question Answeringcited by 1,271
- 2023BeaverTails: Towards Improved Safety Alignment of LLM via a Human-Preference Datasetcited by 828
- 2023Safe RLHF: Safe Reinforcement Learning from Human Feedbackcited by 630
- 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Modelscited by 608
- 2025Scalable Best-of-N Selection for Large Language Models via Self-Certaintycited by 182
- 2023LLM Lies: Hallucinations are not Bugs, but Features as Adversarial Examplescited by 177
- 2023Backdooring Instruction-Tuned Large Language Models with Virtual Prompt Injectioncited by 143
- 2024Watch Out for Your Agents! Investigating Backdoor Threats to LLM-Based Agentscited by 135
- 2023The Learnability of In-Context Learningcited by 126
- 2025GuardReasoner: Towards Reasoning-based LLM Safeguardscited by 89
5 more
- 2024LLMs know their vulnerabilities: Uncover Safety Gaps through Natural Distribution Shiftscited by 80
- 2025Virus: Harmful Fine-tuning Attack for Large Language Models Bypassing Guardrail Moderationcited by 28
- 2025Simple Prompt Injection Attacks Can Leak Personal Data Observed by LLM Agents During Task Executioncited by 25
- 2023Detecting Misuse of Security APIs: A Systematic Reviewcited by 4
- 2025QGuard:Question-based Zero-shot Guard for Multi-modal LLM Safetycited by 4
Built on by
Not cited yet.