Attack-resistant and defense method for laser mode decomposition deep neural network

By building pattern decomposition and adversarial sample datasets, deep neural networks are trained and evaluated, and adversarial defense algorithms are used to improve their adversarial robustness, solving the problem of deep neural networks being vulnerable to attacks in laser mode decomposition and improving security and stability ensures the reliability of the laser mode decomposition soft sensor.

CN119091252AActive Publication Date: 2024-12-06NAT UNIV OF DEFENSE TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411227364.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2024-12-06
Estimated Expiration
2044-09-03

AI Technical Summary

Technical Problem

Deep neural networks are susceptible to adversarial sample attacks in laser mode decomposition, resulting in security issues and affecting the application of soft sensors.

Method used

Deep neural networks are trained and evaluated by building pattern decomposition training datasets and adversarial sample datasets, and the adversarial defense algorithm is used to improve its adversarial robustness, including simulation and experimental methods, using adversarial training and robust key fine-tuning.

Benefits of technology

It improves the adversarial robustness of deep neural networks, enhances its security and stability in the face of adversarial sample attacks, and ensures the reliability of laser mode decomposition soft sensors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119091252A_ABST
    Figure CN119091252A_ABST
Patent Text Reader

Abstract

The invention relates to an anti-attack and defense method for a laser mode decomposition deep neural network, and the method comprises the steps: training a given deep neural network through employing a mode decomposition training data set obtained through construction, obtaining the mode decomposition deep neural network, and enabling the network to be provided with a single laser near-field light spot picture, a single laser near-field light spot picture and a single laser near-field light spot picture. The method comprises the following steps: constructing an adversarial sample data set based on an adversarial attack algorithm, evaluating the adversarial robustness of a mode decomposition deep neural network by using the adversarial sample data set, and if the evaluation result is that the adversarial robustness does not meet the requirement, determining that the adversarial robustness does not meet the requirement. And if so, improving the adversarial robustness of the mode decomposition deep neural network by adopting an adversarial defense algorithm. By adopting the method, the adversarial robustness of the deep neural network can be evaluated, and the adversarial robustness of the deep neural network can also be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of laser technology, and in particular to an adversarial attack and defense method against a laser mode decomposition deep neural network. Background Art

[0002] The rapid development of laser technology has made the measurement of typical laser characteristics an important scientific issue in the laser field. Mode decomposition is an important technology for measuring laser mode characteristics and has important research value. The purpose of mode decomposition technology is to solve the mode coefficients that represent the relationship between the amplitude and phase quantity of each eigenmode in the laser beam.

[0003] In recent years, deep neural networks have been introduced into pattern characteristic measurement to solve the pattern decomposition problem. The trained deep neural network can map the near-field and / or far-field spot images to pattern coefficients, thus realizing indirect measurement of pattern coefficients. 2 ) and other direct measurement methods of mode coefficients, and the indirect measurement method based on deep neural network has the advantages of simple experimental setting, accurate measurement results and fast measurement speed.

[0004] Furthermore, laser mode soft sensors can be constructed based on pattern decomposition deep neural networks. The basic idea of ​​soft sensors is to apply computer technology to select other easy-to-measure variables (or auxiliary variables) for important variables that are difficult to measure or temporarily unmeasurable (or dominant variables), and to establish a certain mathematical relationship through a soft measurement model to infer and estimate, and to replace the hardware (hard sensor or physical sensor) function with software (soft sensor or virtual sensor). Laser mode soft sensors are expected to achieve continuous measurement of laser modes, with the advantages of low cost and simple maintenance. They have broad application prospects in industrial fields such as laser manufacturing or large scientific projects such as high-energy lasers.

[0005] Given the strict requirements for use in industry and major scientific projects, soft sensors based on deep neural networks should be highly secure and stable. However, recent studies have shown that deep neural networks are vulnerable to adversarial attacks by adversarial samples: attackers create adversarial samples by applying carefully designed small perturbations to the original input of the model. Adversarial samples can deceive these models to give wrong results, which may further mislead technicians to perform wrong operations. This phenomenon may bring serious security issues to the practical application of soft sensors. Therefore, in addition to measurement accuracy and measurement speed, the model adversarial robustness must also be considered for the practical application of soft sensors based on deep learning networks. Summary of the invention

[0006] Based on this, it is necessary to provide an adversarial attack and defense method for laser mode decomposition deep neural network that can effectively improve the adversarial robustness in response to the above technical requirements.

[0007] A method for adversarial attack and defense against a laser mode decomposition deep neural network, the method comprising:

[0008] Constructing a mode decomposition training data set, and using the mode decomposition training data set to train a given deep neural network to obtain a mode decomposition deep neural network, wherein the mode decomposition deep neural network has the ability to predict laser mode coefficients by taking a single laser near-field spot image, or a dual image of the laser near-field and far-field spots as input;

