LLM Test Case Generation for Induced Attack Security Evaluation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Large models in natural language processing and image recognition are vulnerable to malicious manipulation, leading to the generation of misleading content and security risks, limiting their widespread application.
Innovation Solution
A method for generating diversified test cases using a trained generative large model and induced attack techniques to simulate malicious inputs, automatically creating comprehensive and accurate test cases with labels to evaluate model security.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If manual test case generation and labeling methods are used, then labeling accuracy can be ensured, but productivity is low and time consumption is high
Solution Approach 1:
The system enables automated self-service test case generation through the large model that automatically creates test cases and generates corresponding labels without manual intervention, resolving the contradiction between productivity and time consumption by eliminating the need for manual labeling while maintaining high generation efficiency
Solution Approach 2:
The patent replaces the mechanical manual labeling process with an automated large model-based system that generates test cases and labels programmatically, substituting human labor with an AI-driven mechanism to achieve both high productivity and time efficiency
2Measurement precision
If diverse test cases are generated to cover more attack scenarios, then measurement precision of model security evaluation is improved, but device complexity increases
Solution Approach 1:
The large model serves multiple functions simultaneously: it generates test cases, creates labels, and adapts to various attack scenarios through a single unified system, achieving comprehensive security evaluation without proportionally increasing system complexity
Solution Approach 2:
The system achieves diverse test case generation by changing parameters such as attack types, input formats, and evaluation criteria within the large model framework, allowing comprehensive coverage of security scenarios while maintaining manageable system complexity through parameterized control
3Productivity
If automated test case generation is implemented, then productivity is improved, but manufacturing precision of test case quality may deteriorate
Solution Approach 1:
The system incorporates feedback mechanisms where the large model generates test cases and labels automatically, with the ability to refine and adjust output based on evaluation results, ensuring that automated generation maintains high quality and accuracy standards
Solution Approach 2:
The patent replaces manual labeling with an AI-based automated system that uses learned patterns and knowledge to generate accurate labels, achieving both high productivity and maintained precision through the capabilities of the large model
Data Source
AI summary
Embodiments of this specification disclose a test case generation method and apparatus, a storage medium, and an electronic device. First, evaluation seed data is obtained; and then, at least one induced attack technique is designed and selected with reference to a trained generative large model, a diversified test case set is generated by performing transformation processing on the evaluation seed data, and a case label of each test case in the test case set is automatically generated.


