Understanding the Effectiveness of Coverage Criteria for Large Language Models: A Special Angle from Jailbreak Attacks
Authors:
- 26 April 2025
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 730-742
Abstract
Large language models (LLMs) have revolutionized artificial intelligence, but their increasing deployment across critical domains has raised concerns about their abnormal behaviors when faced with malicious attacks. Such vulnerability alerts the widespread inadequacy of pre-release testing. In this paper, we conduct a comprehensive empirical study to evaluate the effectiveness of traditional coverage criteria in identifying such inadequacies, exemplified by the significant security concern of jailbreak attacks. Our study begins with a clustering analysis of the hidden states of LLMs, revealing that the embedded characteristics effectively distinguish between different query types. We then systematically evaluate the performance of these criteria across three key dimensions: criterion level, layer level, and token level. Our research uncovers significant differences in neuron coverage when LLMs process normal versus jailbreak queries, aligning with our clustering experiments. Leveraging these findings, we propose three practical applications of coverage criteria in the context of LLM security testing. Specifically, we develop a realtime jailbreak detection mechanism that achieves high accuracy (93.61 % on average) in classifying queries as normal or jailbreak. Furthermore, we explore the use of coverage levels to prioritize test cases, improving testing efficiency by focusing on high-risk interactions and removing redundant tests. Lastly, we introduce a coverage-guided approach for generating jailbreak attack examples, enabling systematic refinement of prompts to uncover vulnerabilities. This study improves our understanding of LLM security testing, enhances their safety, and provides a foundation for developing more robust AI applications.Keywords
All Related Versions
This publication has 17 references indexed in Scilit:
- Jailbreaking Black Box Large Language Models in Twenty Queries2025
- Defending ChatGPT against jailbreak attack via self-remindersNature Machine Intelligence, 2023
- CC: Causality-Aware Coverage Criterion for Deep Neural Networks2023
- Revisiting Neuron Coverage for DNN Testing: A Layer-Wise and Distribution-Aware Criterion2023
- Reducing DNN labelling cost using surprise adequacy: an industrial case study for autonomous driving2020
- Fuzz testing based data augmentation to improve robustness of deep neural networks2020
- Guiding Deep Learning System Testing Using Surprise Adequacy2019
- DeepGauge: multi-granularity testing criteria for deep learning systems2018
- DeepXplore2017
- ImageNet: A large-scale hierarchical image database2009