An Empirical Study of Multi-generation Sampling for Jailbreak Detection in Large Language Models
Detecting jailbreak behaviour in large language models is difficult when harmful outputs occur intermittently. We study how output-level vulnerability estimates change with sampling budgets from $$k=1$$ to $$k=5$$ on JailbreakBench Behaviors using four small open-weight generators. TF-IDF logistic regression is treated as an interpretable lexical diagnostic, a simplified generation-inconsistency method as an exploratory auxiliary signal, and Qwen3Guard as a complementary safety classifier. Repeated sampling reveals positive outputs missed by single-response evaluation. The clearest gains generally occur from $$k=1$$ to $$k=3$$, with smaller subsequent gains, but the magnitude is heterogeneous across generators and detectors. This pattern remains visible across decoding temperatures and in a limited transferred-GCG experiment. An Unsafe-only Qwen3Guard sensitivity analysis shows that the increase is not solely caused by grouping Controversial outputs with Unsafe outputs. Human validation indicates that TF-IDF has weak harmful-case recall and that Qwen3Guard offers broader but imperfect coverage; consequently, cross-generator TF-IDF results are interpreted only as transfer of lexical proxy patterns. The conclusions are restricted to the evaluated models. Thus, $$k=3$$ is an empirical cost–benefit compromise, not a universal optimum or deployment recommendation. Code and reproducibility materials are available at https://github.com/ddlv70/ai-jailbreak-detector-revision.
Authors
- Shreyank N Gowda (ORCID: https://orcid.org/0000-0002-4975-0705)
- Hanrui Luo
Institutions
- University of Nottingham (GB)
Publication Details
- Journal
- SN Computer Science
- Published
- 2026-12-02
- DOI
- https://doi.org/10.1007/s42979-026-05492-6
- Citations
- 2
- Primary Topic
- Adversarial Robustness in Machine Learning
- Type
- article
- Field-Weighted Citation Impact
- 1.94