A method to improve network model performance based on optimizing training sample quality
By generating adversarial samples based on the guid-Xmage interpretive method and building a new training set, the problems of high computing resource consumption and unstable generalization capabilities of convolutional neural network models when optimizing performance are solved, and the accuracy and resilience of the model are improved. Awesome effect and improve the model's migration.
Patent Information
- Application Number
- CN202411151695.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-08-21
AI Technical Summary
The prior art faces problems such as high computing resource consumption, difficulty in selecting hyperparameters, unstable generalization ability, poor interpretability and poor migration when optimizing the performance of convolutional neural network models.
By inputting the original training set into the target network, a significant graph is output for each original training sample based on the guid-Xmage interpretive method. The background pixels of the original training sample are monotonicly reduced and iteratively tampered with the background pixels of the original training sample based on the significance graph, generating contributions with weakened background classification Adversarial samples of value functions and build a new training set to improve network model performance.
The accuracy and robustness of the network model are improved, and the optimized training samples are transferable, which can better adapt to different tasks and fields.
Smart Images

Figure CN118981641B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of deep learning technology, and in particular relates to a method for improving network model performance based on optimizing training sample quality. Background Art
[0002] Generally speaking, the performance of convolutional neural network models, such as accuracy and robustness, is mainly determined by the structure of the network and the quality of the training set.
[0003] In the research field of optimizing network structure to improve network performance, many outstanding methods have been proposed. For example, network pruning technology is used to reduce the network size by removing redundant connections or parameters, and improve the network's operating efficiency and generalization ability. Network distillation technology is used to improve the performance of student networks by training on a larger and slower teacher network and then transferring its "knowledge" to a smaller and faster student network. Network ensemble technology is used to improve performance and generalization ability by integrating multiple networks with different structures or the same structure but different initialization. Although the method of optimizing network structure to improve network performance can achieve significant improvements, it also faces some shortcomings and difficulties. First of all, this type of method consumes a lot of computing resources, especially some optimization methods require a lot of computing resources and time, especially in methods such as neural structure search that require a lot of experiments. Secondly, it is difficult to select hyperparameters. Optimizing network structure usually requires adjusting many hyperparameters, such as learning rate, regularization parameter, etc. Selecting a suitable hyperparameter combination is a difficult task. Moreover, the generalization ability of the enhanced model is unstable. Optimizing the network structure may cause the network to perform well on the training set, but poorly generalize on the test set, resulting in overfitting problems. In addition, the model has poor interpretability. The network structure obtained by some optimization methods may be complex, making it difficult to explain the feature extraction and decision-making process, reducing the interpretability of the model. The data requirements are high. Some methods require a large amount of training data to effectively optimize the network structure, which may not be suitable for tasks with scarce data. This enhanced model has poor transferability. Some optimized network structures have poor transferability between different tasks or fields and cannot adapt well to new tasks or data.
[0004] In addition to optimizing the network structure, methods for optimizing the quality of the training set are of great significance in improving the performance of the network model. Traditional data enhancement methods are still widely used. Among them, traditional methods such as scaling, rotating and changing the background of training samples are common and effective means. Through these methods, the diversity of training data can be increased and the generalization ability of the model for different scenarios can be improved. The scaling operation enables the model to learn features at different scales, thereby increasing the robustness of the model. The rotation operation enables the model to learn the representation of objects at different angles, which helps to improve the model's adaptability to rotation transformations. At the same time, changing the sample background can increase the complexity of the data and enable the model to better adapt to complex real-world scenarios. In addition to traditional methods, many novel data enhancement methods have been proposed, such as random cropping, color distortion, blurring, etc. These methods can further enrich the training data and improve the generalization ability and robustness of the model. However, the traditional methods for optimizing the training set are essentially based on increasing the number of samples as the basis for optimizing the training samples. There is no clear optimization goal and there is a certain degree of arbitrariness. Often, the number of newly added training samples needs to reach a certain number to achieve the goal of improving the performance of the network model. And some methods may change the content or features of the image, making the model's prediction results difficult to explain and understand, reducing the interpretability of the model. Summary of the invention
[0005] In order to solve the above technical problems, the present invention proposes a method for improving the performance of a network model based on optimizing the quality of training samples, so as to solve the problems existing in the above prior art.
[0006] To achieve the above object, the present invention provides a method for improving network model performance based on optimizing training sample quality, comprising:
[0007] Inputting an original training set into a target network, and outputting a corresponding saliency map for each original training sample based on a guid-Xmage interpretative method; the original training set includes a plurality of original training samples;
[0008] Based on the saliency map, background pixels of the original training sample are iteratively tampered with in different tampering intensity ranges in a monotonically decreasing manner to obtain adversarial samples with a function of weakening background classification contribution values;
[0009] A new training set is constructed based on the adversarial samples and the original samples, and the performance of the network model is improved based on the training set.
[0010] Optionally, the process of outputting a corresponding saliency map for each original training sample based on the guid-Xmage interpretive method includes:
[0011] Building a symbolic model based on the original training samples;
[0012] Extracting weights corresponding to symbolic variables in the symbolic model;
[0013] Constructing a pixel weight matrix based on the weights;
[0014] Performing a dot multiplication on the pixel weight matrix and the pixel value of the original training image to obtain a pixel classification contribution value matrix;
[0015] A saliency map corresponding to the original training sample is obtained based on the pixel classification contribution value matrix.
[0016] Optionally, the process of constructing a symbolic model based on the original training sample includes:
[0017] Inputting the original training sample into the target convolutional neural network to obtain a target network model, and recording execution trajectory information;
[0018] A symbolized image is defined based on the original training sample, and the symbolized image accurately executes the trajectory information to obtain a symbolized model.
[0019] Optionally, the expression of the symbolic model is:
[0020]
[0021] In the formula, is a symbolic model, Z is a symbolic image, is a symbolic variable in the symbolic image Z, i and j represent symbolic variables The corresponding pixel x ij ∈X, k is the kth channel of the input real image X, and ρ is an AND symbol variable An irrelevant constant representing the cumulative value of the bias in the target network model f(X), is an element in the pixel weight matrix, S indicates that the current f(Z) is a symbolic model obtained based on the original network model, and t indicates that the t-th classification branch is the target of symbolic execution.
[0022] Optionally, the pixel values at the same position of different channels in the pixel classification contribution value matrix are summed and a maximum and minimum normalization operation is performed to obtain a corresponding distribution map.
[0023] Optionally, the pixel classification contribution value matrix is processed based on a piecewise averaging method to obtain a saliency map corresponding to the original training sample.
[0024] Optionally, the process of obtaining the adversarial sample based on tampering includes:
[0025] Calculate the category label of the original image and initialize the perturbation intensity range and iterative tampering steps for each element in the original image;
[0026] Determine the contribution of each element based on the classification contribution value matrix to obtain the tamperable element;
[0027] The tamperable element is tampered to obtain an element value, and the element value is limited to obtain a tampered image of this round;
[0028] Calculate the category label of the tampered image in this round;
[0029] Compare the category label of the tampered image in this round with the category label of the original image. When the two category labels are different, the tampering is successful and the adversarial sample is obtained; when the two category labels are the same, the tampering fails and the next round of tampering is performed.
[0030] Optionally, the calculation formula for tampering the tamperable element is:
[0031]
[0032] In the formula, Indicates the tampered element value. represents the element in the original image, and λ represents the step size of iterative tampering.
[0033] Compared with the prior art, the present invention has the following advantages and technical effects:
[0034] The present invention inputs the original training set into the target network, and outputs the corresponding saliency map for each original training sample based on the guid-Xmage interpretive method; the original training set includes a plurality of original training samples; the background features of the original training samples are tampered with based on the saliency map to obtain counter-example samples; a new training set is constructed based on the counter-example samples and the original samples, and the performance of the network model is improved based on the training set, so that the accuracy and robustness of the network model can be improved, and the optimized training samples are transferable.
[0035] The training set generated by the method for optimizing training samples proposed in the present invention has knowledge transferability and can be widely used in industrial methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0037] Figure 1 is a flow chart of a method according to an embodiment of the present invention;
[0038] Figure 2 This is a general distribution diagram of the classification values y and y' output by the convolutional neural network model f(X) according to an embodiment of the present invention for different input images X and X'. DETAILED DESCRIPTION
[0039] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0040] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0041] Embodiment 1
[0042] Thanks to its excellent classification performance in the field of image recognition, the convolutional neural network model has been widely used in civil and military fields in my country, such as intelligent manufacturing, disaster identification, weapon aerial image recognition, radar information assisted decision-making and other fields. The performance of a convolutional neural network model applied to actual scenarios, such as accuracy and robustness, is often determined by the quality of training samples and network structure. In the research field of optimizing network structure to improve network performance, many outstanding optimization methods have been proposed, such as residual modules, attention mechanisms, etc., and based on the proposed optimization methods, network models with outstanding performance, such as ResNet, DenseNet and other network models have been widely used to undertake different image classification tasks. Compared with optimizing the network structure, the present invention takes improving the quality of training samples as the research goal, and designs and implements a method for improving the performance of convolutional neural models by optimizing training samples based on the proposed explanatory method guid-Xmage.
[0043] The present invention mainly includes a method for generating optimized training samples based on the guid-Xmage interpretive method and using the optimized training samples as a supplement to the model training set, which can effectively improve the performance of the model. The method includes the following steps: inputting the original training set into the target network, outputting the corresponding saliency map for each original training sample based on the guid-Xmage interpretive method; the original training set includes a number of original training samples; based on the saliency map, the background pixels of the original training samples are monotonically and iteratively tampered within different tampering intensity ranges to obtain adversarial samples with the function of weakening the background classification contribution value; constructing a new training set based on the adversarial sample and the original sample, and improving the network model performance based on the training set.
[0044] This embodiment discloses a method for improving network model performance based on optimizing training sample quality. The method relies on the weights of a convolutional neural network model, uses symbolic execution technology, and optimizes the quality of training samples to improve network model performance based on a proposed precise interpretability method (guid-Xmage) with pixel-level interpretability. The calculation process is as follows: Figure 1shown.
[0045] The original training set is input into the target network, and the corresponding saliency map is output for each original training sample based on the guid-Xmage interpretability method, which specifically includes the following:
[0046] A symbolic model is constructed based on the original training samples; wherein the original training samples are input into the target convolutional neural network to obtain the target network model, and the execution trajectory information is recorded; a symbolic image is defined based on the original training samples, and the symbolic image accurately executes the trajectory information to obtain the symbolic model. The specific implementation process includes the first step of inputting a real image X to drive the target convolutional neural network model f(X) to execute, and at the same time obtaining and recording the execution trajectory information of each step of the input image X in the target network model f(X), such as the size relationship of the output value of the ReLU function and the position of the maximum value selected by the maximum pooling (max-pooling). The second step is to define a symbolic image Z of the same size as the input image X, and use the recorded execution trajectory information of the input image X as a guide to accurately execute the target network model f(X) using the symbolic image Z. The third step is to assume that the t-th classification branch of the target network model f(X) is the target of symbolic execution, and based on the result of precise symbolic execution, obtain a symbolic image that is consistent with the target network model f t (x) Symbolic model of execution trajectory equivalence See expression (1), where: is a symbolic variable in the symbolic image Z, i and j represent symbolic variables The corresponding pixel x ij ∈X, k is the kth channel of the input image X, and ρ is an AND variable The unrelated constant represents the accumulated value of the bias in the target network model f(X).
[0047] like Figure 2 As shown in the figure, when using the training data set to train the CNN model, the gradient concept in the nonlinear function is used to provide direction for the gradual refinement of the weights and biases in the CNN model, so that the classification value output by the trained CNN model tends to be nonlinear in general; when the CNN model takes images with different similarities as input, it shows a monotonically increasing or decreasing trend in the local interval. According to the monotonically increasing or decreasing trend of certain local intervals, it can be inferred that: if multiple pixel values in the input image X are weakly perturbed at a certain intensity, the trained CNN model f(X) takes the perturbed image X' as input, and the output classification value y' should match the classification value y of the original input image X under a certain classification branch. Figure 2The scene shown in (a) or (b), where (a) is the distribution trend of the classification value y' in the increasing scene when the contribution of the perturbed pixel to the classification value is positive; (b) is the distribution trend of the classification value y' in the decreasing scene when the contribution of the perturbed pixel to the classification value is negative.
[0048] Extract the weights corresponding to the symbolic variables in the symbolic model, and construct a pixel weight matrix based on the weights. The specific implementation process includes the fourth step, extracting the symbolic model Symbolic variables The corresponding weight And the extracted weights As a basis, a pixel weight matrix Δ with the same size and number of channels as the input image X is constructed.
[0049] The pixel weight matrix and the pixel values of the original training image are dotted to obtain the pixel classification contribution value matrix, and the saliency map corresponding to the original training sample is obtained based on the pixel classification contribution value matrix. The specific implementation process includes the fifth step, the pixel weight matrix Δ is dotted with the pixel value of the input image X to obtain a pixel classification contribution value matrix A, and then the pixel values at the same position of different channels of the pixel classification contribution value matrix A are summed and the maximum and minimum normalization operations are performed, and a distribution map is output at the same time for visualizing the relative relationship of the pixel classification contribution values. In addition, in order to facilitate the observation of data, based on the idea of piecewise equalization, a saliency map is output to clearly explain the classification basis of the input image X.
[0050] The adversarial sample is obtained by tampering the background features of the original training sample based on the saliency map, which specifically includes the following contents:
[0051] In the sixth step, based on the guidance of the saliency map, one or more adversarial samples with the same object features as the original training samples and the function of weakening the background classification contribution value are obtained by tampering with the background features of the original training samples. Then, the sample set composed of the obtained adversarial samples and the original training samples is used as the new training set to achieve the goal of optimizing the training samples.
[0052]
[0053] Construct a new training set based on adversarial samples and original samples, and improve the performance of the network model based on the training set.
[0054] The main theoretical basis for the present invention to improve the performance of the convolutional neural model by optimizing the training samples is: the relationship between the pixel value in an input image and the classification value output by the network model is accurately interpreted, and the classification basis of the input image can be clearly obtained. If the classification basis of multiple input images is statistically analyzed, the defects and deficiencies of the classification knowledge carried by the network model can be known. Based on this, the purpose of improving the performance of the network model such as accuracy and robustness can be achieved by correcting the quality of the training samples in a targeted manner. By analyzing the saliency map of the original training sample, it can be known that the background has both positive contribution values and negative contribution values to the classification value of the target network model. This result shows that the calculation basis of the target network model for classifying the input image is jointly determined by the object features and the background features, that is, the target network model learns both the object features and the background features during training and learning. If the classification behavior of a convolutional neural network model focuses too much on the background features, the classification behavior of this network model is easily interfered by the background, and the accuracy and robustness are often at a low level.
[0055] The core idea of the present invention to improve the performance of the target convolutional neural network model, such as accuracy and robustness, is to optimize the training samples so that the target network model learns as many object features as possible and learns less background features in the training set composed of the optimized samples. In other words, the target network model makes the background interfere with the classification behavior of the target network model as little as possible by relearning on the optimized training set, that is, relative to the object features, the positive contribution value and the reverse contribution value of the background features in the contribution value of the target network model classification value are both at a small level. In order to achieve the goal of optimizing the training samples, the present invention takes the samples in the original training set of the target network model as input, uses the proposed explanatory method guid-Xmage to output a corresponding saliency map for each original training sample, and obtains one or more adversarial samples having the same object features as the original training samples and having the function of weakening the background classification contribution value by tampering with the background features of the original training samples based on the guidance of the saliency map, and then uses the sample set composed of the obtained adversarial samples and the original training samples as a new training set, so as to achieve the goal of optimizing the training samples. The adversarial sample generation algorithm with reduced background classification contribution value is as follows.
[0056]
[0057]
[0058] For the original image X, input the target convolutional neural network model f(X) to calculate the category label of the original image Specifies each element in the image The perturbation intensity range ε∈(l,u], the step size of each iterative tampering is λ, first locate all the pixels belonging to the background area of the original image, then query the corresponding position in the pixel classification contribution value matrix to see whether the element contributes positively or negatively to the classification, and record the positions of all elements in the background area that contribute positively to the classification. These are the tamperable elements. Then tamper with all tamperable elements, and the tampering method is Then the tampered element value Limited to Then, the tampered image X' obtained in this round is detected to see if it is the same as the input image in this round, and the tampered image X' is input into the target convolutional neural model to calculate the category label. If they are the same, then the two images are identical and The tampering failed; if the two images are different and It means the tampering is successful, and the current image X' is the final tampered image; if the two images are different and Then proceed to the next round of tampering.
[0059] The method for optimizing the quality of training samples proposed in the present invention is essentially different from the traditional method of sample scaling or sample rotation and the method of randomly changing the background, which is mainly manifested in that the essence of the traditional method of optimizing the quality of training samples is to increase the number of training samples as the basis for optimizing the training samples, without a clear optimization goal, and there is a certain degree of arbitrariness. The generated new training samples often cannot accurately weaken the classification calculation behavior of the network model that focuses too much on background features. Often, the newly added training samples need to reach a certain number to achieve the goal of optimizing the performance of the network model. Compared with the traditional method, the method proposed in the present invention is based on the classification basis of the input image. For each adversarial sample generated, the object features remain unchanged relative to the original training sample. The only part that changes is the background, and the classification value of the background output by the target network model is reduced. Therefore, using the sample set composed of the adversarial sample and the original training sample as a new training set can achieve the goal of weakening the classification behavior of the network model that focuses too much on background features. For example, assuming that the expression l=p+q represents a fitting calculation of the target network model, where: l is the label of the training sample, p is the fitting value of the object, and q is the fitting value of the background. Since the new training sample has the same object features as the original training sample, the two have the same label. When the fitting value q of the background in the new training sample decreases relative to the original training sample, the fitting value p of the object can only increase to keep the new sample and the original training sample having the same label. Based on the above conclusions, it can be seen that the method for optimizing the quality of training samples proposed in the present invention is a method with an optimization goal. In practical applications, if an equal amount of adversarial samples are added while improving the original training samples, the target network model can be effectively made to focus more on the object features during the training and learning process. Based on this, not only the accuracy of the network model can be improved, but also the robustness of the network model can be improved. It is a practical method to improve the performance of the network model.
[0060] In order to objectively and systematically verify the ability of the proposed method for improving the accuracy and robustness of the convolutional neural network model based on the optimization of training samples, based on the public dataset CIFAR-10 widely used in computer vision tasks and different convolutional neural network model structures such as AlexNet, DenseNet and ResNet, the present invention has carried out a large number of experiments to objectively evaluate the performance of the designed method for improving the robustness of the convolutional neural network model, such as effectiveness (availability) and transferability (transferability). The evaluation process is as follows: first, the adversarial sample with the function of weakening the background classification contribution value is used as a supplement to the original training sample, and an optimal (top-1) convolutional neural network model f(X) is retrained; then, white-box attack methods with strong attack capabilities and representativeness, such as C&W and PGD, are selected as attack methods to attack the retrained convolutional neural network model f(X); finally, the attack success rate of the C&W and PGD methods in the retrained convolutional neural network model is statistically analyzed, and the performance of the designed method for improving the robustness of the convolutional neural network model is evaluated based on the statistical attack success rate. In particular, in order to fully demonstrate the performance of the method designed by the present invention to improve the adversarial robustness of the convolutional neural network model, the experiment conducted also compared and evaluated the adversarial training method designed by the present invention with the existing representative method MI-FGSM in terms of robustness, accuracy and transferability. The convolutional neural network model and evaluation samples used in the experiment are as follows:
[0061] (1) Original model f 0 (X): Based on the AlexNet network model structure, using the original training set of CIFAR-10, an optimal (top-1) convolutional neural network model is obtained after 40 rounds (epochs) of training.
[0062] (2) Attack sample: Using the original network model f 0 (X) is used as the target convolutional neural network model, and the original test sample X of CIFAR-10 is used as the input of the attack method. The existing attack methods C&W and PGD are used in an untargeted attack mode to attack ||X'-X|| ∞ The adversarial sample X' generated within the norm has the smallest difference with the original test sample X.
[0063] (3) Accuracy test samples: the original test set in CIFAR-10.
[0064] (4) Adversarial samples with the function of weakening the background classification contribution: 0(X) is used as the target network model. According to the method of generating adversarial samples with the function of weakening the background classification contribution value, each original training sample in CIFAR-10 is used as input to generate a series of adversarial samples X' under different tampering strengths ε∈(0,1 / 3], ε∈(1 / 3,2 / 3] and ε∈(2 / 3,1] constraints, where the step size λ is 0.01.
[0065] The comparative evaluation results of the adversarial robustness, accuracy and transferability of adversarial training samples of the convolutional neural network model after adversarial training are shown in Tables 1, 2 and 3. Table 1 shows the adversarial robustness evaluation comparison results of the AlexNet model retrained by the adversarial training method designed by the present invention and the existing MI-FGSM adversarial training method in the attack methods C&W and PGD, where: 0 (X) is the original model, f 2500 (X), f 5000 (X), f 7500 (X) and f 10000 (X) represents the adversarial samples with the function of weakening the background classification contribution or the adversarial samples generated by the existing method MI-FGSM randomly added to each category in the original training set of CIFAR-10, and an optimal (top-1) model is obtained after more than 40 rounds (epochs); Tables 2 and 3 are respectively based on the original model f 0 (X) is the basis for the comparison of the transferability evaluation results of the adversarial samples generated by the adversarial training method designed by the present invention and the existing MI-FGSM adversarial training method in ResNet and DenseNet network structures, wherein: the ResNet model and DenseNet model in the experiment are the optimal (top-1) models obtained after more than 40 epochs of training; in the experiment, the number of attack samples of the attack methods C&W and PGD is 500 in each category, and the test samples with the same accuracy are the same as the original test samples of CIFAR-10.
[0066] Table 1
[0067]
[0068] Table 2
[0069]
[0070]
[0071] Table 3
[0072]
[0073] By observing the experimental results shown in Table 1, it can be seen that: as more adversarial samples are added as a supplement to the original training samples, the attack success rates of the attack methods C&W and PGD are significantly reduced in the different AlexNet models obtained by retraining. This experimental result shows that the adversarial training method designed by the present invention and the existing adversarial training method IM-FGSM can both improve the adversarial robustness of the convolutional neural network model. In particular, compared with the existing adversarial training method MI-FGSM, the adversarial training method designed by the present invention enables the different retrained AlexNet models to not only obtain stronger robustness, but also, as shown in Table 1, enables the retrained models to have more robust accuracy. For example: as more adversarial samples are added to the original training samples, the adversarial training method MI-FGSM causes the attack success rates of the attack methods C&W and PGD to decrease from the original AlexNet model f 0 (X) is reduced to an average of 24% and 17% respectively. Compared with the existing method MI-FGSM, the adversarial training method designed by the present invention reduces the average attack success rate of the attack methods C&W and PGD to 20% and 12% respectively, and the accuracy of different AlexNet models after retraining remains almost unchanged, all around 88%. More importantly, observing the experimental results shown in Tables 2 and 3, it can be seen that: with the original model f 0 (X) is the basis, the adversarial training method designed by the present invention and the adversarial samples generated by the existing MI-FGSM adversarial training method are transferable in ResNet and DenseNet network structures, but compared with the adversarial training method MI-FGSM, the adversarial training method designed by the present invention enables convolutional neural networks with different structures to obtain stronger adversarial robustness and more robust accuracy. In general, compared with the existing adversarial training methods, the method designed by the present invention benefits from the generated adversarial samples with the function of weakening the background classification contribution value, and is an adversarial training technology with practical value that can balance robustness and accuracy. The experimental results fully prove that the training set generated by the method of optimizing training samples proposed by the present invention has knowledge transferability and is a method that can be widely used in industry.
[0074] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for improving network model performance based on optimizing training sample quality, characterized in that: include: Inputting an original training set into a target network, and outputting a corresponding saliency map for each original training sample based on a guid-Xmage interpretative method; the original training set includes a plurality of original training samples; The process of outputting the corresponding saliency map for each original training sample based on the guid-Xmage interpretability method includes: Building a symbolic model based on the original training samples; Extracting weights corresponding to symbolic variables in the symbolic model; Constructing a pixel weight matrix based on the weights; Performing a dot multiplication on the pixel weight matrix and the pixel value of the original training image to obtain a pixel classification contribution value matrix; Obtaining a saliency map corresponding to the original training sample based on the pixel classification contribution value matrix; The process of constructing a symbolic model based on the original training samples includes: Inputting the original training sample into the target convolutional neural network to obtain a target network model, and recording execution trajectory information; Defining a symbolic image based on the original training sample, wherein the symbolic image accurately executes the trajectory information to obtain a symbolic model; The expression of the symbolic model is: In the formula, is a symbolic model, Z is a symbolic image, is a symbolic variable in the symbolic image Z, i and j represent symbolic variables The corresponding pixel x ij ∈X, k is the kth channel of the input real image X, and ρ is an AND symbol variable An irrelevant constant representing the cumulative value of the bias in the target network model f(X), is an element in the pixel weight matrix, S indicates that the current f(Z) is a symbolic model obtained based on the original network model, and t indicates that the t-th classification branch is the target of symbolic execution; Based on the saliency map, background pixels of the original training sample are iteratively tampered with in different tampering intensity ranges in a monotonically decreasing manner to obtain adversarial samples with a function of weakening background classification contribution values; A new training set is constructed based on the adversarial samples and the original samples, and the performance of the network model is improved based on the training set.
2. The method for improving network model performance based on optimizing training sample quality according to claim 1, characterized in that: The pixel values at the same position of different channels in the pixel classification contribution value matrix are summed and normalized to the maximum and minimum values to obtain the corresponding distribution map.
3. The method for improving network model performance based on optimizing training sample quality according to claim 1, characterized in that: The pixel classification contribution value matrix is processed based on a piecewise averaging method to obtain a saliency map corresponding to the original training sample.
4. The method for improving network model performance based on optimizing training sample quality according to claim 3, characterized in that: The process of obtaining the adversarial sample based on tampering includes: Calculate the category label of the original image and initialize the perturbation intensity range and iterative tampering steps for each element in the original image; Determine the contribution of each element based on the classification contribution value matrix to obtain the tamperable element; The tamperable element is tampered to obtain an element value, and the element value is limited to obtain a tampered image of this round; Calculate the category label of the tampered image in this round; Compare the category label of the tampered image in this round with the category label of the original image. When the two category labels are different, the tampering is successful and the adversarial sample is obtained; when the two category labels are the same, the tampering fails and the next round of tampering is performed.
5. The method for improving network model performance based on optimizing training sample quality according to claim 4, characterized in that: The calculation formula for tampering the tamperable element is: In the formula, Indicates the tampered element value. represents the element in the original image, and λ represents the step size of iterative tampering.