[0009] Constructing an adversarial sample data set based on an adversarial attack algorithm, and using the adversarial sample data set to evaluate the adversarial robustness of the pattern decomposition deep neural network;

[0010] If the evaluation result is that the adversarial robustness does not meet the requirements, an adversarial defense algorithm is used to improve the adversarial robustness of the pattern decomposition deep neural network.

[0011] In one embodiment, when constructing a pattern decomposition training data set, a simulation method is used, including:

[0012] Calculate according to given laser physical parameters to obtain the laser mode, and randomly generate the mode coefficient of the laser mode;

[0013] The laser mode and mode coefficient are weighted and superimposed to obtain the modulus, and the corresponding laser near-field spot intensity distribution is obtained, and the intensity distribution is stored in a picture format to obtain a laser near-field spot simulation picture;

[0014] The laser mode and mode coefficient are weighted and superimposed, and then Fourier transformed and modulo-calculated to obtain the laser far-field spot intensity distribution, and stored in a picture format to obtain a laser far-field spot simulation picture;

[0015] The laser near-field spot simulation images and the corresponding mode coefficients are combined into a group of training samples, or the laser near-field and far-field spot simulation images and the corresponding mode coefficients are combined into a group of training samples, and the mode decomposition training data set is constructed based on multiple groups of training samples.

[0016] In one embodiment, a simulation method for constructing a mode decomposition training data set is used to construct a mode decomposition test data set, and the mode decomposition test data set is used to perform accuracy testing on the trained mode decomposition deep neural network to confirm that the trained mode decomposition deep neural network has the ability to predict laser mode coefficients.

[0017] In one embodiment, when constructing an adversarial sample data set based on an adversarial attack algorithm, a simulation method and an experimental method are used;

[0018] The simulation method comprises: using the adversarial attack algorithm to add adversarial disturbances to the laser spot image in the pattern decomposition test data set, wherein the attack logic of the adversarial attack algorithm is to maximize the loss gradient and minimize the distortion of the spot image, and the attack methods include white box attack and black box attack;

[0019] The laser near-field spot simulation images after adding adversarial disturbances and the corresponding mode coefficients are combined into a group of simulated adversarial samples, or the laser near-field and far-field spot simulation images after adding adversarial disturbances and the corresponding mode coefficients are combined into a group of simulated adversarial samples, and a simulated adversarial sample data set is constructed based on multiple groups of simulated adversarial samples;

[0020] The experimental method comprises: obtaining laser near-field and far-field spot measurement images through experiments;

[0021] The adversarial attack algorithm is used to add adversarial disturbances to the laser near-field and far-field spot measurement pictures, and the laser near-field spot measurement pictures after adding the adversarial disturbances and the corresponding laser near-field spot measurement pictures are composed of a group of experimental adversarial samples, or the laser near-field and far-field spot measurement pictures after adding the adversarial disturbances and the corresponding laser spot measurement pictures are composed of a group of experimental adversarial samples, and an experimental adversarial sample data set is constructed according to multiple groups of experimental adversarial samples.

[0022] In one embodiment, when evaluating the adversarial robustness of the pattern decomposition deep neural network using the adversarial sample dataset:

[0023] When the adversarial sample data set is obtained by a simulation method, a set of laser spot images in the simulated adversarial samples are input into the pattern decomposition deep neural network to obtain the predicted value of the laser mode coefficient;

[0024] Calculating the difference between the predicted value of the laser mode coefficient and the mode coefficient in the set of simulated adversarial samples;

[0025] If the calculated result is greater than the preset threshold, the evaluation result is that the adversarial robustness does not meet the requirements;

[0026] When an adversarial sample data set is obtained by an experimental method, a set of laser spot images with adversarial perturbations added to the experimental adversarial samples are input into the pattern decomposition deep neural network to obtain a predicted value of the laser mode coefficient;

[0027] Reconstructing the laser spot image according to the predicted value of the laser mode coefficient to obtain a reconstructed laser spot image;

[0028] Calculating the difference between the reconstructed laser spot image and the laser spot measurement image in the set of experimental adversarial samples;

[0029] If the calculated result is greater than a preset threshold, the evaluation result is that the adversarial robustness does not meet the requirements.

[0030] In one embodiment, when evaluating the adversarial robustness of the pattern decomposition deep neural network:

[0031] Using a single metric to evaluate the adversarial robustness of the pattern decomposition deep neural network; or

[0032] A variety of indicators and indicator aggregation methods are used to evaluate the adversarial robustness of the pattern decomposition deep neural network.

[0033] In one embodiment, when the adversarial defense algorithm is used to improve the adversarial robustness of the pattern decomposition deep neural network, the adversarial defense algorithm includes adversarial training and robust key fine-tuning;

