REVIEW 3 major objections 5 minor 3 cited by
Standard cross-validation overestimates prompt-attack classifier generalization: leaving an entire dataset out of training drops pooled AUC from 0.996 to 0.912, an 8.4-point gap.
Reviewed by Pith at T0; open to challenge. T0 means a machine referee read the full paper against a public rubric. the ladder, T0–T4 →
2026-08-02 23:16 UTC pith:XA57BTIW
load-bearing objection The LODO evaluation idea is worth taking seriously for prompt attack classifiers, but the abstract claims more than the full text supports, and the headline 8.4-point gap is a benchmark-composition result, not a measured deployment gap. the 3 major comments →
When Benchmarks Lie: Evaluating Malicious Prompt Classifiers Under True Distribution Shift
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
The central discovery is that standard evaluation protocols—both 5-fold cross-validation and same-source held-out test sets—systematically overestimate out-of-distribution performance of activation-based prompt-attack classifiers. On 18 benchmark datasets (105K samples, 47% malicious), logistic regression on layer-31 raw activations reports 0.996 AUC under cross-validation and 0.997 on a held-out test set, but only 0.912 pooled AUC under LODO. Per-dataset gaps between same-source held-out tests and LODO range from 1.2% (safeguard) to 25.4% (jayavibhav), showing heterogeneous failure modes. The paper attributes the gap to dataset shortcuts: features identifying dataset provenance rather than
What carries the argument
The load-bearing mechanism is Leave-One-Dataset-Out (LODO) evaluation: for each dataset D_i in a benchmark of K datasets, train a classifier on the other K−1 and test on D_i; pooling all held-out predictions gives the out-of-distribution metric. The companion diagnostic is the LODO coefficient retention r_j = min_i (w_j^{(-i)} / w_j), the minimum ratio between a feature's classifier coefficient when dataset i is held out and its full-data coefficient. Features with r_j ≈ 1 are stable across holdouts; features with r_j ≪ 1 or negative (sign flips) are dataset shortcuts. A dataset-identity classifier trained on SAE features (96.6% accuracy) shows why the shortcuts exist: datasets form separabl
Load-bearing premise
The 8.4-point gap estimate assumes that holding out an entire benchmark dataset reproduces the distribution shift a deployed detector actually faces; the paper itself notes that LODO assumes the 18 datasets represent meaningfully different distributions, so if they do not resemble production traffic, the gap measures benchmark composition rather than deployment generalization.
What would settle it
Collect real deployment traffic (or a faithful proxy) for an agent that processes emails, documents, and tool outputs, run the same probe, and compare its actual AUC to both the CV estimate and the LODO estimate; if deployed AUC tracks CV rather than LODO, the shortcut explanation is wrong. A second check: remove all single-class datasets from the benchmark and retrain—if the CV-LODO gap collapses, the gap is an artifact of single-class benchmark design rather than a general out-of-distribution phenomenon.
If this is right
- Near-perfect AUCs (>0.99) reported for prompt-attack detectors should be re-read as upper bounds; LODO should be reported alongside cross-validation before deployment.
- The 8.4-point pooled gap and 1–25-point per-dataset gaps persist across four LLMs from three families, indicating the problem is benchmark composition, not a single model's quirk.
- Production guardrails detect only 7–37% of indirect and agentic injections, while the proposed activation probes trained under LODO reach 68–99% on those categories.
- LODO retention scores filter SAE-feature attributions: 98.1% of per-prompt explanations change rank, with demoted features having mean retention 0.265 versus 0.990 for promoted ones.
- Common domain-generalization fixes—adversarial training, subspace projection, sample reweighting, and class balancing—do not close the gap, so closing it needs new methods.
Where Pith is reading between the lines
- If LODO becomes the reporting standard, many published detector results will need downward revision; a detector's practical value may hinge on its worst held-out dataset rather than its pooled AUC.
- The 96.6% dataset-identity accuracy implies the gap is largely a property of single-class benchmark sources; a testable fix is building datasets with overlapping formats and multiple sources per attack type so provenance is not a class signal.
- The retention metric could be applied to other aggregated benchmarks (toxicity, spam, medical QA) where single-class datasets make shortcut learning trivial.
- The paper's own layer/position sensitivity results (per-dataset accuracy swings up to 42 points, e.g., BIPIA 7% at layer 19 vs 63% at layer 31) suggest LODO can double as a hyperparameter-selection tool, picking layers and token positions by their held-out stability rather than in-distribution accuracy.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes Leave-One-Dataset-Out (LODO) evaluation for prompt-injection and jailbreak classifiers, arguing that standard cross-validation and same-dataset held-out splits overestimate out-of-distribution performance. Using linear probes on Llama-3.1-8B activations (and an SAE decomposition) over a benchmark of 18 datasets, it reports a pooled AUC of 0.996 under 5-fold CV versus 0.912 under LODO, an 8.4 percentage point gap, with per-dataset accuracy gaps between 1.2% and 25.4%. The paper then analyzes SAE feature coefficients to identify dataset shortcuts, reports that 28% of top features are dataset-dependent, and proposes LODO-weighted explanations to downweight such features. It also compares against PromptGuard 2, LlamaGuard, and Llama-as-judge, finding these baselines fail on indirect and agentic attacks. The central claim is that LODO is the appropriate protocol for measuring true out-of-distribution generalization in this domain.
Significance. If the central claim is accepted, the paper makes a useful methodological contribution: demonstrating that standard evaluation protocols can inflate prompt-security classifier performance by a substantial margin, and providing a concrete alternative protocol plus diagnostic tools based on LODO retention. The formalization of LODO in Eq. (4), the large multi-source benchmark (105K samples), the explicit per-dataset breakdown, the sensitivity analysis in Appendix D, and the public code release are all strengths. The shortcut-retention metric and the LODO-weighted explanation procedure are interesting and potentially reusable beyond this specific task. However, the paper's headline conclusions—'true distribution shift' and a multi-LLM cross-family generalization—are not fully supported by the evidence actually reported, and the gap magnitude is tied to specific configuration choices. The core idea is defensible, but the presentation and scope need substantial revision.
major comments (3)
- [Abstract; Section 4.1; Appendix E] The abstract states that standard CV reports pooled AUC 8.0–16.5 points higher than LODO 'across four LLMs from three families (Llama-3.1-8B, Gemma-3-27B, Qwen-3.5-2B/4B)'. The experiments in the manuscript use only Llama-3.1-8B-Instruct (Section 4.1) and Llama-3.1-70B (Appendix E). No Gemma or Qwen results appear anywhere in the full text. This is a load-bearing overgeneralization: it converts a single-family result into a cross-family claim. Either add the claimed experiments or revise the abstract and all downstream claims to the supported Llama-only scope.
- [Section 3.3; Section 6 Limitations; Table 13] The paper repeatedly calls LODO a measure of 'true out-of-distribution generalization' and the abstract/conclusion frame the 8.4-point gap as evidence of benchmark deception about deployment behavior. The paper's own Limitations section concedes that 'LODO assumes datasets represent meaningfully different distributions', and no evidence is offered that the 18 curated benchmark datasets resemble production agent traffic. Moreover, Table 13 shows that ablating all identified shortcuts changes pooled LODO AUC by only 0.1pp, and Section 5.3 explicitly says the shortcut analysis is 'not explanatory' of the gap. Thus the aggregate gap is a composition-weighted property of this benchmark, not a demonstrated 'true' deployment shift. Please reframe the central claim as benchmark-to-benchmark transfer, or provide an external validation corpus to calibrate the gap.
- [Section 3.2; Appendix D] The headline 8.4-point gap is computed for one configuration: raw activations at layer 31 and token position −5, selected 'for simplicity'. Appendix D shows that per-dataset LODO accuracy varies dramatically with layer and position (e.g., BIPIA 7% at L19 vs 63% at L31; llmail 29% vs 71% across positions at L31). The text asserts that the core finding persists across configurations, but no CV-vs-LODO gap is reported for the other configurations. The specific magnitude 8.4 is therefore configuration-dependent. Please report the CV-LODO gap across the layer/position configurations in Appendix D, or clearly state that only the qualitative gap is robust.
minor comments (5)
- [Section 5.3; Table 13] The text says 'Ablating all 14 shortcuts' but Table 13's last row is 'All (26)'. Clarify whether 14 or 26 features are ablated and reconcile the definition used in the main text with the appendix sensitivity analysis.
- [Table 3] The BIPIA row is unreadable: '15000 9563.126.1 60.1' likely means N=15000, %Mal=95, Raw=63.1, SAE=26.1, but the lack of spacing makes it appear as a single number. Fix the table formatting.
- [Abstract; Section 4.1] The manuscript mentions 18 datasets in the abstract and Table 6, but LODO evaluation merges Gandalf into Mosscap to yield 17 datasets. State explicitly that all LODO results use 17 datasets, to avoid apparent inconsistency.
- [Table 1] The row 'CV-LODO Gap 8.4%' is labeled as a percentage, but the text correctly calls it a percentage-point inflation. Use 'pp' throughout to avoid unit confusion.
- [Appendix E] The 70B comparison claims that 'the CV-LODO gap persists', but no CV or held-out AUC numbers are provided for 70B. Add the comparison values or soften the claim to 'per-dataset variation persists'.
Circularity Check
Main CV-vs-LODO gap is independent, but the LODO-weighted explanation validation is circular by construction (Eq. 7).
specific steps
-
self definitional
[Section 5.4, using Eq. 7 from Section 3.5]
"We propose LODO-weighted explanations: influenceLODO j =z j ·w j ·r j ... Demoted features have mean retention of 0.265 vs 0.990 for promoted features (Cohen’s d= 5.60, p <0.001), confirming systematic filtering of dataset-dependent features."
By Eq. 7, the LODO-weighted influence is exactly the raw influence multiplied by the retention score r_j. A feature is demoted in the top-20 ranking precisely when r_j is low and promoted precisely when r_j is high. The reported mean-retention contrast (0.265 vs 0.990) is therefore a restatement of the weighting rule, not an independent confirmation that r_j identifies dataset artifacts. The claim that LODO-weighted attributions filter dataset artifacts is validated using the same quantity that performs the filtering, so the confirmation is entailed by the construction.
full rationale
The paper's central quantitative result—5-fold CV 0.996 vs LODO 0.912 pooled AUC, with per-dataset gaps of 1.2–25.4%—is a direct, externally grounded comparison of two evaluation protocols on held-out predictions. This is not circular: no fitted parameter is renamed as a prediction, and the LODO protocol is explicitly adapted from established leave-one-domain-out methodology (Gulrajani & Lopez-Paz; Koh et al.) rather than imported from self-citation. The shortcut taxonomy is an operational definition (retention < 50%) and is checked against independent metrics and a dataset-identity classifier; that convergent validation is not circular. The one genuine circular step is in Section 5.4: the validation of LODO-weighted explanations compares the retention of demoted vs promoted features, but demotion/promotion is defined by multiplying by retention in Eq. 7, making the result a tautology. Because this affects an ancillary interpretability claim rather than the main 8.4-point gap, the overall circularity is partial. The Limitations section also concedes that 'LODO assumes datasets represent meaningfully different distributions'; that is an untested external-validity assumption and a correctness caveat, not a circularity.
Axiom & Free-Parameter Ledger
free parameters (3)
- Shortcut analysis thresholds (K=50 top features, retention threshold 50%, firing ratio 1.5x) =
K=50, r_thr=50%, fr_thr=1.5x
- Default classification threshold =
0.5
- Activation layer and token position =
layer 31, position −5; SAE layer 27
axioms (4)
- domain assumption Holding out entire datasets estimates true out-of-distribution generalization for deployment.
- domain assumption The 18 benchmark datasets are representative of real-world malicious and benign prompt distributions.
- domain assumption Dataset identity is a shortcut that linear probes can learn from activations.
- domain assumption SAE features are sufficiently monosemantic for shortcut diagnosis.
Cite this review
Pith. "Pith review of When Benchmarks Lie: Evaluating Malicious Prompt Classifiers Under True Distribution Shift." pith.science (2026). https://pith.science/paper/XA57BTIW
@misc{pith2026260214161,
author = {Pith},
title = {Pith review of: When Benchmarks Lie: Evaluating Malicious Prompt Classifiers Under True Distribution Shift},
year = {2026},
howpublished = {\url{https://pith.science/paper/XA57BTIW}},
note = {Machine review of arXiv:2602.14161}
}
read the original abstract
Detecting prompt injection, jailbreak attacks, and harmful requests is critical for deploying LLM-based agents safely, yet current evaluation practices in this literature overestimate generalization. We train activation-based classifiers (linear probes on LLM hidden states) on a benchmark of 18 datasets (prompt attacks plus benign sources) and propose Leave-One-Dataset-Out (LODO) evaluation, where the held-out dataset is never seen during training. Across four LLMs from three families (Llama-3.1-8B, Gemma-3-27B, Qwen-3.5-2B/4B), standard cross-validation reports a pooled AUC 8.0-16.5 points higher than LODO; per-dataset held-out-test-vs-LODO accuracy gaps span 1-25 points. To understand the gap, we analyze the LODO stability of a linear probe's per-feature classifier coefficients, defining a retention metric for sparse-autoencoder (SAE) features that flags dataset-dependent shortcuts. 28-44% of top SAE features are shortcuts across models, a dataset-identity classifier reaches 96.6%, and the dataset-identifying and safety-relevant subspaces partially overlap. Standard domain-generalization fixes such as adversarial training, subspace projection, sample reweighting, and class balancing do not close the gap. Finally, we show LODO-weighted SAE attributions filter dataset artifacts for more reliable per-prompt explanations. We release our framework at https://github.com/maxf-zn/prompt-mining so future prompt-attack classifiers can be evaluated under LODO alongside CV.
Figures
Forward citations
Cited by 3 Pith papers
-
The Entanglement Wall: Activation-Space Probes as Risk Detectors, Not Context Adjudicators
Fixed activation probes keep near-ceiling accuracy on harmful-vs-benign corpus contrasts but fall to AUROC 0.59-0.69 on topic- and surface-matched harmful/benign pairs, so they behave as broad-risk detectors, not cont...
-
Geometry-Lite: Interpretable Safety Probing via Layer-Wise Margin Geometry
Geometry-Lite decomposes LLM safety detection into layer-wise margin geometries and finds that persistent boundary positions, not layer-to-layer drift, drive most detection performance across nine models and seven benchmarks.
-
Prompt Injection Detection is Regime-Dependent: A Deployment-Aware Evaluation with Interpretable Structural Signals
Prompt injection detection performance is highly regime-dependent with no single detector dominating across settings; transformer models perform best overall while structural signals offer modest gains in some regimes.
Reference graph
Works this paper leans on
-
[4]
Mathis Le Bail, J ´er´emie Dentan, Davide Buscaldi, and Sonia Vanier. Unveiling decision-making in LLMs for text classification: Extraction of influential and interpretable concepts with sparse autoencoders.arXiv preprint arXiv:2506.23951,
-
[5]
Tom Lieberum, Senthooran Rajamanoharan, Arthur Conmy, Lewis Smith, Nicolas Sonnerat, Vikrant Varma, Janos Kramar, Anca Dragan, Rohin Shah, and Neel Nanda. Gemma scope: Open sparse autoencoders everywhere all at once on gemma 2.arXiv preprint arXiv:2408.05147,
-
[7]
Mantas Mazeika, Long Phan, Xuwang Yin, Andy Zou, Zifan Wang, Norman Mu, Elham Sakhaee, Nathaniel Li, Steven Basart, Bo Li, et al. HarmBench: A standardized evaluation framework for automated red teaming and robust refusal.arXiv preprint arXiv:2402.04249,
-
[9]
Jingwei Yi, Yueqi Xie, Bin Zhu, Emre Kiciman, Guangzhong Sun, Xing Xie, and Fangzhao Wu
arXiv:2501.18837. Jingwei Yi, Yueqi Xie, Bin Zhu, Emre Kiciman, Guangzhong Sun, Xing Xie, and Fangzhao Wu. Benchmarking and defending against indirect prompt injection attacks on large language models. InProceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 1809–1820,
-
[10]
Qiusi Zhan, Zhixiang Liang, Zifan Ying, and Daniel Kang
URLhttps://arxiv.org/abs/2312.14197. Qiusi Zhan, Zhixiang Liang, Zifan Ying, and Daniel Kang. InjecAgent: Benchmarking indirect prompt injections in tool-integrated large language model agents.arXiv preprint arXiv:2403.02691,
-
[11]
Andy Zou, Zifan Wang, Nicholas Carlini, Milad Nasr, J Zico Kolter, and Matt Fredrikson
URLhttps://arxiv.org/abs/2305.02160. Andy Zou, Zifan Wang, Nicholas Carlini, Milad Nasr, J Zico Kolter, and Matt Fredrikson. Universal and transferable adversarial attacks on aligned language models.arXiv preprint arXiv:2307.15043,
-
[12]
12 APPENDIX A DATASETDETAILS Table 6: Dataset overview
URL https://arxiv.org/abs/2406.04313. 12 APPENDIX A DATASETDETAILS Table 6: Dataset overview. Single-class datasets (100% malicious or benign) enable trivial shortcut learning. †Includes Gandalf (Lakera/gandalf summarization, 114 samples) merged due to small size. Dataset Source N % Mal. Attack Type Harmful Requests (100% malicious): AdvBench walledai/Adv...
-
[13]
Subject: {subject}Body:{body}
contains email-based injection attacks across three difficulty levels. Prompts are formatted as “Subject: {subject}Body:{body}” where the body contains the injection attempt. C EXPERIMENTALSETUP C.1 PROMPTCONSTRUCTIONPIPELINE Our activation extraction pipeline processes prompts through a standardized workflow. Each prompt is represented as a PromptSpec co...
2024
-
[14]
system” role, so we prepend system message content to the first user message. The model generates a classification (“safe
Metric Definitions. Cohen’sdmeasures effect size for class separation: d= ¯xmal −¯xben σpooled , σ pooled = r σ2 mal +σ 2 ben 2 (8) where¯xmal and¯xben are mean feature activations for malicious and benign samples. Information Gainquantifies mutual information between the binarized feature (fires/does not fire) and the class label: IG=H(Y)−H(Y|X), H(Y) =−...
2023
-
[2020]
URL https://openreview .net/forum?id=ryxGuJrFvS. Baturay Saglam, Paul Kassianik, Blaine Nelson, Sajana Weerawardhena, Yaron Singer, and Amin Kar- basi. Large language models encode semantics and alignment in linearly separable representations. arXiv preprint arXiv:2507.09709,
-
[2021]
Are sparse autoencoders useful? a case study in sparse probing.arXiv preprint arXiv:2502.16681,
Subhash Kantamneni, Joshua Engels, Senthooran Rajamanoharan, Max Tegmark, and Neel Nanda. Are sparse autoencoders useful? a case study in sparse probing.arXiv preprint arXiv:2502.16681,
-
[2024]
Samuel Marks and Max Tegmark. The geometry of truth: Emergent linear structure in large language model representations of true/false datasets.arXiv preprint arXiv:2310.06824,
-
[2025]
Sparse autoencoder features for classifications and transferability
Jack Gallifant, Shan Chen, et al. Sparse autoencoder features for classifications and transferability. arXiv preprint arXiv:2502.11367,
-
[2026]
DeepMind Mechanistic Interpretability Team
arXiv:2601.04603. DeepMind Mechanistic Interpretability Team. Negative results for sparse autoencoders on down- stream tasks and deprioritising SAE research. https://deepmindsafetyresearch.m edium.com/negative-results-for-sparse-autoencoders-on-downstrea m-tasks-and-deprioritising-sae-research-6cadcfc125b9 ,
This paper was first reviewed by deepseek-v4-flash on August 2, 2026.
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.