A fuzz testing method for the evolution of deep learning image recognition models

By combining image mutation processing and generative adversarial networks, a fuzz testing method was designed to solve the problem of regression error detection in the evolution process of deep learning image recognition models. This method achieves efficient and diverse regression error detection, thereby improving the effectiveness of the test.

CN116363463BActive Publication Date: 2026-03-10TIANJIN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-06
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing deep learning image recognition models struggle to effectively detect regression errors during their evolution. Existing methods, such as DiffChaser, cannot generate images that trigger regression errors and lack realism and diversity, resulting in insufficient testing.

Method used

A fuzz testing method for deep learning image recognition model evolution is adopted. It utilizes an image mutation processing module, an image authenticity guarantee module based on adversarial generative networks, and a fuzz testing module. Through mutation rule selection, seed image pool maintenance, and adversarial generative networks, high-fidelity and highly diverse images are generated for regression error detection.

Benefits of technology

It improves the effectiveness of regression error detection, and the generated images can effectively trigger model errors, thereby improving the sufficiency and accuracy of the test and significantly increasing the number and diversity of regression errors detected.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116363463B_ABST
    Figure CN116363463B_ABST
Patent Text Reader

Abstract

This invention discloses a fuzz testing system and method for the evolution of deep learning image recognition models. The system includes an image mutation processing module, an image authenticity guarantee module, and a fuzz testing module. Step 1: Each time, a seed image is selected for image mutation processing, and the processed seed image is used as input to a generative adversarial network (GAN). Step 2: The trained GAN is used to filter real images. Step 3: Fuzz testing is performed, that is, the real images output by the GAN are iteratively input into the original image recognition model and the regression image recognition model to complete synchronous prediction. If the prediction results of the two models are different, the image triggers a regression error, and the image is collected; if the prediction results of the two models are the same, the image does not trigger a regression error. This invention can significantly filter out images with low authenticity, thereby improving the effectiveness of the test.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of deep learning image recognition and deep learning testing, and in particular to a testing method for deep learning image recognition models. Background Technology

[0002] I. Image Recognition

[0003] Image recognition refers to the process of identifying targets and objects with different attributes through technologies such as image processing, image analysis, and image understanding. Image recognition mainly includes two steps: image feature extraction and image classification prediction. Image feature extraction first requires image preprocessing to eliminate interference information and enhance target information, enabling deep learning models to more effectively acquire important image features. The image classification and recognition process relies on continuous training and learning to determine the category to which the image belongs based on features. Currently, image recognition has been applied in various fields such as facial recognition, autonomous driving, and smart healthcare. Some of these applications are closely related to human property and life safety; therefore, they should be thoroughly tested before being officially put into use.

[0004] II. Deep Learning Test

[0005] Deep Neural Network (DNN) models typically consist of multiple layers, each containing a large number of neurons. Neurons in different layers are connected by specific weights, which are obtained after multiple rounds of training on the training set. Deep learning testing is the most common method for ensuring the quality of DNNs, with test case generation being the most widespread application. Test case generation involves perturbing existing test cases to generate test cases that can trigger erroneous behaviors in the DNN model, thereby capturing defects in the DNN model and further improving the sufficiency of the test. In image recognition models, the test cases are images. The primary goal of testing image recognition models is to perturb existing images to confuse the model's judgment.

[0006] III. Regression Errors in Deep Learning Image Recognition Models

[0007] Similar to traditional software, deep learning systems also require continuous evolution and updates to meet ever-changing product demands or fix user-reported defects. Analogous to the evolution of traditional software, the evolution of image recognition models can be defined as follows: Given a fully trained image recognition model… Model evolution refers to the continuous modification of the current image recognition model to obtain a new model in order to achieve better performance (accuracy, robustness, fairness, or operational efficiency). This is done through methods such as retraining by modifying the training program, fine-tuning the model after updating the dataset, or directly modifying the model's weights. It is particularly important to pay attention to the evolution process of each pair of adjacent model versions. This is recorded as a model regression process, in which... This is called the previous version. This is called a regression model. While the evolution of deep learning systems brings new functions and features to image recognition models, it often introduces regression errors. Regression errors refer to errors that were not present in previous versions of the DNN model but are introduced into the new version due to the regression process. Therefore, in the context of the evolution of deep learning image recognition models, the process of finding regression errors can be viewed as the process of generating images that were correctly predicted in previous versions of the image recognition model but incorrectly predicted in the new version.

