PIJ-Combined-3Class: two binary detectors as one 3-class system
Labels: 0 benign / 1 prompt_injection / 2 jailbreak. Inference only; nothing was trained.
Models evaluated together:
- mahfuzmridul/mdeberta-v3-prompt-injection (tau = 0.225)
- mahfuzmridul/mdeberta-v3-jailbreak (tau = 0.465)
Rule A: neither fires -> benign; one fires -> that class; both fire -> the larger margin (p - tau).
Rule B: argmax of [1 - max(p_inj, p_jb), p_inj, p_jb].
Results
| split | rule | accuracy | macro_f1 | balanced_accuracy | mcc | P_benign | R_benign | F1_benign | n_benign | P_prompt_injection | R_prompt_injection | F1_prompt_injection | n_prompt_injection | P_jailbreak | R_jailbreak | F1_jailbreak | n_jailbreak |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| test | A | 0.9404 | 0.9398 | 0.94 | 0.9132 | 0.9788 | 0.9799 | 0.9793 | 20002 | 0.8763 | 0.991 | 0.9301 | 20000 | 0.9802 | 0.849 | 0.9099 | 19724 |
| test | B | 0.9704 | 0.9703 | 0.9703 | 0.9558 | 0.9778 | 0.9807 | 0.9792 | 20002 | 0.954 | 0.9886 | 0.971 | 20000 | 0.9806 | 0.9415 | 0.9607 | 19724 |
| ood_test | A | 0.8758 | 0.8651 | 0.8615 | 0.827 | 0.9899 | 0.9755 | 0.9826 | 20751 | 0.7631 | 1 | 0.8656 | 22851 | 0.9656 | 0.6092 | 0.7471 | 18393 |
| ood_test | B | 0.9535 | 0.9518 | 0.9488 | 0.9315 | 0.9897 | 0.9762 | 0.9829 | 20751 | 0.9094 | 0.9999 | 0.9525 | 22851 | 0.9759 | 0.8703 | 0.92 | 18393 |
Full breakdowns are in results/: cross-firing, confusion matrices, per-slice tables and per-row predictions.
How to read these numbers
- Neither model saw the other attack class during training, so
results/crossfire.csvis the main finding. - OOD injection rows are 100% synthetic, from the same generator as the training data. Their score is template transfer, not generalisation.
- The honest generalisation slice is the 11,720 OOD jailbreaks with
provenance_unseen = 1(GCG, AutoDAN, GBDA, ECLIPSE, AdaPPA). matched_paironood_testis benign-only, so its "accuracy" is 1 - FPR.- Leakage checks: 0 benign split disagreements between the two cuts, and 0 test text in either model's train or val.
Part of an undergraduate thesis on jailbreak and prompt-injection detection (PIJ-Tax).