Language Model Jailbreak Testing for Harmful Prompt Robustness
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Large language models (LLMs) are not robust against adversarial inputs, leading to unwanted and potentially harmful outputs due to their training on biased and toxic web data, and existing alignment methods are insufficient to mitigate these issues.
Innovation Solution
A method and device for testing LLMs by providing harmful instructions with adversarial suffixes, using jailbreak strings and optimizing adversarial suffixes to determine harmful responses, enabling safe operation of computer-controlled machines.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If LLMs are trained on extensive web data to improve language understanding and generation capabilities, then the model's linguistic performance is improved, but the model becomes vulnerable to biased, toxic, and offensive content in outputs
Solution Approach 1:
The patent applies preliminary action by conducting adversarial testing before deploying the LLM in production environments. The testing framework proactively identifies vulnerabilities to harmful outputs by injecting adversarial suffixes and jailbreak strings into prompts, allowing developers to detect and mitigate issues before they affect real users. This preventive approach aligns with training the model on diverse data while preparing it for potential harmful scenarios.
Solution Approach 2:
The patent implements preliminary anti-action by using alignment techniques such as safety system prompting and fine-tuning based on human preferences to counteract the harmful effects of training data. These methods proactively establish safety constraints and ethical guidelines within the model, creating resistance against generating biased or toxic content even when exposed to adversarial inputs during operation.
2Object-affected harmful factors
If safety system prompting and fine-tuning are applied to align LLMs with human values, then harmful outputs to naive user prompts are reduced, but the models remain not robust to adversarial inputs
Solution Approach 1:
The patent applies feedback by implementing an iterative adversarial testing process that continuously evaluates the LLM's responses to adversarial inputs. The testing framework provides feedback on which adversarial suffixes and jailbreak strings successfully generate harmful outputs, allowing developers to refine alignment strategies and improve robustness. This closed-loop approach enables ongoing improvement of the model's resistance to adversarial attacks based on empirical evidence from systematic testing.
Solution Approach 2:
The patent implements dynamics by creating a dynamic testing framework that adapts to different types of harmful instructions and adversarial techniques. Rather than using static safety measures, the system dynamically generates and tests multiple adversarial suffixes, jailbreak strings, and prompt variations to comprehensively evaluate robustness. This dynamic approach ensures the model is tested against evolving adversarial strategies rather than fixed test cases.
3Reliability
If comprehensive adversarial testing with multiple harmful instructions and jailbreak strings is conducted, then robustness of LLMs is improved, but the testing complexity and computational resources required increase
Solution Approach 1:
The patent applies segmentation by dividing the comprehensive adversarial testing process into modular components: a dataset generation module that creates harmful instructions, a suffix generation module that creates adversarial suffixes, a jailbreak string module, and an evaluation module. This segmentation allows each component to be independently developed, tested, and optimized, reducing overall system complexity while maintaining comprehensive testing coverage through coordinated operation of the modules.
Data Source
Figure 1~2

AI summary
A device and a computer implemented method for testing a language model in particular for operating a computer-controlled machine, wherein the method comprises providing (200) a first harmful instruction from a dataset that comprises a plurality of harmful instructions, determining (204) a first adversarial suffix depending on the first harmful instruction, prompting (206) the language model to output a first response to a first input, wherein the first input comprises the first harmful instruction, and wherein the first input comprises the first adversarial suffix, providing (208) the first response of the language model, and determining (210), in particular depending on the first response, whether the first response is harmful or not.