[0008] In traditional software, regression errors are typically introduced by minor evolutions and changes in the software. Therefore, detecting regression errors usually requires detailed testing and analysis at the points of difference between two versions of the program. However, this approach is unsuitable for image recognition models based on deep learning systems. This is because traditional software is composed of code logic, while deep learning systems consist of a large number of neurons and weights, lacking a clear logical structure. For deep learning systems, minor evolutions can lead to significant changes in neurons and weights between two versions, yet the overall accuracy (e.g., precision, recall) remains almost constant. This means that changes in neurons and weights do not accurately reflect model performance. Furthermore, changes in traditional software only affect a limited number of lines of code, while changes to neurons and weights in deep neural networks affect almost all neurons. This means that changes in neurons and weights cannot accurately reflect behavioral differences between deep learning systems. The significant differences between traditional software and deep learning systems mean that regression error detection methods for traditional software are not applicable to deep learning systems, making it necessary to design a regression error detection method suitable for deep learning systems.

[0009] Currently, several fuzz testing frameworks for testing defects in image recognition models have been applied, such as DeepHunter. This method aims to find defects in a specific version of the image recognition model, rather than regression errors between different versions. Furthermore, some deep learning testing frameworks are used to find inconsistencies in prediction results between compressed and compressed image recognition models. For example, DiffChaser attempts to generate images located on the decision edges of the original (or compressed) image recognition model, making these images more likely to trigger inconsistent predictions on both models. The purpose of this method in finding inconsistent decision-making behavior is similar to that in finding regression errors. However, DiffChaser still struggles to generate images that trigger regression errors for the following reasons: 1) DiffChaser does not consider the differences between the generated images and different versions of image recognition models; 2) DiffChaser ignores many cases where image recognition models make incorrect predictions with high confidence for images that reveal errors; 3) DiffChaser ignores the authenticity of images and the diversity of error revelation, thus significantly limiting the application scenarios of this method; 4) DiffChaser only considers one use case—compression—and has not verified the effectiveness of this method in other common regression scenarios.

[0010] In testing deep learning image recognition models, ensuring the realism of the error-detecting images is crucial. While low-realism images can trigger erroneous behaviors in image recognition models, these images are either outside the input domain of the model or unlikely to appear in real-world scenarios, thus overlooked by developers. Therefore, from a developer's perspective, high-realism images are more meaningful in practical applications during testing. Unrestricted mutation of the initial seed image can significantly impair its realism, making ensuring the realism of generated images extremely important. Existing technologies primarily use SSIM and Euclidean distance to measure image realism. SSIM uses pixel contrast and brightness values ​​to measure structural similarity, while Euclidean distance directly uses pixel distance to measure image similarity. Both methods heavily rely on pixel differences between images and are not applicable to certain mutation rules. For example, image scaling changes a large number of pixels but preserves almost all semantic information. Therefore, these metrics may discard a large number of high-realism images, limiting the ability of the testing framework to generate images that trigger different erroneous behaviors. Summary of the Invention

[0011] To address the shortcomings of the existing technology, this invention proposes a fuzz testing method for the evolution of deep learning image recognition models. This method enables fuzz testing of regression errors introduced during the evolution of deep learning image recognition models (DNN models), thereby improving the effectiveness of generating images that reveal regression errors.

[0012] This invention is achieved using the following technical solution:

[0013] A fuzz testing system for the evolution of deep learning image recognition models includes an image mutation processing module, an image authenticity guarantee module based on a generative adversarial network, and a fuzz testing module; wherein:

