potentialpaper

SelfGrader: Detecting Jailbreak Attacks on Large Language Models with Token-Level Logit Distribution

Zikai Zhang, Rui Hu, Jiahao Xu

ICLR 2026 submission

Edit this page

Or clone it with git

The page gets its repository with its first edit, so start in the web editor.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. Large Language Models (LLMs) are powerful tools for answering user queries, but 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 the randomness in text generation. To overcome these limitations, we propose SelfGrader\textbf{SelfGrader}, a lightweight guardrail method that solves jailbreak detection as a numerical grading problem using token-level logits. SelfGrader prompts the LLM to evaluate an input query with 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 human intuition of maliciousness, SelfGrader introduces a novel in-context prompting strategy and a dual-perspective scoring rule that considers both the maliciousness and benignness of the query, yielding a stable and interpretable score that both reflects harmfulness and reduces the false positive rate. Extensive experiments across diverse jailbreak benchmarks, multiple LLMs, and state-of-the-art guardrail baselines demonstrate that SelfGrader achieves accurate and robust detection while maintaining low computational overhead and latency.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

add · history

No versions are recorded yet: its preprint, the venues it went to and what they decided, the camera-ready. Missing a version?

We don't know of a submission of this paper to a venue with open reviews. Missing a submission?

Loading the discussion…