[0034] The adversarial training uses an adversarial training data set obtained by mixing the simulated adversarial sample data set with the pattern decomposition training data set to perform secondary training on the pattern decomposition deep neural network until convergence, thereby obtaining the deep neural network with improved adversarial robustness;

[0035] The robust key fine-tuning obtains the deep neural network with improved adversarial robustness by fine-tuning the non-robust key modules of the deep neural network.

[0036] The present application also provides a laser mode coefficient measurement soft sensor, the laser mode measurement soft sensor comprising a laser spot image acquisition unit and a mode coefficient soft measurement unit, wherein the mode coefficient soft measurement unit is provided with the deep neural network with enhanced adversarial robustness obtained according to the adversarial attack and defense method for the laser mode decomposition deep neural network;

[0037] The laser spot image acquisition unit is used to acquire a single laser near-field spot image, or a dual image of the laser near-field and far-field spots;

[0038] The mode coefficient soft measurement unit is used to obtain the corresponding mode coefficient according to the single laser near-field spot image, or the laser near-field and far-field spot dual images, by utilizing the deep neural network with improved adversarial robustness.

[0039] In one embodiment, the mode coefficient soft measurement unit further includes a visualization interface for receiving control instructions and displaying mode decomposition results.

[0040] A method and device for counterattack and defense against laser mode decomposition deep neural network, the device comprising:

[0041] A mode decomposition deep neural network training module is used to construct a mode decomposition training data set, and use the mode decomposition training data set to train a given deep neural network framework to obtain a mode decomposition deep neural network. The mode decomposition deep neural network has the ability to predict laser mode coefficients using a single laser near-field spot image, or a dual image of the laser near-field and far-field spots as input;

[0042] A pattern decomposition deep neural network evaluation module is used to add disturbances to the original laser spot image using an adversarial attack algorithm to generate adversarial sample images, and use the adversarial sample images to evaluate the adversarial robustness of the pattern decomposition deep neural network;

[0043] The adversarial robustness enhancement module is used to adopt an adversarial defense algorithm to improve the adversarial robustness of the pattern decomposition deep neural network if the evaluation result is that the adversarial robustness does not meet the requirements.

[0044] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0045] Constructing a mode decomposition training data set, and using the mode decomposition training data set to train a given deep neural network to obtain a mode decomposition deep neural network, wherein the mode decomposition deep neural network has the ability to predict laser mode coefficients by taking a single laser near-field spot image, or a dual image of the laser near-field and far-field spots as input;

[0046] Constructing an adversarial sample data set based on an adversarial attack algorithm, and using the adversarial sample data set to evaluate the adversarial robustness of the pattern decomposition deep neural network;

[0047] If the evaluation result is that the adversarial robustness does not meet the requirements, an adversarial defense algorithm is used to improve the adversarial robustness of the pattern decomposition deep neural network.

[0048] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0049] Constructing a mode decomposition training data set, and using the mode decomposition training data set to train a given deep neural network to obtain a mode decomposition deep neural network, wherein the mode decomposition deep neural network has the ability to predict laser mode coefficients by taking a single laser near-field spot image, or a dual image of the laser near-field and far-field spots as input;

[0050] Constructing an adversarial sample data set based on an adversarial attack algorithm, and using the adversarial sample data set to evaluate the adversarial robustness of the pattern decomposition deep neural network;

[0051] If the evaluation result is that the adversarial robustness does not meet the requirements, an adversarial defense algorithm is used to improve the adversarial robustness of the pattern decomposition deep neural network.

[0052] The above-mentioned adversarial attack and defense method for the laser mode decomposition deep neural network is to train a given deep neural network using the constructed mode decomposition training data set to obtain a mode decomposition deep neural network, which has the ability to predict laser mode coefficients using a single laser near-field spot image, or a double image of the laser near-field and far-field spot as input, and to construct an adversarial sample data set based on the adversarial attack algorithm. The adversarial sample data set is used to evaluate the adversarial robustness of the mode decomposition deep neural network. If the evaluation result is that the adversarial robustness does not meet the requirements, the adversarial defense algorithm is used to improve the adversarial robustness of the mode decomposition deep neural network. This method can be used to evaluate the adversarial robustness of the deep neural network while training it to improve its adversarial robustness. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 A schematic diagram of using a deep neural network to measure laser mode coefficients in one embodiment;

[0054] Figure 2 A flowchart of an adversarial attack and defense method for a laser mode decomposition deep neural network in one embodiment;

[0055] Figure 3 A schematic diagram of a system for measuring a laser near-field spot image or a laser far-field spot image in one embodiment;

[0056] Figure 4 A structural block diagram of an adversarial attack and defense device for a laser mode decomposition deep neural network in one embodiment;

