journal article·2025-12-16Open access

A Hybrid Perplexity-MAS Framework for Proactive Jailbreak Attack Detection in Large Language Models

Ping Wang, Hao-Cyuan Li, Hsiao-Chung Lin, Wen-Hui Lin, Fang-Ci Wu, Nian-Zu Xie, Zhon-Ghan Yang

Applied Sciences· Volume 15· Issue 24

Abstract

Jailbreak attacks (JAs) represent a sophisticated subclass of adversarial threats wherein malicious actors craft strategically engineered prompts that subvert the intended operational boundaries of large language models (LLMs). These attacks exploit latent vulnerabilities in generative AI architectures, allowing adversaries to circumvent established safety protocols and illicitly induce the model to output prohibited, unethical, or harmful content. The emergence of such exploits underscores critical gaps in the security and controllability of modern AI systems, raising profound concerns about their societal impact and deployment in sensitive environments. In response, this study introduces an innovative defense framework that synergistically integrates language model perplexity analysis with a Multi-Agent System (MAS)-oriented detection architecture. This hybrid design aims to fortify the resilience of LLMs by proactively identifying and neutralizing jailbreak attempts, thereby ensuring the protection of user privacy and ethical integrity. The experimental setup adopts a query-driven adversarial probing strategy, in which jailbreak prompts are dynamically generated and injected into the open-source LLaMA-2 model to systematically explore potential vulnerabilities. To ensure rigorous validation, the proposed framework will be evaluated using a custom jailbreak detection benchmark encompassing metrics such as Attack Success Rate (ASR), Defense Success Rate (DSR), Defense Pass Rate (DPR), False Positive Rate, Benign Pass Rate (BPR), and End-to-End Latency. Through iterative experimentation and continuous refinement, this work endeavors to advance the defensive capabilities of LLM-based systems, enabling more trustworthy, secure, and ethically aligned deployment of generative AI in real-world environments.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Adversarial Robustness in Machine Learning · Network Security and Intrusion Detection · Security and Verification in Computing

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Department of Information Management, Kun Shan University, Tainan 710303, Taiwan

Department of Information Management, National Chin-Yi University of Technology, Taichung 411030, Taiwan

References (27)

Show source-provided references
1. (2025, February 08). OWASP Top 10 Risk & Mitigations for LLMs and Gen AI Apps. Available online: https://genai.owasp.org/llm-top-10/.
2. Hung, K.H., Ko, C.Y., Rawat, A., Chung, I.H., Hsu, W.H., and Chen, P.Y. (2025). Attention tracker: Detecting prompt injection attacks in LLMs. arXiv.10.18653/v1/2025.findings-naacl.123 ↗
3. Erfan, S., Yue, D., and Nael, A.G. (2023). Jailbreak in pieces: Compositional Adversarial Attacks on Multi-Modal Language Models. arXiv.
4. Zeng, Y., Wu, Y., Zhang, X., Wang, H., and Wu, Q. (2024). Autodefense: Multi-Agent LLM defense against Jailbreak Attacks. arXiv.
5. Gonen, H., Lyer, S., Blevins, T., Smith, N.A., and Zettlemoyer, L. (2022). Demystifying prompts in language models via perplexity estimation. arXiv.10.18653/v1/2023.findings-emnlp.679 ↗
6. Goldblum, M., Saha, A., Geiping, J., and Goldstein, T. (2023). Baseline Defenses for Adversarial Attacks against Aligned Language Models. arXiv.
7. Xiao, Y., and Christensen, H. (2025). Alzheimer’s dementia detection using perplexity from paired large language models. arXiv.10.21437/Interspeech.2025-2428 ↗
8. Kim, J., Derakhshan, A., and Harris, G.I. (2024). Robust safety classifier for large language models: Adversarial prompt shield. arXiv.10.18653/v1/2024.woah-1.12 ↗
9. Xu, Z., Liu, Y., Deng, G., Li, Y., and Picek, S. (2024). LLM jailbreak attack versus defense techniques—A comprehensive study. arXiv.
10. Schwarz, D. (2025). Countermind: A multi-layered security architecture for large language models. arXiv.10.2139/ssrn.5583050 ↗
11. A multi-layered AI-driven cybersecurity architecture: Integrating entropy analytics, Fuzzy reasoning, game theory and multi-agent reinforcement learning for adaptive threat defense10.1109/ACCESS.2025.3610526 ↗
12. Muhaimin, S.S., and Mastorakis, S. (2025). Helping big language models protect themselves: An enhanced filtering and summarization system. arXiv.
13. Suo, X. (2024). Signed-prompt: A new approach to prevent prompt injection attacks against LLM-integrated applications. arXiv.10.1063/5.0222987 ↗
14. Murphy, K.P. (2002). Dynamic Bayesian Networks: Representation, Inference and Learning. [Ph.D. Thesis, University of California].
15. Murphy, K.P., and Paskin, M. (2001, January 3–8). Linear time inference in hierarchical hidden Markov models. Proceedings of the 15th International Conference on Neural Information Processing Systems: Natural and Synthetic (NIPS 2001 Conference), Vancouver, BC, Canada.
16. A maximization technique occurring in the statistical analysis of probabilistic functions of Markov chains10.1214/aoms/1177697196 ↗
17. Durbin, R. (1998). Biological Sequence Analysis: Probabilistic Models of Proteins and Nucleic Acids, Cambridge University Press.10.1017/CBO9780511790492 ↗
18. Ebrahimi, S., Dehghankar, M., and Asudeh, A. (2025). Anadversary-resistant multi-agent LLM system via credibility scoring. arXiv.
19. Liashchynskyi, P., and Liashchynskyi, P. (2019). Grid search, random search, genetic algorithm: A big comparison for NAS. arXiv.
20. Random search for hyper-parameter optimization
21. Sitikhu, P., Pahi, K., Thapa, P., and Shakya, S. (2019). A comparison of semantic similarity methods for maximum human interpretability. arXiv.10.1109/AITB48515.2019.8947433 ↗
22. Touvron, H., Martin, L., Stone, K., Albert, P., Almahairi, A., Babaei, Y., Bashlykov, N., Batra, S., Bhargava, P., and Bhosale, S. (2023). Llama 2: Open foundation and fine-tuned chat models. arXiv.
23. (2025, February 12). WildJailbreak Repository. Available online: https://huggingface.co/datasets/allenai/wildjailbreak.
24. Advanced Ensemble Adversarial Example on Unknown Deep Neural Network Classifiers10.1587/transinf.2018EDP7073 ↗
25. Moosavi-Dezfooli, S.M., Fawzi, A., Fawzi, O., and Frossard, P. (2016). Universarial Adversarial Perturbations. arXiv.10.1109/CVPR.2017.17 ↗
26. Bassani, E., and Sanchez, I. (2024, January 12–16). GuardBench: A Large-Scale Benchmark for Guardrail Models. Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, Miami, FL, USA.10.18653/v1/2024.emnlp-main.1022 ↗
27. (2025, December 06). AmenRa/GuardBench: A Python Library for Guardrail-Github. Available online: https://github.com/AmenRa/GuardBench.