[0014] The image mutation processing module is used to perform image mutation processing on the seed image;

[0015] The image authenticity guarantee module is used to filter out authentic seed images;

[0016] The fuzz testing module is used to iteratively input real seed images into the original image recognition model and the regression image recognition model to complete synchronous prediction. If the prediction results of the two models are different, the seed image triggers a regression error and the seed image is collected; if the prediction results of the two models are the same, the seed image does not trigger a regression error.

[0017] A fuzz testing method for the evolution of deep learning image recognition models, comprising the following steps:

[0018] Step 1: Select a seed image each time for image mutation processing, and use the processed seed image as input to the generative adversarial network;

[0019] Step 2: Use the trained Generative Adversarial Network to filter real images;

[0020] Step 3: Perform fuzz testing, which involves iteratively inputting the real seed image output by the Generative Adversarial Network into the original image recognition model and the regression image recognition model to complete synchronous prediction. If the prediction results of the two models are different, the seed image has triggered a regression error, and the seed image is collected. If the prediction results of the two models are the same, the seed image has not triggered a regression error.

[0021] Compared with the prior art, the present invention can achieve the following beneficial technical effects:

[0022] This invention can efficiently generate images that trigger regression errors in image recognition models, which have strong error-detection capabilities, high error-detection diversity, and high realism. It fully explores the erroneous behaviors caused by regression errors in deep learning image recognition models, and significantly filters out images with low realism, thereby improving the effectiveness of the test. Attached Figure Description

[0023] Figure 1 This is an overall flowchart of a fuzz testing system (DRFuzz) for the evolution of deep learning image recognition models according to the present invention;

[0024] Figure 2 This is an overall flowchart of a fuzz testing method (DRFuzz) for the evolution of deep learning image recognition models according to the present invention;

[0025] Figure 3 A schematic diagram of a tree-like model for the mutation process of seed images;

[0026] Figure 4 This is a schematic diagram illustrating the specific implementation process of the present invention. Detailed Implementation

[0027] The technical solution will now be clearly described in conjunction with the accompanying drawings and embodiments.

[0028] The technical solution of this invention includes the following three points: (1) performing fuzz testing based on heuristic algorithms; (2) designing evaluation metrics for the diversity of generated images; and (3) achieving image authenticity assurance based on Generative Adversarial Networks (GANs). These three points are all innovative aspects of this invention, and the specific method flow is as follows: Figure 1 As shown.

[0029] like Figure 1 The diagram shown is a block diagram of a fuzz testing system for the evolution of deep learning image recognition models according to the present invention. The system includes an image mutation processing module 100, an image authenticity assurance module 200, and a fuzz testing module 300.

[0030] The image mutation processing module 100 is used to perform image mutation processing on the seed image;

[0031] The image authenticity guarantee module 200 is used to filter out authentic seed images;

[0032] The fuzz testing module 300 is used to iteratively input real seed images into the original image recognition model and the regression image recognition model to complete synchronous prediction. If the prediction results of the two models are different, the seed image triggers a regression error and the seed image is collected; if the prediction results of the two models are the same, the seed image does not trigger a regression error.

[0033] like Figure 2 The diagram shown is a flowchart of a fuzz testing method for the evolution of deep learning image recognition models according to the present invention. The process includes the following steps:

[0034] Step 1: Select a seed image each time for image mutation processing, and use the processed seed image as input to the generative adversarial network;

[0035] Step 2: Use the trained Generative Adversarial Network to filter real images;

[0036] Step 3: Perform fuzz testing, which involves iteratively inputting the real image output by the Generative Adversarial Network into the original image recognition model and the regression image recognition model to complete synchronous prediction. If the prediction results of the two models are different, the image has triggered a regression error and is collected; if the prediction results of the two models are the same, the image has not triggered a regression error.