[0057] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0059] like Figure 1 As shown, a deep neural network is used to measure the laser mode coefficients, and the deep neural network is extremely vulnerable to adversarial attacks by adversarial samples, that is, the attacker imposes tiny perturbations on the input data of the deep neural network to deceive it into outputting erroneous results, causing serious security issues.

[0060] In response to the above problems, Figure 2 As shown, a method for adversarial attack and defense against a laser mode decomposition deep neural network is provided, which specifically includes the following steps:

[0061] Step S100, construct a mode decomposition training data set, use the mode decomposition training data set to train a given deep neural network, and obtain a mode decomposition deep neural network. The mode decomposition deep neural network has the ability to predict the laser mode coefficient using a single laser near-field spot image, or a dual image of the laser near-field and far-field spots as input.

[0062] Step S110, constructing an adversarial sample dataset based on the adversarial attack algorithm, and using the adversarial sample dataset to evaluate the adversarial robustness of the pattern decomposition deep neural network.

[0063] Step S120: If the evaluation result shows that the adversarial robustness does not meet the requirements, an adversarial defense algorithm is used to improve the adversarial robustness of the model decomposition deep neural network.

[0064] In the present application, for the pattern decomposition deep neural network trained in step S100, the evaluation method in S110 is first used to construct an adversarial sample data set based on the adversarial attack algorithm, and the adversarial sample data set is used to evaluate the adversarial robustness of the pattern decomposition deep neural network. If the evaluation result does not meet the requirements, then in step S120, an adversarial defense algorithm is used to improve the adversarial robustness of the pattern decomposition deep neural network.

[0065] In step S100, the mode decomposition deep neural network has the ability to predict the laser mode coefficient based on a single laser near-field spot image, or a dual image of the laser near-field and far-field spots. When training it, it can include three steps, namely: constructing a mode decomposition training data set, training the deep neural network, and evaluating the deep neural network.

[0066] In this embodiment, when constructing a mode decomposition training data set, a simulation method is used, including: calculating according to given laser physical parameters to obtain a laser mode, and randomly generating a mode coefficient of the laser mode, weighted superposition of the laser mode and the mode coefficient to obtain a corresponding laser near-field spot intensity distribution, and storing it in a picture format to obtain a laser near-field spot simulation picture. After weighted superposition of the laser mode and the mode coefficient, Fourier transform is performed and then the mode is obtained to obtain a laser far-field spot intensity distribution, and the far-field spot simulation picture is obtained, and the laser near-field spot simulation picture and the corresponding mode coefficient are formed into a group of training samples, or the laser near-field and far-field spot simulation pictures and the corresponding mode coefficients are formed into a group of training samples, and the mode decomposition training data set is constructed according to multiple groups of training samples.

[0067] The construction of the pattern decomposition training data set can be selected according to the specific application scenario of the pattern decomposition deep neural network. A single laser near-field spot simulation image can be used as input, or a pair of laser near-field and far-field spot simulation images can be used as input.

[0068] Specifically, when a group of training samples includes a laser near-field spot simulation picture and a corresponding mode coefficient, when training the network, the laser near-field spot simulation picture is used as input, and the corresponding mode coefficient is used as the true value label. When a group of training samples includes a laser near-field and far-field spot simulation picture and a corresponding mode coefficient, when training the network, the laser near-field and far-field spot simulation picture is used as input, and the mode coefficients corresponding to the two laser spot simulation pictures are used as the true value label.

[0069] Furthermore, the pattern decomposition training dataset is used to train a given deep neural network.

[0070] In this embodiment, the given deep neural network may adopt but is not limited to deep neural network frameworks such as VGG-16, ResNet-18, Dense-Net, MobileNetV3, etc.

[0071] Furthermore, based on the given deep neural network, the loss function is calculated according to the prediction result of the laser spot image input, and the adjustable parameters of the deep neural network are updated according to the calculation result, and the above process is repeated until the deep neural network converges. After training, the deep neural network learns the mapping relationship between the laser spot image and the corresponding mode coefficient.

[0072] In this embodiment, a simulation method for constructing a pattern decomposition training data set is adopted to construct a pattern decomposition test data set, and the pattern decomposition test data set is used to perform accuracy testing on the trained pattern decomposition deep neural network to confirm that the trained pattern decomposition deep neural network has the ability to predict laser mode coefficients.

[0073] Specifically, the pattern decomposition deep neural network is tested and evaluated using the pattern decomposition test data set to confirm the training effect of the deep neural network. It should be noted here that, usually, the test evaluation is only for the accuracy of the prediction of the deep neural network pattern coefficient.

[0074] In another embodiment, the training data in the constructed pattern decomposition training data set can be divided into two data sets in an 8:2 ratio, one of the data sets is used as the training set to train the pattern decomposition deep neural network, and the other smaller data set is used as the test set to test the trained pattern decomposition deep neural network.

