Manuscript Offprint
arXiv:2610.16814StableJudge: A Lightweight Adversarial Defense Framework for LLM-as-a-Judge
Abstract
Large language models (LLMs) are increasingly used as judges to assign scalar scores that drive downstream decision-making, including tasks such as paper review and recommendation. However, LLM-as-a-Judge pipelines are vulnerable to score-hijacking prompt injection embedded in evaluated content, which corrupts scoring signals and distorts induced rankings. Existing defenses often enforce robustness by modifying the judge model itself, making safety dependent on a specific model's scale and training and requiring repeated effort when the judge is updated or replaced. We propose StableJudge, a lightweight defense framework that externalizes prompt-injection mitigation as a reusable pre-scoring capability. StableJudge centers on a compact 0.13B Sentry that localizes injected spans and performs targeted sanitization prior to evaluation, and is trained using adversarially evolving attacks to improve robustness beyond a fixed prompt set. To stabilize measurement, StableJudge derives deterministic, fine-grained scalar scores from the judge's output distribution. Across held-out scientific abstracts and out-of-distribution attack variants, StableJudge improves score recovery under attack while largely preserving general-purpose performance, demonstrating that robust LLM-based judging can be achieved by decoupling safety from judge scale via reusable defense capabilities. Code and data will be released.
1 Introduction
Large language models (LLMs) are increasingly deployed as judges that assign scores for academic screening, recommendation, and automated evaluation (Zhuang et al., 2025; Zheng et al., 2023; Liu et al., 2023a; Dubois et al., 2024). Because downstream rankings are often induced by sorting these scores, scoring integrity is central to system reliability under untrusted inputs. Our motivation comes from an LLM-based paper-search system, where retrieved papers become inputs to a scoring stage: the content being evaluated is also an entry point for instructions that target the evaluator.
However, LLM-as-a-Judge pipelines are vulnerable to prompt injection: adversarial instructions embedded in evaluated content that aim to override the judge’s intended protocol (Perez and Ribeiro, 2022; Greshake et al., 2023). We focus on score-hijacking injections, where short directives coerce inflated scores and corrupt the scoring signal before ranking or downstream decisions.
Existing mitigations include secure prompting, fine-tuning, preference optimization, and guardrails (Suri and McCrae, 2025; Xu and Parhi, 2025). When defense is tied to a judge’s weights or behavior, changing the backend entails renewed adaptation or validation (Liu et al., 2023b; Tan et al., 2026; Wee et al., 2025). We propose StableJudge, which externalizes prompt-injection mitigation as a compact callable capability. The central design choice is to remove adversarial instructions while retaining the evidence for evaluation, so that a trained defense can be reused when the judge changes.
StableJudge follows a simple protocol: sanitize before scoring. Its 0.13B Sentry localizes injected spans and produces minimally modified text, which the judge evaluates using a continuous logit-based score readout. Sentry is trained through mutual red–blue evolution: detector feedback guides attack generation, and the resulting effective attacks improve the detector. After training, the same frozen Sentry is reused across judge backends.
The main contributions of this work are as follows:
- We externalize score-hijacking defense as a reusable pre-scoring tool. A fixed-input eval-
Corresponding author: yanjunchi@sjtu.edu.cn.