[0037] Because the input space of image recognition models is enormous and regression errors are relatively hidden, searching the entire input space using random strategies to find images that trigger errors is highly inefficient. The improved fuzzing process aims to ensure that, in each iteration, the predicted difference generated by the mutated new image between the original and regression image recognition models is greater than that of the original image. For image recognition models, images are typically categorized according to task requirements (e.g., animal recognition models typically classify images as cats, dogs, etc.). In the regression testing process of the image recognition model, the predicted difference is measured by the change in the predicted probability of the image in each category. When the predicted difference accumulates to a large value, the regression image recognition model may make different predictions, indicating that the image has triggered a regression error. Therefore, a search strategy is designed to guide the image generation process towards amplifying the predicted difference between versions. In this way, images that trigger regression errors can be generated more effectively. Specifically, the fuzzing process includes two main steps: mutation rule selection and seed image pool maintenance.

[0038] Mutation rule selection: To apply perturbations to the image from different angles and increase the probability of the seed image triggering different regression errors, 16 mutation rules were selected. Different mutation rules change the image to different degrees, and are used to induce the seed image to trigger erroneous behaviors in different directions. If a mutation rule can frequently generate images with high realism and can amplify the prediction differences between different versions of the model, then the mutation rule can be selected more frequently during the fuzzing process. Therefore, the reward function Reward for the priority score of each mutation rule is designed as shown in formula (1):

[0039]

[0040] In the formula, #DiffTriggerInputs represents the number of images that trigger the difference in predictions between the two image recognition models, #FidelInputs represents the number of images with high realism generated, i.e., the number of images selected by the GAN-based realism guarantee module, and #TotalSelect represents the cumulative number of mutation rule selections. In actual operation, images whose realism scores after mutation rule perturbation are higher than their realism scores before perturbation are considered high-realism images.

[0041] The reward function has two objectives: first, to select mutation rules that result in significant differences in predictions between versions; and second, to select mutation rules that generate seed images with high fidelity. Based on the seed image generation in each iteration, each mutation rule is scored using formula (1), and the mutation rules are sorted in descending order of score to adjust the selection of subsequent mutation rules.

[0042] Seed image pool maintenance: The initial seed image pool stores images used to test the original image recognition model. To detect regression errors, the images in the initial seed image pool are preprocessed to filter out images that were incorrectly predicted by previous versions of the image recognition model. To further trigger more diverse regression errors, three techniques are proposed to further maintain the seed image pool: (i) image potential evaluation to retain images that are helpful in triggering regression errors; (ii) seed image probability update to select images that are more likely to trigger regression errors for subsequent iterations; and (iii) tree-based seed image pool pruning to remove redundant seed images that have been fully explored. Details are as follows:

[0043] (i) Image Potential Assessment: In each iteration, redundant images are filtered out, and images that have not triggered regression errors are placed into the seed image pool. Specifically, for the mutated images generated in the i-th iteration, if the predicted probability of one of the images in an unexplored incorrect label category changes drastically compared to the (i-1)-th iteration, it means that the image is more likely to trigger new erroneous behavior, and the image is placed into the seed image pool.

[0044] (ii) Seed image probability update: Compared with previous iterations, newly generated images are more likely to trigger regression errors. A decay function is used to continuously adjust the seed image probability update strategy for probability selection, so that subsequent higher-order mutations are more likely to be selected and the generated images trigger diverse error-revealing behaviors. Among them, the seed image update probability P is shown in formula (2):

[0045]

[0046] In the formula, N gN represents the number of mutations from the initial seed image to the current image. s The number of times the seed image is selected for mutation; w1 and w2 are weight parameters used to balance N. g and N s The impact of P init P represents the maximum probability before the decay time max_times. finish This represents the minimum probability after decaying through `max_times` times, where `max_times` is the maximum number of mutations allowed in the seed image. Empirically, `w1` is set to 1, `w2` to 0.5, and `α` is the exponential decay constant. The exponential decay constant affects the rate of decay and can be expressed by the formula... calculate.