[0075] In this embodiment, an experimental method can also be used to construct a pattern decomposition test data set, and the process will be described in the subsequent construction of the adversarial sample data set, and will not be described again here.

[0076] Furthermore, when evaluating the prediction accuracy of the deep neural network pattern coefficients, for the test data set obtained by the simulation method, the difference between the true value of the pattern coefficients and the predicted pattern coefficients can be used as an indicator, or the difference between the input laser spot image and the reconstructed image can be used as an indicator for evaluation. For the test data set obtained by the experimental method, since the true value of the pattern coefficients is unknown, the difference between the input laser spot image and the reconstructed image is generally used as an indicator for evaluation.

[0077] Considering that in some practical application scenarios, deep neural networks will be subject to adversarial attacks from attackers, it is necessary to evaluate the adversarial robustness of deep neural networks before practical application. In step S110, an adversarial sample dataset is constructed based on the adversarial attack algorithm, and the adversarial sample dataset is used to evaluate the adversarial robustness of the pattern decomposition deep neural network.

[0078] Adversarial samples refer to samples that have been subjected to tiny perturbations that are imperceptible to humans and cause the performance of deep models to degrade. These samples are called adversarial samples.

[0079] In step S110, the object to which disturbance is added may be a laser near-field (and far-field) spot image obtained through simulation, or a laser near-field (and far-field) spot image obtained through experimental measurement.

[0080] In this embodiment, the pattern decomposition deep neural network anti-attack algorithm is obtained by optimizing the basic iterative method.

[0081] Among them, the basic iterative method is a typical adversarial attack algorithm, which is often used for adversarial attacks on classification problems. By modifying the loss function, such as using the mean square error as the loss function, this method can also be applied to adversarial attacks on regression models. The attack logic is: under a given perturbation threshold, seek the optimal perturbation direction to maximize the loss function.

[0082] Through simulation, it is found that when the basic iterative method is used to attack the deep neural network of pattern decomposition, the generated adversarial samples are not concealed enough. In this embodiment, the adversarial attack algorithm obtained by optimizing the basic iterative algorithm takes into account both the attack effect and the concealment of the adversarial samples. The attack logic is: under a given perturbation threshold, seek the optimal perturbation direction, maximize the loss gradient and minimize the distortion of the laser spot image, that is:

[0083]

[0084] In the above formula, f is the pattern decomposition deep neural network, parameterized by θ; L is the loss function; x: the original input of the deep neural network; η is the perturbation; ε is the perturbation threshold, ‖η‖ ∞ ≤ε; α is the weight.

[0085] When using the above-mentioned adversarial attack algorithm, the attack can be divided into two types, namely white-box attack and black-box attack, according to the amount of information the attacker has about the target.

[0086] Specifically, a white-box attack means that the attacker has full knowledge and access to the model, i.e., the deep neural network, including the model structure, weights, inputs, and outputs, and can interact with the model system in the process of generating adversarial attack data. Since the information of the model is completely controlled by the attacker, the attacker can design specific attack algorithms based on the characteristics of the attacked model.

[0087] Specifically, black-box attacks are the opposite of white-box attacks, where the attacker has only limited knowledge of the model. The attacker knows nothing about the structural weights of the model and only knows part of the input and output.

[0088] When verifying the effectiveness of the above-mentioned adversarial attack algorithm, we first verify the effectiveness of the algorithm under white-box attack, and then verify that the algorithm can be used for black-box attack. Through verification, it is found that the adversarial attack algorithm is effective under both white-box attack and black-box attack, and is transferable.

[0089] In this embodiment, when constructing an adversarial sample data set based on the adversarial attack algorithm, a simulation method and an experimental method are used.

[0090] Specifically, the simulation method includes: using an adversarial attack algorithm to add adversarial perturbations to the laser spot image in the mode decomposition test data set, the attack logic of the adversarial attack algorithm is to maximize the loss gradient and minimize the distortion of the spot image, and the attack methods include white box attack and black box attack. The laser near-field spot simulation image after adding the adversarial perturbation and the corresponding mode coefficients are combined into a group of simulated adversarial samples, or the laser near-field and far-field spot simulation images after adding the adversarial perturbations and the corresponding mode coefficients are combined into a group of simulated adversarial samples, and a simulated adversarial sample data set is constructed based on multiple groups of simulated adversarial samples.

[0091] Specifically, the experimental method includes: obtaining laser near-field and far-field spot measurement images through experiments. Using an adversarial attack algorithm to add adversarial disturbances to the laser near-field and far-field spot measurement images, the laser near-field spot measurement images after adding the adversarial disturbances and the corresponding laser near-field spot measurement images form a group of experimental adversarial samples, or the laser near-field and far-field spot measurement images after adding the adversarial disturbances and the corresponding laser spot measurement images form a group of experimental adversarial samples, and construct an experimental adversarial sample data set based on multiple groups of experimental adversarial samples.