Figure 1: Overview of StableJudge for LLM-as-a-Judge. (A) Illustrative score-hijacking example. (B) Mutual red–blue training: localization misses guide new attacks, and effective attacks train Sentry. (C) Deployment: the same frozen Sentry sanitizes inputs across judge backends, aiming to recover each unchanged judge’s clean-input score.
uation across three judge backends tests score recovery with the same frozen Sentry and sanitized texts.
-
We introduce the StableJudge Sentry, a compact (0.13B) tagger–verifier that localizes and sanitizes injected instructions, with bounded-window scanning for long documents.
-
We develop mutual red–blue evolution through miss-guided attack generation and score-impact filtering, and evaluate the resulting defense on held-out attacks and an independent attack source.
Prompt injection. Prompt injection attacks embed malicious directives in natural language inputs or context so that models follow attacker instructions instead of the intended protocol (Perez and Ribeiro, 2022; Zou et al., 2023). Indirect prompt injection extends this threat to LLM-integrated applications, where adversarial instructions may be planted in external resources processed at inference time (Greshake et al., 2023; Keuper, 2025). Recent evaluations and benchmarks systematize attack/defense protocols and quantify robustness across tasks and models (Liu et al., 2023b; De Stefano et al., 2024; Zhan et al., 2024; Nasr et al., 2025).
Defenses. Defenses range from training models to respect instruction priority (instruction hierarchy) (Wallace et al., 2024) to deploying external guard models such as Llama Guard (Inan et al., 2023). Guardrails must also address over-defense, where benign inputs are falsely flagged due to trigger-word bias (Li and Liu, 2024). LLAMOS uses a prompted defense agent to purify adversarial text before it reaches the target LLM and studies attack-defense interaction (Lin et al., 2024). StableJudge instead trains a compact tagger-verifier for targeted span sanitization and evaluates whether the same frozen defense recovers clean-input scores across judge backends. Adversarial generation supplies task-specific supervision (Madry et al., 2018; Radharapu et al., 2023; Perez et al., 2022); the external tool inter-face supports reuse without retraining each back-end (Schick et al., 2023; Yao et al., 2023; Karpas et al., 2022).
3 Method
3.1 Problem Setup and Objective
Let denote clean evaluated content (an abstract in the primary scoring task), and let be the score assigned by a given judge under a fixed protocol (Section 3.6). In this work we focus on scoring: attack-induced score shifts and defense-induced score recovery.
Score-hijacking prompt injection. An attacker injects a short payload p, a text span intended to redirect the judge’s scoring, into the evaluated content:
The goal is to coerce an inflated score, i.e., .
Score recovery objective. StableJudge introduces a pre-evaluation defense that sanitizes into , with the objective of recovering the same judge's clean score. We define the attack shift and recovery residual as
and
Our primary objective is to minimize on effective attacks while preserving non-injected content. The judge, scoring prompt, and readout are held fixed within each clean/attacked/defended comparison.
Score-noise calibration. To separate genuine manipulation from intrinsic judge noise, we calibrate a score variability scale by repeated scoring on clean inputs and set a conservative tolerance using the rule (Pukelsheim, 1994). For a given attacked example , we treat the attack as effective if , and the defense as successful if .
Continuous residuals complement thresholded success by quantifying the magnitude of score recovery.
3.2 StableJudge Overview
StableJudge externalizes defense into a reusable pre-scoring module without modifying the judge (Figure 1). The Sentry localizes injected spans in and produces a minimally modified text , which the judge scores through a fixed readout (Section 3.6).
3.3 StableJudge Sentry: Localize and Sanitize
The StableJudge Sentry pairs two compact DistilBERT encoders (Sanh et al., 2019), a tagger and a verifier, totaling approximately 0.13B parameters. Bidirectional token representations suit localization, while the compact encoders keep the pre-scoring module lightweight. We first describe one inspected string ; for a single-window abstract, and . Long inputs use the same procedure on selected windows. Injected directives coexist with the evidence the judge must assess, so rejecting an entire input would discard useful content. As illustrated in Figure 2, a high-recall tagger localizes suspect tokens, and a precision-oriented verifier checks candidate spans before removal. This decomposition makes fine-grained sanitization reusable across judges.
3.3.1 Token-Level Localizer (Tagger)
The tagger performs token classification to localize injected spans. Let be tokenized into . Each token has a label , with prediction . Here denotes a non-injection token, marks the beginning of an injected span, and marks subsequent tokens inside the same span.
We use a compact bidirectional encoder to obtain contextual token embeddings . We fuse a lightweight pattern feature vector as auxiliary input to these contextual representations. Let be a feature embedding shared across tokens, and . We compute token logits and predictions by a linear head, where , is the logit for class , and , are learnable parameters:
The auxiliary vector contains three lightweight scalars: (i) Style consistency measures abrupt stylistic shifts by comparing sentence embeddings; we compute the minimum co-
(a) Region selection
(b) Token-level tagger
(c) Verification & sanitization

Figure 2: StableJudge Sentry. The tagger fuses semantic and pattern features to predict O/B/I labels; only candidate spans with verifier probability are sanitized. Selected windows and character-offset mapping extend the same pipeline to long inputs.
sine similarity between the first sentence and the remaining sentences. (ii) Instruction density measures how instruction-like the text is via an imperative-verb ratio over sentences. (iii) Keyword frequency measures the density of a fixed set of injection-related keywords normalized by text length. These are soft contextual features, not deletion rules: instruction-dense text is removed only if the tagger proposes a span and the verifier accepts it.
3.3.2 Span Verification and Sanitization
We convert the token-level tag sequence into candidate injected spans by grouping consecutive tokens predicted as or into contiguous segments. To map token segments back to the raw text, we use tokenizer-provided offset mappings , where are the start/end character indices of token in the original text . For a candidate span covering a contiguous token index set , we set and . Each candidate span is thus represented as a character interval in .
We then apply a DistilBERT binary verifier to each candidate span to suppress false positives. It is trained on injected spans as positives and clean sentences as negatives. Let be its injected-class softmax probability given the candidate span's text. With a fixed , we retain a span only if :
After merging overlapping intervals, a minimal edit operation replaces each accepted span with a fixed placeholder (a redaction marker), leaving text outside these intervals unchanged:
The verifier selects among tagger proposals.
Long-context coverage via radar-guided scanning. To inspect long inputs beyond a single truncated prefix, we scan bounded head and tail regions, plus radar-guided interior windows around suspicious cues. Each selected window uses the same tagger–verifier; predicted offsets are mapped back to the original document before sanitization. This concentrates computation on selected regions while retaining unedited context (Figure 2).
3.4 Red-Blue Adversarial Evolution Training
StableJudge couples attack evolution with defense learning: Sentry’s localization misses guide the next red-team search, and effective attacks supervise the next blue-team update (Algorithm 1). The red side evolves its attack population and search strategy; the blue side updates the tagger and verifier, with parameters and . These two feedback directions form the mutual evolution loop.
We initialize , a deterministic report of attack categories and representative payloads. At round , report conditions category-preserving mutation and open-ended creation, producing candidates . After the blue update, FailureReport groups payloads for which the current tagger finds no injected span into . When no complete misses remain, it requests new categories. Thus feedback directs where to search, while score-impact filtering determines which attacks enter the pool. We retain an effective subset using the score-shift criterion in Equation (9), estimated on a training-side calibration subset , and update the structured pool via