[0047] The seed image probability update strategy indicates that as the number of times an image is selected increases, the hyperparameter N... s To control and reduce the probability of the selected image, the probability of newly generated images based on the selected image is increased. Furthermore, the diversity of the initial seed images needs to be considered during the iteration process, ensuring that the generated images are not limited to only a few original seed images. Therefore, the generation number of each generated image needs to be considered during the seed image probability update process to avoid the iteration process only prioritizing newly generated images. This is determined by the hyperparameter N in formula (2). g control.

[0048] (iii) Tree-based seed image pool pruning, i.e., deleting redundant seed images from the seed image pool to trigger more diverse erroneous behaviors. For example... Figure 2 The diagram illustrates the tree-like modeling of the seed image mutation process. The process of each image mutating from the initial seed image to the current image is modeled as a tree diagram. Because different mutation rules are used in each round of mutation, the resulting mutated images also differ. The root node is the initial seed image selected from the seed image pool. Each node represents a high-fidelity image generated during the fuzzing process. Each branch represents the mutation process performed on the image represented by its parent node. Specifically, sibling nodes in the tree are new images generated from the same seed using different mutation rules. If leaf node t3.1 triggers a regression error, the pruning algorithm traverses the mutation path from the root node to the leaf node, i.e., s→t1.1→t2.2→t3.1. Then, it sequentially evaluates whether each image represented by the corresponding node in this path is likely to trigger a new erroneous behavior. If leaf nodes t1.1 and t2.2 have the same prediction result in the second high confidence class of the regression model's predicted vector as t3.1, it means that t1.1 and t2.2 are more likely to cause the same erroneous behavior as t3.1, and therefore the images on that trajectory should be removed from the seed image pool.