[0092] In this embodiment, the following Figure 3 The experimental setup shown in the figure measures the laser near-field (and far-field) spot images from the experiment. When constructing the above-mentioned pattern decomposition test dataset, multiple laser near-field (and far-field) spot images are obtained repeatedly as test samples. When constructing the adversarial sample dataset, multiple laser near-field (and far-field) spot measurement images are first generated through experiments, and then perturbations are added to these measured images to obtain adversarial samples.

[0093] In this embodiment, the adversarial robustness of the pattern decomposition deep neural network is evaluated using an adversarial sample data set: when the adversarial sample data set is obtained by a simulation method, a group of laser spot images in simulated adversarial samples are input into the pattern decomposition deep neural network to obtain laser mode coefficient prediction values, and the difference between the laser mode coefficient prediction values ​​and the mode coefficients in the group of simulated adversarial samples is calculated. If the calculated result is greater than a preset threshold, the evaluation result is that the adversarial robustness does not meet the requirements.

[0094] When an adversarial sample data set is obtained by an experimental method, a group of laser spot images with adversarial perturbations added in the experimental adversarial samples are input into the pattern decomposition deep neural network to obtain the laser mode coefficient prediction value. The laser spot image is reconstructed according to the laser mode coefficient prediction value to obtain the reconstructed laser spot image. The difference between the reconstructed laser spot image and the laser spot measurement image in the group of experimental adversarial samples is calculated. If the calculated result is greater than the preset threshold, the evaluation result is that the adversarial robustness does not meet the requirements.

[0095] In this embodiment, when evaluating the adversarial robustness of the pattern decomposition deep neural network: a single indicator can be used to realize the adversarial robustness evaluation of the pattern decomposition deep neural network; or multiple indicators and indicator aggregation methods can be used to realize the adversarial robustness evaluation of the pattern decomposition deep neural network.

[0096] Specifically, the indicators include adversarial indicators such as the success rate of adversarial attacks, average confidence of adversarial samples, upper and lower bounds of conflict, and visual indicators such as the number of adversarial sample iterations, average distortion of adversarial perturbations, and average structural similarity of adversarial perturbations.

[0097] In step S120, when an adversarial defense algorithm is used to improve the adversarial robustness of the pattern decomposition deep neural network, the adversarial defense algorithm includes adversarial training and robust key fine-tuning.

[0098] Among them, adversarial training uses an adversarial training dataset obtained by mixing a simulated adversarial sample dataset and a pattern decomposition training dataset to perform secondary training on the pattern decomposition deep neural network until convergence, thereby obtaining a deep neural network with improved adversarial robustness;

[0099] Among them, robust key fine-tuning obtains a deep neural network with improved adversarial robustness by fine-tuning the non-robust key modules of the deep neural network.

[0100] In the above-mentioned adversarial attack and defense method for laser mode decomposition deep neural network, adversarial samples are obtained by adding disturbances to sample images according to the adversarial attack algorithm, and the adversarial samples are input into the mode decomposition deep neural network to obtain predicted laser mode coefficients. The adversarial robustness of the trained deep neural network is evaluated according to the difference between the predicted laser mode coefficients and the true value labels corresponding to the sample images. If the evaluation result shows that the adversarial robustness does not meet the requirements, the adversarial defense algorithm is used to improve the adversarial robustness. This method can be used to evaluate the adversarial robustness of deep neural networks and improve their adversarial robustness.

[0101] In the present application, a laser mode coefficient measurement soft sensor is also provided, which includes a laser spot image acquisition unit and a mode coefficient soft measurement unit, wherein the mode coefficient soft measurement unit is provided with a deep neural network with enhanced adversarial robustness and optimized adversarial robustness obtained according to the above-mentioned adversarial attack and defense method for the laser mode decomposition deep neural network. Among them, the laser spot image acquisition unit is used to collect a single laser near-field spot image, or a dual image of the laser near-field and far-field spots. The mode coefficient soft measurement unit is used to obtain the corresponding mode coefficient according to a single laser near-field spot image, or a dual image of the laser near-field and far-field spots, using the deep neural network with enhanced adversarial robustness.

[0102] In this embodiment, the mode coefficient soft measurement unit further includes a visualization interface for receiving control instructions and displaying mode decomposition results.

[0103] When using this laser mode coefficient measurement soft sensor to predict the mode coefficient of the adversarial sample created by the attacker, relatively accurate prediction results can still be obtained.

[0104] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0105] In one embodiment, Figure 4 As shown, a method and device for counterattack and defense against laser mode decomposition deep neural network is provided, comprising: a mode decomposition deep neural network training module 200, a mode decomposition deep neural network evaluation module 210 and a counterattack robustness enhancement module 220, wherein:

[0106] A mode decomposition deep neural network training module 200 is used to construct a mode decomposition training data set, and use the mode decomposition training data set to train a given deep neural network to obtain a mode decomposition deep neural network, wherein the mode decomposition deep neural network has the ability to predict laser mode coefficients by taking a single laser near-field spot image, or a dual image of the laser near-field and far-field spots as input;

[0107] A pattern decomposition deep neural network evaluation module 210 is used to construct an adversarial sample data set based on an adversarial attack algorithm, and use the adversarial sample data set to evaluate the adversarial robustness of the pattern decomposition deep neural network based on the adversarial attack algorithm.

[0108] The adversarial robustness enhancement module 220 is used to adopt an adversarial defense algorithm to improve the adversarial robustness of the pattern decomposition deep neural network if the evaluation result is that the adversarial robustness does not meet the requirements.

[0109] For the specific definition of the counterattack and defense device for the laser mode decomposition deep neural network, please refer to the definition of the counterattack and defense method for the laser mode decomposition deep neural network mentioned above, which will not be repeated here. Each module in the above-mentioned counterattack and defense device for the laser mode decomposition deep neural network can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0110] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 5As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a counterattack and defense method for laser mode decomposition deep neural network is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0111] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0112] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0113] Constructing a mode decomposition training data set, and using the mode decomposition training data set to train a given deep neural network to obtain a mode decomposition deep neural network, wherein the mode decomposition deep neural network has the ability to predict laser mode coefficients by taking a single laser near-field spot image, or a dual image of the laser near-field and far-field spots as input;

[0114] Constructing an adversarial sample data set based on an adversarial attack algorithm, and using the adversarial sample data set to evaluate the adversarial robustness of the pattern decomposition deep neural network;

[0115] If the evaluation result is that the adversarial robustness does not meet the requirements, an adversarial defense algorithm is used to improve the adversarial robustness of the pattern decomposition deep neural network.

[0116] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0117] Constructing a mode decomposition training data set, and using the mode decomposition training data set to train a given deep neural network to obtain a mode decomposition deep neural network, wherein the mode decomposition deep neural network has the ability to predict laser mode coefficients by taking a single laser near-field spot image, or a dual image of the laser near-field and far-field spots as input;

[0118] Constructing an adversarial sample data set based on an adversarial attack algorithm, and using the adversarial sample data set to evaluate the adversarial robustness of the pattern decomposition deep neural network;

[0119] If the evaluation result is that the adversarial robustness does not meet the requirements, an adversarial defense algorithm is used to improve the adversarial robustness of the pattern decomposition deep neural network.

[0120] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0121] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0122] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. An adversarial attack and defense method against laser mode decomposition deep neural network, It is characterized in that The method comprises: Constructing a mode decomposition training data set, and using the mode decomposition training data set to train a given deep neural network to obtain a mode decomposition deep neural network, wherein the mode decomposition deep neural network has the ability to predict laser mode coefficients by taking a single laser near-field spot image, or a dual image of the laser near-field and far-field spots as input; Constructing an adversarial sample data set based on an adversarial attack algorithm, and using the adversarial sample data set to evaluate the adversarial robustness of the pattern decomposition deep neural network; If the evaluation result is that the adversarial robustness does not meet the requirements, an adversarial defense algorithm is used to improve the adversarial robustness of the pattern decomposition deep neural network.

2. The method for adversarial attack and defense against laser mode decomposition deep neural network according to claim 1, It is characterized in that When constructing the pattern decomposition training dataset, a simulation method is used, including: Calculate according to given laser physical parameters to obtain the laser mode, and randomly generate the mode coefficient of the laser mode; The laser mode and mode coefficient are weighted and superimposed to obtain the modulus, and the corresponding laser near-field spot intensity distribution is obtained, and the intensity distribution is stored in a picture format to obtain a laser near-field spot simulation picture; The laser mode and mode coefficient are weighted and superimposed, and then Fourier transformed and modulo-calculated to obtain the laser far-field spot intensity distribution, and stored in a picture format to obtain a laser far-field spot simulation picture; The laser near-field spot simulation images and the corresponding mode coefficients are combined into a group of training samples, or the laser near-field and far-field spot simulation images and the corresponding mode coefficients are combined into a group of training samples, and the mode decomposition training data set is constructed based on multiple groups of training samples.

3. The method for counterattack and defense against laser mode decomposition deep neural network according to claim 2, It is characterized in that A mode decomposition test data set is constructed using the simulation method used to construct a mode decomposition training data set. The mode decomposition test data set is used to perform accuracy testing on the trained mode decomposition deep neural network to confirm that the trained mode decomposition deep neural network has the ability to predict laser mode coefficients.