(a) Mutual red-blue evolution
(b) Evolved attack examples
Figure 3: Mutual red–blue evolution. (a) Score-impact filtering selects effective attacks to train the tagger and verifier; the updated tagger’s miss report guides the next generation round. (b) Examples of evolved prompt-injection payloads.
where Organize( ) normalizes payload strings, removes duplicates, and maintains category labels.
On the blue side, we assemble attacked examples by injecting payloads into clean texts with diverse surface realizations, extract pattern features, and train the tagger and verifier on the resulting supervision. Dataset splits use paper IDs rather than individual injected variants; SplitByID preserves those assignments across rounds.
Effectiveness filtering. The red team retains a payload when its expected score shift over the clean abstract corpus exceeds the calibrated tolerance:
where C is a clean abstract corpus. In practice, Filter estimates this corpus-level expectation by the sample mean over a small calibration subset . This selects score-changing attacks in line with the score-hijacking objective.
3.5 Tool-Augmented Scoring Pipeline
The scoring protocol invokes Sentry before every judge call: the judge receives only sanitized text . After red–blue training, Sentry is frozen and reused across backends; only the judge’s scoring interface changes.
3.6 Deterministic Logit-Based Scoring
To stabilize scoring and improve score resolution, we compute the expected score from the judge's distribution over score labels. The prompt ends
Algorithm 1 Red–blue adversarial evolution training
Require: clean corpus C; seed payload pool ; initial tagger/verifier parameters ; tolerance ; rounds K
Ensure: trained Sentry parameters and payload pool
1:
2: fix paper-ID partitions; choose V from training IDs in C
3: for iteration to K do
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14: end for
at a fixed Final Score: suffix; score labels are evaluated at this slot, not extracted from free-form reasoning. Thinking is disabled for endpoint scoring.
Let and let be the log-probability of the complete label for score , summing conditional token log-probabilities when the label spans multiple tokens (e.g., “10”). Access to these label probabilities is required. We normalize over the allowed labels and take their expectation:
For single-token labels, this is equivalent to nor-
| Model | Params | Seen Attacks | Unseen (Evolved) Attacks | Clean FPR ↓ | ||
|---|---|---|---|---|---|---|
| Char IoU ↑ | Damage ↓ | Char IoU ↑ | Damage ↓ | |||
| Gemini-3-Flash | API | 96.96% | 12.75% | 97.81% | 13.75% | 0.00% |
| GPT-5.2 | API | 98.11% | 15.25% | 98.63% | 15.50% | 0.00% |
| Claude-4.6-Sonnet | API | 73.43% | 10.50% | 68.65% | 10.25% | 0.00% |
| Doubao-Seed-1.6 | API | 92.68% | 10.75% | 95.93% | 13.00% | 0.00% |
| Qwen3-0.6B (thinking) | 0.6B | 6.09% | 2.75% | 5.85% | 1.75% | 6.18% |
| Qwen3-1.7B (thinking) | 1.7B | 4.51% | 0.00% | 6.59% | 0.00% | 0.00% |
| Qwen3-4B (thinking) | 4B | 56.07% | 2.75% | 60.50% | 2.50% | 0.00% |
| Qwen3-8B (thinking) | 8B | 67.35% | 8.00% | 66.60% | 10.50% | 0.27% |
| Qwen3-14B (thinking) | 14B | 71.32% | 4.00% | 72.45% | 4.25% | 0.00% |
| Qwen3-30B | 30B | 78.03% | 10.00% | 81.37% | 10.00% | 0.00% |
| Qwen3-32B (thinking) | 32B | 74.99% | 6.00% | 81.81% | 6.75% | 0.00% |
| Qwen3-235B-A22B (thinking) | 235B | 83.25% | 5.25% | 85.43% | 5.00% | 0.00% |
| Keyword Rules | rules | 7.20% | 0.25% | 7.17% | 0.00% | 0.27% |
| StableJudge Sentry (Tagger-only) | ~0.07B | 98.48% | 3.25% | 99.18% | 2.50% | 0.27% |
| StableJudge Sentry (Tagger+Verifier) | 0.13B | 99.21% | 1.50% | 99.97% | 0.50% | 0.00% |
Table 1: Prompt injection detection and localization on seen and unseen (evolved, held-out) attack distributions. We report mean character-level span IoU ( ) between predicted removal spans and gold injected spans, attack-split damage rate ( ), and clean false-positive rate (FPR, ).
| Round | Attack Removal | |||
|---|---|---|---|---|
| Perfect | Detected ↑ | Missed ↓ | Damage ↓ | |
| Round 0 | 0.00% | 1.00% | 99.00% | 58.50% |
| Round 1 | 98.25% | 99.50% | 0.50% | 8.50% |
| Round 2 | 98.00% | 99.50% | 0.50% | 2.25% |
| Round 3 | 99.25% | 99.50% | 0.50% | 2.25% |
| Round 4 | 99.50% | 99.50% | 0.50% | 1.00% |
| Round 5 | 99.50% | 99.50% | 0.50% | 2.00% |
Table 2: Evolution of Sentry performance across red-blue adversarial training rounds.
| System | Seen Attacks | Unseen Attacks | ||
|---|---|---|---|---|
| Recall ↑ | Integrity ↑ | Recall ↑ | Integrity ↑ | |
| Tagger | 97.75% | 99.73% | 99.50% | 99.73% |
| Sentry | 96.50% | 100.00% | 100.00% | 100.00% |
Table 3: Sentry pipeline ablation: tagger-only versus full localization and verification.
malizing their logits. The expectation provides finer-grained scores than greedy integer decoding, distinguishing inputs that receive the same integer score. Unless otherwise noted, we use as the scalar score throughout the paper and omit the hat for simplicity.
4 Experiments
4.1 Experimental Setup
Task, data, and threat model. We study an LLM-as-a-Judge pipeline that assigns scalar scores to abstract-only inputs drawn from a real-world submission–review corpus. For primary- judge adaptation, a teacher model rewrites full-paper reviews into abstract-conditioned versions, removing references to unavailable content while preserving stance and score. Our threat model is score-hijacking prompt injection: short instruction-like spans embedded in the evaluated text to coerce inflated scores. We split the corpus by paper ID into train/validation/test partitions, keeping all injected variants of a paper in the same partition. The defense objective is to recover each judge's own clean-input score; agreement with human scores separately evaluates the scoring readout.
Attacks, models, and metrics. We inject payloads into clean abstracts and distinguish seen attacks (held-out variants of families exposed during evolution) from unseen attacks (evolved payloads excluded from detector training). Unless stated otherwise, results use the unseen test set and the fixed tolerance in Eq. (4). Our defense is the StableJudge Sentry (0.13B) deployed as a pre-scoring tool, compared against large LLM-based detectors. The primary judge is our abstract-scoring-adapted Qwen3-8B; additional Qwen2.5-7B-Instruct and Llama-3.1-8B-Instruct backends are evaluated without Sentry-specific judge training. The detection benchmark contains 400 seen attacks, 400 unseen attacks, and 372 clean controls. For Table 2, all round checkpoints use the same fixed unseen test set. Character-level span IoU and text damage measure localization; paired score residuals measure end-to-end recovery; Pearson r and Kendall compare scoring readouts.
Semantic Shift of Evolved Attacks