[0049] Designing an evaluation metric for image diversity: In the fuzzing process, it is important to generate as many images as possible that trigger regression errors. Measuring the diversity of regression errors using initial seed images leverages the static information of the fuzzing process. However, if the generated images trigger repetitive errors, their contribution to model repair becomes very limited. Therefore, revealing different regression errors is crucial. However, since the root causes of regression errors in image recognition models are difficult to identify, the diversity of image-triggered regression errors is measured from two aspects, with the metric parameters including: (i) the number of initial seed images used to generate the triggering errors. If two triggering seed images come from different initial seed images, they are more likely to trigger different regression errors. Suppose that by performing a series of mutations on the initial seed images ta0 and tb0, two triggering images ta0 and tb0 are generated. i and tb j That is, (ta0→…→ta) i-1 →ta i ) and (tb0→…→tb j-1 →tb j If ta0 and tb0 are different, then ta i and tb j It is easier to trigger different regression errors; and (ii) information on the regression error behavior generated by the misidentified images. Specifically, if two misidentified images produce different error behaviors, then they are more likely to trigger different regression errors. (Previous version) For test input ta i The prediction class is represented as Current version To ta i The prediction class is represented as Assume ta i and ta j These are two images that triggered regression errors, both derived from the same initial seed ta0. and Explain ta i and ta j Exhibiting different erroneous behaviors and They are then likely to trigger different regression errors.

[0050] Based on the static information (initial seed image) and dynamic information (dynamic error behavior of the error-revealing image) mentioned above, tuples are used. The error-revealing images are differentiated, and tuple diversity is used to represent the diversity of regression errors triggered by the generated images. (ii) complements the static initial seed image information in (i) and more fully measures the diversity of regression errors triggered.

[0051] To obtain realistic images, a Generative Adversarial Network (GAN) is used for training. The specific process includes: employing a GAN to ensure the realism of the images. A GAN consists of a generator neural network and a discriminator neural network. During training, the generator generates fake images based on randomly initialized vectors. These generated images are then fed into the discriminator, which is responsible for distinguishing and identifying real images, further improving its ability to differentiate between generated fake images and corresponding original images in the training set. The GAN trains the discriminator and generator alternately to improve the performance of both models until the discriminator can no longer distinguish between generated and original images. At this point, the discriminator has the ability to filter out most of the fake images. The discriminator is used to ensure the realism of the generated images because it considers the semantic realism and similarity of the images, rather than simply pixel differences.

[0052] like Figure 4 The diagram shown illustrates a specific implementation process of the present invention. Specific embodiments of the present invention are described below:

[0053] The specific implementation environment of this embodiment includes: using the Python language and Keras 2.3.1 as the high-level deep learning library for the front end. It is implemented on an Intel(R) Xeon(R) machine with 125Gb RAM, a CPU model E5-2640v4 with 40 cores and a frequency of 2.40GHz, and the operating system used on this machine is Ubuntu 18.04.

[0054] like Figure 2 As shown, the specific implementation details of the present invention are as follows:

[0055] 1. Design of mutation rules

[0056] To ensure that image mutations do not significantly alter the image's semantics, 16 common metamorphic relationships were designed as mutation rules. Table 1 shows the image mutation rules.

[0057] Table 1

[0058]

[0059] Because each image mutation rule alters semantics to varying degrees, this invention designs a method for using each mutation rule. Observation reveals that, to better ensure the image's semantics remain unchanged, some mutation rules are suitable for modifying only a small portion of pixels to generate a new image, while others are suitable for applying to the entire image to avoid altering its semantics. Based on the application of each mutation rule, this invention categorizes existing mutation rules into two types: pixel-level mutation rules and image-level mutation rules. Pixel-level mutation rules aim to modify a subset of pixels in an image to generate a new image. This includes randomly selecting a small number of pixels (e.g., 0.5% of the total pixels) for minor modifications to ensure the image's semantics do not shift significantly. Image-level mutation rules aim to modify the entire image to generate a new image, including image scaling and rotation. Scaling and rotating the entire image is more likely to maintain image realism than scaling and rotating local pixels. To ensure the image's semantics do not shift, the DRFuzz method of this invention strictly limits the perturbation of the mutation rules, ensuring that the perturbation to the entire image remains at a small magnitude.

[0060] 2. Selection of Generative Adversarial Networks

[0061] The DRFuzz method of this invention employs the DCGAN model as the primary method for ensuring image realism based on Generative Adversarial Networks (GANs). The reasons are as follows: 1) DCGAN improves upon GANs in its model structure, where deep convolutional structures can extract and represent image features more precisely, enabling the generator to generate highly realistic "fake" images, thereby further training the recognizer's ability to distinguish between real and fake images. 2) Compared to more complex GAN-based Generative Adversarial Networks, DCGAN is more efficient in both prediction and training. This means that applying DCGAN can introduce less overhead into the fuzz testing process.

[0062] In the use of DCGAN, this method first preprocesses the images in the training set, normalizing the pixel values ​​of each image to the range [0,1]. This preprocessing helps accelerate model training, enabling it to converge more quickly and improving training performance. This patent uses the training set of the original model as the training set for DCGAN. During training, the generator synthesizes an image from a randomly initialized vector. The recognizer takes the synthesized image (labeled 0 to indicate it is a "fake" image) and images in the training set (labeled 1 to indicate they are "real" images) as input. For each given input, a well-trained recognizer can output a score in the range [0,1], where a higher score indicates a higher degree of realism for the given image and a closer semantic similarity to the images in the training set. The use of DCGAN can significantly filter out images with low realism, thereby improving the effectiveness of the test.

[0063] The DRFuzz system and method of this invention generate images with strong error-detecting capabilities through a heuristic-based fuzzing test process. A new diversity metric is proposed to measure the diversity of the generated images, and a realism guarantee method based on Generative Adversarial Networks (GANs) is used to ensure image realism. Experiments demonstrate that this method can effectively detect regression errors in deep learning image recognition models, thereby improving test sufficiency.

