LLM Test Case Generation for Induced Attack Security Evaluation

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvetest case generation efficiencyVSAvoidtime consumption for test case generation
Core Design Contradiction:
ProductivityVSLoss of time

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

Inventive Principle:
Principle #25Self-service

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

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

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

Engineering Contradiction:
Improvesecurity evaluation comprehensivenessVSAvoidtest case generation system complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

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

Inventive Principle:
Principle #6Universality (Multi-functionality)

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

Inventive Principle:
Principle #35Parameter changes

3Productivity

If automated test case generation is implemented, then productivity is improved, but manufacturing precision of test case quality may deteriorate

Engineering Contradiction:
Improvedata preparation efficiencyVSAvoidtest case labeling accuracy
Core Design Contradiction:
ProductivityVSManufacturing precision

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

Inventive Principle:
Principle #23Feedback

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

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS20250371165A1Test case generation method and apparatus, storage medium, and electronic device
Publication Date: 2025.12.04 ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
  • US20250371165A1 patent drawing
  • US20250371165A1 patent drawing
  • US20250371165A1 patent drawing

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.