(a) Payload embeddings across evolution rounds (t-SNE; van der Maaten and Hinton, 2008).
Score Recovery Under Prompt Injection

(b) Score distributions before attack, under attack, and after StableJudge defense.
Figure 4: Adversarial evolution and score recovery. Left: a qualitative projection of payload formulations across rounds. Right: the primary Qwen3-8B judge's clean, attacked, and defended scores on the same 298 effective attacks; residuals quantify recovery toward its clean-input scores.
| Judge | Attacked MAD | Defended MAD |
|---|---|---|
| Qwen3-8B (adapted) | 1.040 | 0.422 |
| Qwen2.5-7B-Instruct | 0.880 | 0.055 |
| Llama-3.1-8B-Instruct | 0.390 | 0.131 |
Table 4: Score recovery on 400 fixed unseen inputs, with the same Sentry and sanitized texts. Mean absolute deviation (MAD) is relative to each judge's clean score ( ).
Backend transfer holds the 400 attack inputs and Sentry outputs fixed. Appendix A provides detailed protocols and training settings.
4.2 Prompt Injection Detection
We compare Sentry with LLM-based detectors that identify injections and propose removal spans, measuring character-level IoU against gold spans and original-text damage.
Table 1 shows precise localization with the 0.13B Sentry: character IoU reaches on seen/unseen attacks, with damage and no observed clean false positives. These results support the tagger–verifier decomposition for removing localized instructions while retaining scoring evidence. Sentry outperforms the large LLM-based detectors in span overlap, supporting specialized token-level localization for precise sanitization with low damage to surrounding text. With Sentry frozen, a carrier-domain test on 805 clean AlpacaEval outputs and 200 injected outputs obtains mean payload-token removal and clean false positives (Appendix A.5), extending localization beyond scientific writing.
| Method | Pearson (r) ↑ | Kendall (τ) ↑ |
|---|---|---|
| Greedy (Integer) | 0.0213 | 0.0146 |
| Logits (Expected) | 0.2026 | 0.1052 |
Table 5: Agreement with human scores using two readouts of the same trained judge.
Cue-triggered full-paper localization. On 30 full papers (20–59 pages), we test 30 held-out payloads matching the scanner's fixed cue set. Head/middle/tail injections yield 90 attacked inputs, 30 per position. Table 7 shows 98.89% detection with 3.03 scanned regions per paper. Middle-position detection reaches 96.67%, supporting localization beyond document boundaries through cue-triggered windows. None of the 30 clean controls is edited. Appendix A.6 gives the window configuration and protocol.
4.3 Red-Blue Adversarial Training
Starting from seed attacks, the red team generates variants guided by detector feedback, while the blue team learns from the expanded effective-attack pool.
Figure 3(b) illustrates direct attacks, persona mimicry, and strategic ghost payloads. Figure 4a visualizes their embeddings across evolution rounds, with points colored by round to show changes in attack formulations.
Evolution rounds and Sentry ablation. Table 2 tracks Sentry performance across red–blue train-
| Dimension | Dataset | Metric | Qwen3-8B (Base) | StableJudge (Ours) | Δ |
|---|---|---|---|---|---|
| Knowledge | GPQA (Diamond) | Accuracy ↑ | 28.79% | 28.79% | 0.00% |
| Reasoning | GSM8K (5-shot) | Exact Match ↑ | 88.25% | 86.81% | -1.44% |
| Instruction | IFEval | Inst. Strict Acc ↑ | 48.32% | 49.04% | +0.72% |
| Instruction | IFEval | Prompt Strict Acc ↑ | 33.64% | 35.12% | +1.48% |
| General | MMLU Average | Accuracy ↑ | 74.72% | 74.98% | +0.26% |
| STEM | MMLU-STEM | Accuracy ↑ | 75.48% | 76.40% | +0.92% |
| Social Science | MMLU-Soc. Sci | Accuracy ↑ | 83.95% | 84.30% | +0.35% |
| Humanities | MMLU-Humanities | Accuracy ↑ | 65.65% | 65.57% | -0.08% |
| Other | MMLU-Other | Accuracy ↑ | 78.53% | 78.53% | 0.00% |
Table 6: General capability retention of the StableJudge scoring agent relative to base Qwen3-8B across knowledge, reasoning, and instruction-following benchmarks.
| Payload selection | All | Head | Middle | Tail | Char. coverage | Mean scans |
|---|---|---|---|---|---|---|
| Cue-matched | 98.89% | 100.00% | 96.67% | 100.00% | 98.17% | 3.03 |
Table 7: Full-paper localization with cue-matched payloads. All/Head/Middle/Tail report detection rates; character coverage is mean gold-span recall. Mean scans counts inspected regions per attacked paper.
ing rounds. For Table 2, Perfect Removal denotes at least 95% of injected content removed, Detected Removal denotes at least 10% removed, and Missed denotes less than 10% removed.
Table 3 compares tagger-only inference with full Sentry, including region scanning and span verification. Recall measures attacks with at least 95% removal; Integrity measures zero-edit inputs among the same 372 clean controls in both column groups. The full pipeline retains high attack-removal recall while leaving all clean controls unchanged, supporting targeted sanitization that preserves benign content. Appendix A.7 gives threshold and encoder controls.
Independent attacker. Llama-3.1-8B-Instruct generates attacks without access to Sentry predictions or defended scores; 50 attacks screened as effective against Qwen2.5-7B-Instruct form a frozen evaluation set. Sentry brings 43/50 defended scores within ε of their clean counterparts, while editing 0/50 matched clean inputs. This tests transfer to an attack source outside red–blue training (Appendix A.4).
4.4 Score Recovery and Scoring Readout
Frozen-Sentry backend transfer. With attacked inputs and sanitized texts fixed, frozen Sentry reduces mean absolute deviation from clean scores on all three backends (Table 4). Appendix A.3 gives per-backend effective-subset and thresholded results.
Primary-judge score recovery. Figure 4b compares clean, attacked, and defended scores on the primary judge's 298 effective attacks. Defense reduces mean absolute deviation from 1.10 to 0.36, with 69.5% of defended scores within ε. Mean scores are 7.82 (clean), 8.92 (attacked), and 7.47 (defended), with a mean signed residual of −0.35.
Scoring readout. With the judge and abstract inputs fixed, logit-based scoring improves Pearson r from 0.0213 to 0.2026 and Kendall τ from 0.0146 to 0.1052 against human paper-level scores (Table 5), demonstrating improved agreement through the readout alone.
4.5 General Capability
Table 6 compares base Qwen3-8B with the aligned StableJudge scoring agent equipped with Sentry. General capabilities are largely retained: GPQA is unchanged, MMLU rises by 0.26 percentage points, and GSM8K falls by 1.44 points.
5 Conclusion
StableJudge separates defense from judge choice through a compact, reusable Sentry. Span localization and verification preserve scoring evidence; mutual red–blue evolution improves attack coverage; a logit-based readout refines score resolution. Backend transfer, independent-attacker recovery, and cross-domain localization support this practical architecture for robust LLM-based scoring.
Limitations
Given the computational cost of repeated judge evaluations, our main scoring experiments focus on abstracts rather than full papers. The primary judge is trained on abstract-conditioned review supervision to align its scoring with the available input. Complementary full-paper experiments evaluate injection localization; extending end-to-end score recovery to full-paper judging is a natural direction for future work.
Ethical considerations
StableJudge aims to protect the integrity of LLM-based evaluation by mitigating score-hijacking prompt injection. Adversarial payloads serve defensive training and evaluation, but attack-generation techniques could also be misused to manipulate automated assessments. We recommend restricting their use to authorized robustness testing. In consequential applications such as paper screening, automated scores should support human judgment, with human oversight of decisions affecting individuals. Reuse of submission-review data should respect source access conditions and reviewer privacy. This study uses existing text corpora and model-generated attacks and involves no new human-subject experiments.
References
Gianluca De Stefano, Lea Schönherr, and Giancarlo Pellegrino. 2024. Rag and roll: An end-to-end evaluation of indirect prompt manipulations in LLM-based application frameworks. arXiv preprint arXiv:2408.05025.
Yann Dubois, Balázs Galambosi, Percy Liang, and Tatsunori B. Hashimoto. 2024. Length-controlled alpacaeval: A simple way to debias automatic evaluators. arXiv preprint arXiv:2404.04475.
Ariel Gera, Odellia Boni, Yotam Perlitz, Roy Bar-Haim, Lilach Eden, and Asaf Yehudai. 2025. Justrank: Benchmarking LLM judges for system ranking. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 682–712, Vienna, Austria.
Charles Godfrey, Ping Nie, Natalia Ostapuk, David Ken, Shang Gao, and Souheil Inati. 2025. Likert or not: Llm absolute relevance judgments on fine-grained ordinal scales. arXiv preprint arXiv:2505.19334.
Kai Greshake, Sahar Abdelnabi, Shailesh Mishra, Christoph Endres, Thorsten Holz, and Mario Fritz.
- Not what you’ve signed up for: Compromising real-world LLM-integrated applications with indirect prompt injection. arXiv preprint arXiv:2302.12173.
Hakan Inan, Kartikeya Upasani, Jianfeng Chi, Rashi Rungta, Krithika Iyer, Yuning Mao, Michael Tontchev, Qing Hu, Brian Fuller, Davide Testuggine, and Madian Khabsa. 2023. Llama guard: LLM-based input-output safeguard for human-AI conversations. arXiv preprint arXiv:2312.06674.
Ehud Karpas, Omri Abend, Yonatan Belinkov, Barak Lenz, Opher Lieber, Nir Ratner, Yoav Shoham, Hofit Bata, Yoav Levine, Kevin Leyton-Brown, Dor Muhlgay, Noam Rozen, Erez Schwartz, Gal Shachaf, Shai Shalev-Shwartz, Amnon Shashua, and Moshe Tenenholtz. 2022. Mrkl systems: A modular, neurosymbolic architecture that combines large language models, external knowledge sources and discrete reasoning. arXiv preprint arXiv:2205.00445.
Janis Keuper. 2025. Prompt injection attacks on LLM generated reviews of scientific publications. arXiv preprint arXiv:2509.10248.
Hao Li and Xiaogeng Liu. 2024. Injecguard: Benchmarking and mitigating over-defense in prompt injection guardrail models. arXiv preprint arXiv:2410.22770.
Guang Lin, Toshihisa Tanaka, and Qibin Zhao. 2024. Large language model sentinel: LLM agent for adversarial purification. arXiv preprint arXiv:2405.20770.
Wenhan Liu, Xinyu Ma, Weiwei Sun, Yutao Zhu, Yuchen Li, Dawei Yin, and Zhicheng Dou. 2025. Reasonrank: Empowering passage ranking with strong reasoning ability. arXiv preprint arXiv:2508.07050.
Yang Liu, Dan Iter, Yichong Xu, Shuohang Wang, Ruochen Xu, and Chenguang Zhu. 2023a. G-eval: Nlg evaluation using gpt-4 with better human alignment. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing.
Yupei Liu, Yuqi Jia, Runpeng Geng, Jinyuan Jia, and Neil Zhenqiang Gong. 2023b. Formalizing and benchmarking prompt injection attacks and defenses. arXiv preprint arXiv:2310.12815.
Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. 2018. Towards deep learning models resistant to adversarial attacks. In International Conference on Learning Representations.
Narek Maloyan and Dmitry Namiot. 2025. Adversarial attacks on LLM-as-a-judge systems: Insights from prompt injections. arXiv preprint arXiv:2504.18333.
Milad Nasr, Nicholas Carlini, Chawin Sitawarin, Sander V. Schulhoff, Jamie Hayes, Michael Ilie, Juliette Pluto, Shuang Song, Harsh Chaudhari, Ilia Shumailov, Abhradeep Thakurta, Kai Yuanqing Xiao, Andreas Terzis, and Florian Tramèr. 2025. The attacker moves second: Stronger adaptive attacks bypass defenses against LLM jailbreaks and prompt injections. arXiv preprint arXiv:2510.09023.
Ethan Perez, Saffron Huang, Francis Song, Trevor Cai, Roman Ring, John Aslanides, Amelia Glaese, Nat McAleese, and Geoffrey Irving. 2022. Red teaming language models with language models. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing.
Fábio Perez and Ian Ribeiro. 2022. Ignore previous prompt: Attack techniques for language models. Preprint, arXiv:2211.09527.
Friedrich Pukelsheim. 1994. The three sigma rule. The American Statistician, 48(2):88–91.
Bhaktipriya Radharapu, Kevin Robinson, Lora Aroyo, and Preethi Lahoti. 2023. Aart: Ai-assisted re-teaming with diverse data generation for new LLM-powered applications. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing: Industry Track, pages 380–395, Singapore. Association for Computational Linguistics.
Vyas Raina, Adian Liusie, and Mark Gales. 2024. Is LLM-as-a-judge robust? investigating universal adversarial attacks on zero-shot LLM assessment. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 7499–7517.
Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf. 2019. Distilbert, a distilled version of BERT: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108.
Timo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu, Maria Lomeli, Eric Hambro, Luke Zettlemoyer, Nicola Cancedda, and Thomas Scialom. 2023. Toolformer: Language models can teach themselves to use tools. In Advances in Neural Information Processing Systems.
Omar Farooq Khan Suri and John McCrae. 2025. Securing large language models (llms) from prompt injection attacks. arXiv preprint arXiv:2512.01326.
Qitao Tan, Xiaoying Song, Ningxi Cheng, Ninghao Liu, Xiaoming Zhai, Lingzi Hong, Yanzhi Wang, Zhen Xiang, and Geng Yuan. 2026. Q-realign: Piggybacking realignment on quantization for safe and efficient llm deployment. arXiv preprint arXiv:2601.08089.
Laurens van der Maaten and Geoffrey Hinton. 2008. Visualizing data using t-SNE. Journal of Machine Learning Research, 9(86):2579–2605.
Eric Wallace, Kai Xiao, Reimar Leike, Lilian Weng, Johannes Heidecke, and Alex Beutel. 2024. The instruction hierarchy: Training LLMs to prioritize privileged instructions. arXiv preprint arXiv:2404.13208.
Sunghyun Wee, Suyoung Kim, Hyeonjin Kim, Kyomin Hwang, and Nojun Kwak. 2025. Alignment-aware quantization for llm safety. In arXiv preprint arXiv:2511.07842.
Wenrui Xu and Keshab K Parhi. 2025. A survey of attacks on large language models. arXiv preprint arXiv:2505.12567.
Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao. 2023. React: Synergizing reasoning and acting in language models. In International Conference on Learning Representations.
Jiayi Ye, Yanbo Wang, Yue Huang, Dongping Chen, Qihui Zhang, Nuno Moniz, Tian Gao, Werner Geyer, Chao Huang, Pin-Yu Chen, Nitesh V. Chawla, and Xiangliang Zhang. 2024. Justice or prejudice? quantifying biases in LLM-as-a-judge. arXiv preprint arXiv:2410.02736.
Qiusi Zhan, Zhixiang Liang, Zifan Ying, and Daniel Kang. 2024. Injecagent: Benchmarking indirect prompt injections in tool-integrated large language model agents. In Findings of the Association for Computational Linguistics: ACL 2024, pages 10471–10506, Bangkok, Thailand. Association for Computational Linguistics.
Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric P. Xing, Hao Zhang, Joseph E. Gonzalez, and Ion Stoica. 2023. Judging LLM-as-a-judge with MT-bench and chatbot arena. In Proceedings of the 37th Conference on Neural Information Processing Systems (NeurIPS 2023), Track on Datasets and Benchmarks.
Zhenzhen Zhuang, Jiandong Chen, Hongfeng Xu, Yuwen Jiang, and Jialiang Lin. 2025. Large language models for automated scholarly paper review: A survey. Information Fusion, page 103332.
Andy Zou, Zifan Wang, Nicholas Carlini, Milad Nasr, J. Zico Kolter, and Matt Fredrikson. 2023. Universal and transferable adversarial attacks on aligned language models. arXiv preprint arXiv:2307.15043.
A Supplementary Protocol and Transfer Experiments
A.1 Scope and score tolerance
The primary task is recovery of the same judge’s clean-input score after an injected score-inflation attempt. We evaluate backend transfer, independent-attacker transfer, and carrier-domain localization with the same frozen Sentry.
The score variability scale is estimated by repeated scoring on clean inputs, with the reference tolerance set to before attack-test evaluation. The reported scoring evaluations use ; additional backends retain this same numerical tolerance. Signed and absolute residuals complement thresholded success with continuous measures of score recovery.
Localization metrics. Table 1 uses 400 seen attacks, 400 unseen attacks, and 372 clean controls. Let G and P denote the sets of gold-injection and predicted-removal character positions. Character IoU is , averaged over attacked inputs; damage is the fraction with any removal outside G. Clean false-positive rate counts clean inputs flagged or assigned removal spans. For the token-based removal controls, recall is the fraction of distinct lowercase payload words present in the removal text; perfect removal denotes at least 95% recall. Full-paper character coverage instead measures . Localization metrics quantify the edits, while paired score residuals quantify their effect on scoring.
A.2 Verifier, features, and sanitization
The tagger and verifier use separate DistilBERT encoders; the approximately 0.13B parameter count refers to their combined deployment. Bidirectional contextual representations support token-level localization, while distillation provides a compact encoder. The verifier takes each proposed span's text as input. Positive examples are injected spans and negative examples are clean sentences; its injected-class softmax probability is compared with the fixed threshold .
The final tagger is trained on 2,860 training and 358 validation examples for three epochs, with batch size 16, learning rate , maximum length 512, and seed 42. The verifier is trained for three epochs with batch size 32, learning rate , and maximum length 128. Accepted overlapping intervals are merged before replacement. The primary and cross-backend scoring results replace verified spans with the fixed marker [REDACTED SECURITY THREAT].
The category report is assembled deterministically from category labels and representative payloads. After a blue round, the current tagger probes retained payloads; a complete miss means that no injected span is proposed. These misses are grouped into the next report; when there are none, it requests exploration beyond existing categories. The report conditions red-side generation, while Eq. (9) controls admission to the effective pool. Pool maintenance normalizes and length-limits strings and removes duplicates. Category-conditioned variants retain their category, while creative generation can propose new categories. Novelty encourages diversity during generation, separately from score-shift filtering; the recorded configuration uses weight 0.2 and minimum novelty 0.08.
A.3 Frozen-Sentry backend transfer
All three backend evaluations use the same 400 held-out unseen inputs and frozen removal predictions. The primary Qwen3-8B judge is adapted to abstract scoring; the added judges are Qwen2.5-7B-Instruct and Llama-3.1-8B-Instruct. Sentry is neither retrained nor retuned for the added judges. We retain the original replacement protocol across these runs.
Table 8 reports both the fixed cohort and effective subsets selected separately for each judge ( ). Mean absolute attack shift in the fixed cohort includes both upward and downward movements, while signed residuals indicate the direction of remaining score displacement.
A.4 Independent attack generator
Llama-3.1-8B-Instruct generates plausible academic/editorial score-hijacking payloads while avoiding overt injection cues, without access to StableJudge's attack pool, category reports, Sentry predictions, or defended scores. We freeze 50 attacked inputs on different abstracts, selected by their initial score impact on Qwen2.5-7B-Instruct, and retain their 50 paired clean inputs. The Sentry and its predictions remain fixed. Using the short placeholder [REDACTED], 43/50 defended scores are within of the clean score, and none of the 50 clean inputs is edited.
| Judge / cohort | N | Success | |||
|---|---|---|---|---|---|
| Same fixed set of unseen inputs | |||||
| Qwen3-8B (adapted) | 400 | 1.040 | -0.416 | 0.422 | 60.75% |
| Qwen2.5-7B-Instruct | 400 | 0.880 | -0.039 | 0.055 | 98.25% |
| Llama-3.1-8B-Instruct | 400 | 0.390 | -0.125 | 0.131 | 97.25% |
| Effective attacks, selected separately for each judge | |||||
| Qwen3-8B (adapted) | 298 | 1.103 | -0.350 | 0.359 | 69.46% |
| Qwen2.5-7B-Instruct | 358 | 0.937 | -0.038 | 0.055 | 98.04% |
| Llama-3.1-8B-Instruct | 151 | 0.622 | -0.090 | 0.103 | 99.34% |
Table 8: Score recovery using a frozen Sentry. , , and are sample means. Success means .
| Slice | Clean / attacked | Clean false positives | Detection | Mean removal | Perfect removal |
|---|---|---|---|---|---|
| All | 805 / 200 | 0.99% | 99.50% | 99.24% | 97.50% |
| Instruction/list-heavy | 309 / 78 | 1.62% | 100.00% | 99.93% | 98.72% |
| Code | 165 / 42 | 0.00% | 97.62% | 96.51% | 90.48% |
| Recipe | 65 / 14 | 0.00% | 100.00% | 100.00% | 100.00% |
Table 9: Carrier-domain localization and preservation of clean text. False-positive rate is the fraction of clean inputs edited.
| Tagger encoder | Perfect removal | Clean false positives |
|---|---|---|
| DistilBERT | 98.80% | 0.00% |
| all-MiniLM-L6-v2 | 96.80% | 1.61% |
Table 10: Controls on 250 cross-run attacks and 372 clean inputs. Perfect removal is at least payload-token recall.
A.5 Carrier-domain transfer
We use 805 AlpacaEval outputs as clean carrier texts and inject 200 randomly selected held-out evolved payloads into 200 of them, at prefix/middle/suffix positions (67/67/66). Only the benign carrier domain changes: the trained detector, attack pool, and thresholds are fixed. The task is span localization and preservation of clean content. Mean removal is payload-token recall; perfect removal means at least recall. The listed content slices are disjoint subsets of the overall set.
A.6 Selective full-paper scanning
We sample 30 NeurIPS 2025 full papers (20–59 pages; median 32 pages and 102,024 extracted characters) and 30 held-out evolved payloads matching the scanner's fixed cue set. Each paper receives an injection at head, middle, and tail, giving 90 attacked inputs and 30 clean controls. The detector, cue set, and thresholds remain fixed.
The scanning configuration takes the first and last 2,000 characters, plus a window extending 500 characters on either side of each radar match. Each window is encoded with a maximum of 512 tokens. The eight case-insensitive cue patterns cover previous-instruction overrides, task/goal reassignment, text disregard, score-only requests, requests for score 10, system overrides, system-administrator impersonation, and explicit score assignments. Window size is bounded; the number of interior windows depends on cue matches. Reported scan counts include overlapping windows before the final span merge.
Table 7 in the main text reports detection and character coverage; detection counts attacked inputs with an accepted span. Mean character-level IoU is .
A.7 Verifier threshold and encoder controls
We hold the final-round training split, seed, tagger optimization settings, behavioral features, verifier, and evaluation manifest fixed. The encoder comparison changes only the tagger encoder.
Both tagger encoders achieve high perfect-removal rates, with a lower clean false-positive rate for DistilBERT. Across , detection is 249/250, perfect removal ranges from to , and no clean false positives are observed among the 372 controls.