[0064] To verify the effectiveness of the DRFuzz system and method of this invention, and to scientifically analyze the experimental results, this invention utilizes 20 sets of experimental image recognition datasets and models, including MNIST and CIFAR-10, to verify its effectiveness. The verification results are as follows:

[0065] Table 2 shows all the deep learning models and test sets used for validation. These include four test sets (MNIST, CIFAR-10, Fashion-MNIST, SVHN), four deep learning models (LeNet, VGG, AlexNet, ResNet), four regression scenarios (supplementary training, adversarial training, model repair, and model pruning), and two adversarial examples (BIM and C&W). Four metrics were selected to measure the generation of error-revealing images: the number of images triggering regression errors (RFI); the number of different regression errors triggered by the error-revealing image (RF); the number of initial seed images covered by the error-revealing image (Seed); and the error found by the error-revealing image in the regression model (GF).

[0066] Table 2

[0067]

[0068]

[0069] Table 3 shows a comparison of image generation performance as the overall experimental results. The validation results of the DRFuzz system and method of this invention demonstrate that they outperform other comparative methods (e.g., DiffChaser and DeepHunter) across all 20 items * 4 metrics. Compared to the DiffChaser method, the DRFuzz system and method of this invention generates an average of 204% more RFIs and an average of 1,177% more different RFs. Compared to DeepHunter, the DRFuzz system and method of this invention generates an average of 1,130% more RFIs and an average of 539% more different RFs. Furthermore, the DRFuzz system and method of this invention explores an average of 6,725 initial seed images, while the images generated by DiffChaser and DeepHunter cover an average of only 911 and 1,601 initial seed images, respectively. The DRFuzz system and method of this invention achieves an average improvement of 638% and 320% over DiffChaser and DeepHunter, respectively. Furthermore, from the perspective of finding the number of GFs, the DRFuzz system and method of this invention achieve an average improvement of 787% compared to DeepHunter. The above experimental results demonstrate the effectiveness of the DRFuzz system and method of this invention.

[0070] Table 3

[0071]

[0072]

[0073] To further verify the effectiveness of DRFuzz-generated images in improving model performance, images generated by each method were divided into two parts at a ratio of 10%:90%. The regression model was trained on 10% of the error-revealing images found by each method, and cross-validated on the remaining 90%. Experiments verified whether the error-revealing images generated by the DRFuzz system and method of this invention can: 1) correct the model's own regression errors; 2) correct regression errors found by other comparative methods. Figure 1 shows a comparison of the fine-tuning effects. Table 4 shows the experimental results. Overall, fine-tuning the model on images revealing regression errors generated by the DRFuzz system and method of this invention can, on average, correct 77.72%–87.03% of regression errors detected by the DRFuzz method of this invention, 52.26%–80.68% of regression errors detected by DiffChaser, and 66.63%–79.88% of regression errors detected by DeepHunter. When using images revealing regression errors generated by DeepHunter for model fine-tuning, only 53.99%–64.12% of the regression errors detected by the DRFuzz system and method of this invention, and 55.13%–71.84% of the regression errors detected by DiffChaser, can be corrected. Conversely, when using images revealing regression errors generated by DiffChaser for model fine-tuning, only 48.52%–58.84% of the regression errors detected by the DRFuzz system and method of this invention, and 49.62%–60.39% of the regression errors detected by DeepHunter, can be corrected. Furthermore, using images revealing regression errors generated by the DRFuzz method of this invention for model fine-tuning can keep the accuracy in a relatively stable state, minimizing the impact of the fine-tuning process on the accuracy of the regression model on the test set.

[0074] Table 4

[0075]

[0076]

[0077] Based on the embodiments of this invention, all other embodiments and technical substitutions of the embodiments obtained by those skilled in the art without departing from the spirit of this invention and without creative effort will fall within the scope of protection of this invention.

Claims

