PIJ-Detect (3-class) β mDeBERTa-v3
One head for benign (0) / prompt_injection (1) / jailbreak (2). Trained on
PIJ-3Class (209,093 rows), argmax decision, no threshold to calibrate.
Headline β read all three numbers
| number | value |
|---|---|
test macro-F1 (original text) |
0.9854 |
test macro-F1 (flattened: newlines/tabs collapsed) |
0.9854 |
| line-matched slice (n=30,228, leak-free) macro-F1 | 0.9852 |
The honest headline for this corpus is the original number (0.9854). Removing line structure moved test macro-F1 by +0.00 pts and injection recall by +0.00 pts (positive = the original text scored higher), which stays below the 1.0 pt / 2.0 pt trigger.
Why there are three headline numbers
The training corpus has an unclosed length short-cut. Its sampler matched a joint
n_chars x n_words grid and never constrained line structure, and BIPIA/indirect injections are multi-line carrier documents (median line_count 17, against 1 for benign). A four-feature length probe scores 0.4553 against 0.3333 chance; on the two matched features it scores 0.3338.
line_count is never model input, but the newlines are in the text, so the model can learn the same cue. The flattened and line-matched numbers bound how much it did.
Comparison β identical test rows (59,726 ids, verified set-equal)
| system | macro-F1 | jailbreak recall | benign FPR |
|---|---|---|---|
| TF-IDF + LinearSVC (60k subsample floor) | 0.9519 | 0.9393 | 0.0625 |
| two binary models combined, Rule B | 0.9703 | 0.9415 | 0.0193 |
| this model (original) | 0.9854 | 0.9858 | 0.0192 |
| this model (flattened) | 0.9854 | 0.9858 | 0.0192 |
The TF-IDF floor is a 60,000-row subsample floor, not a full-data number. The two-model row is original text; flattening it would require re-scoring both binary checkpoints.
The slices that carry the claim
| slice | macro-F1 | why it matters |
|---|---|---|
matched_pair=1 (n=27,355) |
0.9724 | provenance carries no label signal |
upstream=BIPIA (n=7,153) |
0.9694 | attack and benign from the same documents |
origin=real (n=46,170) |
0.9815 | natural data only |
| line-matched (n=30,228) | 0.9852 | line structure uninformative by construction |
unseen-provenance jailbreak recall (ood_test, n=11,720) |
0.963 | the one genuine generalisation number |
Do not report
- A single
ood_testnumber. It blends 11,720 genuinely unseen-provenance jailbreak rows with 29,524 contaminated ones. - Any OOD injection number as generalisation. All 22,851 OOD injection rows are
origin=syntheticfrom thePIJ-Taxgenerator that produced much of training, and none hasprovenance_unseen=1. It is template transfer. - The whole-split
testnumber alone. Quote it with the flattened and line-matched numbers beside it, or not at all. - Non-English recall above English recall as a win. The non-English rows are translated templates.
Limitations
- No canonicalisation.
TAXONOMY.mdsection 4 specifies NFKC, zero-width stripping and base64/ROT13 decoding as stage 1 of PIJ-Detect; this model does not implement it. - Single-turn, text-only. B3 multi-turn absent, B4 multimodal excluded (the 1,320 multimodal rows are dropped).
- The jailbreak class is 98,680, not 100,000, for that reason.
- Trained on the original text. Flattening is an evaluation ablation only.
- Downloads last month
- 11
Model tree for mahfuzmridul/mdeberta-v3-pij-3class
Base model
microsoft/mdeberta-v3-base