4. The method for counterattack and defense against laser mode decomposition deep neural network according to claim 1, It is characterized in that When constructing adversarial sample datasets based on adversarial attack algorithms, simulation methods and experimental methods are used; The simulation method comprises: using the adversarial attack algorithm to add adversarial disturbances to the laser spot image in the pattern decomposition test data set, wherein the attack logic of the adversarial attack algorithm is to maximize the loss gradient and minimize the distortion of the spot image, and the attack methods include white box attack and black box attack; The laser near-field spot simulation images after adding adversarial perturbations and the corresponding mode coefficients are combined into a group of simulated adversarial samples, or the laser near-field and far-field spot simulation images after adding adversarial perturbations and the corresponding mode coefficients are combined into a group of simulated adversarial samples, and a simulated adversarial sample data set is constructed based on multiple groups of simulated adversarial samples; The experimental method comprises: obtaining laser near-field and far-field spot measurement images through experiments; The adversarial attack algorithm is used to add adversarial disturbances to the laser near-field and far-field spot measurement pictures, and the laser near-field spot measurement pictures after adding the adversarial disturbances and the corresponding laser near-field spot measurement pictures are composed of a group of experimental adversarial samples, or the laser near-field and far-field spot measurement pictures after adding the adversarial disturbances and the corresponding laser spot measurement pictures are composed of a group of experimental adversarial samples, and an experimental adversarial sample data set is constructed according to multiple groups of experimental adversarial samples.

5. The method for adversarial attack and defense against laser mode decomposition deep neural network according to claim 4, It is characterized in that When evaluating the adversarial robustness of the pattern decomposition deep neural network using the adversarial sample dataset: When the adversarial sample data set is obtained by a simulation method, a set of laser spot images in the simulated adversarial samples are input into the pattern decomposition deep neural network to obtain the predicted value of the laser mode coefficient; Calculating the difference between the predicted value of the laser mode coefficient and the mode coefficient in the set of simulated adversarial samples; If the calculated result is greater than the preset threshold, the evaluation result is that the adversarial robustness does not meet the requirements; When an adversarial sample data set is obtained by an experimental method, a set of laser spot images with adversarial perturbations added to the experimental adversarial samples are input into the pattern decomposition deep neural network to obtain a predicted value of the laser mode coefficient; Reconstructing the laser spot image according to the predicted value of the laser mode coefficient to obtain a reconstructed laser spot image; Calculating the difference between the reconstructed laser spot image and the laser spot measurement image in the set of experimental adversarial samples; If the calculated result is greater than a preset threshold, the evaluation result is that the adversarial robustness does not meet the requirements.

6. The method for adversarial attack and defense against laser mode decomposition deep neural network according to claim 5, It is characterized in that When evaluating the adversarial robustness of the pattern decomposition deep neural network: Using a single metric to evaluate the adversarial robustness of the pattern decomposition deep neural network; or A variety of indicators and indicator aggregation methods are used to evaluate the adversarial robustness of the pattern decomposition deep neural network.

7. The method for adversarial attack and defense against laser mode decomposition deep neural network according to claim 6, It is characterized in that When the adversarial defense algorithm is used to improve the adversarial robustness of the pattern decomposition deep neural network, the adversarial defense algorithm includes adversarial training and robust key fine-tuning; The adversarial training uses an adversarial training data set obtained by mixing the simulated adversarial sample data set with the pattern decomposition training data set to perform secondary training on the pattern decomposition deep neural network until convergence, thereby obtaining the deep neural network with improved adversarial robustness; The robust key fine-tuning obtains the deep neural network with improved adversarial robustness by fine-tuning the non-robust key modules of the deep neural network.

8. Laser mode coefficient measurement soft sensor, It is characterized in that The laser mode measurement soft sensor includes a laser spot image acquisition unit and a mode coefficient soft measurement unit, wherein the mode coefficient soft measurement unit is provided with the deep neural network with enhanced adversarial robustness obtained according to the adversarial attack and defense method for the laser mode decomposition deep neural network according to any one of claims 1 to 7; The laser spot image acquisition unit is used to acquire a single laser near-field spot image, or a dual image of the laser near-field and far-field spots; The mode coefficient soft measurement unit is used to obtain the corresponding mode coefficient according to the single laser near-field spot image, or the laser near-field and far-field spot dual images, by utilizing the deep neural network with improved adversarial robustness.

9. Laser mode coefficient measurement soft sensor, It is characterized in that The mode coefficient soft measurement unit also includes a visualization interface for receiving control instructions and displaying mode decomposition results.

Citation Information

Patent Citations

  • Image classification method for defending against confrontation sample attack, terminal equipment and storage medium

    CN113822328A

  • Deep neural network robustness evaluation method and tuning method

    CN115439880A

  • Attack resisting method for deep neural network image classifier

    CN116486136A

  • Remote sensing image depth identification method based on feature correction and multistage confrontation defense

    CN117253161A