1. A fuzzy testing system for deep learning image recognition model evolution, characterized in that, The system comprises an image variation processing module, a picture authenticity guarantee module and a fuzz testing module; wherein: The image variation processing module is configured to perform image variation processing on the seed pictures; wherein the image variation processing comprises 16 predefined variation rules, which are classified into pixel-level variation rules and image-level variation rules, and the variation amplitude is limited to not changing the semantics of the pictures; The picture authenticity guarantee module is configured to perform real picture filtering using a generative adversarial network, wherein the generative adversarial network comprises a generator and a discriminator, and the discriminator outputs a realness score, and only pictures with a realness score higher than a preset threshold are retained; The fuzz testing module is configured to iteratively input real seed pictures into an original picture recognition model and a regression picture recognition model to complete synchronous prediction, and if the prediction results of the two models are different, it is determined that the seed picture triggers a regression error and is collected; if the prediction results of the two models are the same, the seed picture does not trigger a regression error, and the fuzz testing module further comprises a tree-based seed picture pool pruning operation for removing redundant seed pictures to trigger diverse error behaviors.

2. The fuzzy testing system for deep learning image recognition model evolution of claim 1, wherein, The fuzz testing module further comprises variation rule selection and seed picture pool maintenance.

3. The fuzzy testing system for deep learning image recognition model evolution of claim 2, wherein, A reward function for a priority score of each variation rule As shown in equation (1): (1); In the formula, #DiffTriggerInputs represents the number of seed pictures triggering the prediction difference of the two image recognition models, and #FidelInputs represents the number of generated high-fidelity seed pictures; According to the seed picture generation condition of each iteration, score each variation rule using formula (1), and arrange the variation rules in descending order according to the scores to adjust the selection of subsequent variation rules: first, select variation rules that cause a prediction difference between versions greater than a preset threshold, and second, select variation rules that generate seed pictures with a realness higher than a preset threshold.

4. The fuzzy testing system for deep learning image recognition model evolution of claim 1, wherein, The maintenance of the seed picture pool further comprises three processes: (i) picture potential evaluation to retain pictures that help trigger regression errors; (ii) seed picture probability updating to select pictures with a trigger probability higher than the average for subsequent iteration processes; and (iii) tree-based seed picture pool pruning to remove redundant seed pictures that have been fully explored. In the fuzz testing module, the index parameters for measuring the diversity of pictures triggering regression errors include: (i) the number of initial seed pictures for generating trigger errors; and (ii) regression error behavior information generated by the revealing pictures.

5. The fuzzy testing system for deep learning image recognition model evolution of claim 1, wherein, The seed picture update probability As shown in equation (2): (2); wherein is the number of mutations from the initial seed picture to the current picture, is the number of times the seed picture was selected for mutation, and is a weight parameter, is the decay is the maximum probability is the decay is the minimum probability is the maximum number of mutations allowed to occur for the seed picture, is an exponential decay constant.

6. The fuzzy testing system for deep learning image recognition model evolution of claim 1, wherein, The picture authenticity guarantee module uses the generative adversarial network for training, and in the training process, the generator generates fake pictures according to a randomly initialized vector, and inputs the generated pictures into the discriminator to obtain real pictures.

7. The fuzzy testing system for deep learning image recognition model evolution of claim 1, wherein, The method comprises the following steps:

8. The method of claim 1, wherein the method is used for a deep learning image recognition model evolution oriented fuzz testing. Step 1: select one seed picture at a time for image variation processing, and use the processed seed picture as the input of the generative adversarial network; Step 2: use the trained generative adversarial network to perform real picture filtering; ​ Step 3, perform the fuzzy test, that is, iteratively input the real picture output by the adversarial generation network into the original picture recognition model and the regression picture recognition model respectively to complete synchronous prediction, if the prediction results of the two models are different, the picture triggers the regression error, and the picture is collected; if the prediction results of the two models are the same, the picture does not trigger the regression error.

Citation Information

Patent Citations

  • Fuzzy test method adopting region-based neuron selection strategy and terminal

    CN113986717A

  • Generative adversarial network-based AFL seed optimization method and system

    CN115391787A