Adversarial attacks and defenses against deep neural networks for laser mode decomposition

By constructing and evaluating adversarial example datasets, the adversarial robustness of laser mode decomposition deep neural networks is improved, solving the problem of deep neural networks being vulnerable to attacks and ensuring the safety and stability of laser mode soft sensors, which are suitable for laser manufacturing and high-energy laser science and engineering.

CN119091252BActive Publication Date: 2026-11-10NAT UNIV OF DEFENSE TECH
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Deep neural networks are vulnerable to adversarial attacks in laser mode decomposition, leading to security and stability issues that affect the practical application of soft sensors.

Method used

A pattern decomposition training dataset is constructed and a deep neural network is trained. An adversarial example dataset is generated using an adversarial attack algorithm to evaluate robustness. An adversarial defense algorithm is then used to improve the network's adversarial robustness.

Benefits of technology

It improves the robustness of deep neural networks in laser mode decomposition, ensuring the safety and stability of laser mode soft sensors, and is suitable for laser manufacturing and high-energy laser science and engineering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119091252B_ABST
    Figure CN119091252B_ABST
Patent Text Reader

Abstract

This application relates to an adversarial attack and defense method for a deep neural network for laser mode decomposition. A given deep neural network is trained using a constructed mode decomposition training dataset to obtain a mode decomposition deep neural network. This network has the ability to predict laser mode coefficients using a single laser near-field spot image, or two images (near-field and far-field laser spots) as input. An adversarial example dataset is constructed based on an adversarial attack algorithm. The adversarial robustness of the mode decomposition deep neural network is evaluated using this dataset. If the evaluation result indicates that the adversarial robustness is insufficient, an adversarial defense algorithm is employed to improve the adversarial robustness of the mode decomposition deep neural network. This method can evaluate and improve the adversarial robustness of deep neural networks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of laser technology, and in particular to an adversarial attack and defense method against deep neural networks for laser mode decomposition. Background Technology

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

[0003] In recent years, deep neural networks have been introduced into mode characteristic measurement to solve the mode decomposition problem. Trained deep neural networks can map near-field and / or far-field spot images to mode coefficients, achieving indirect measurement of mode coefficients. Compared to spatial and spectral resolution imaging (S... 2 Direct measurement methods for model coefficients, such as those based on deep neural networks, offer advantages such as simple experimental setup, accurate measurement results, and fast measurement speed.

[0004] Furthermore, laser mode soft sensors can be constructed based on mode decomposition deep neural networks. The basic idea of ​​soft sensors is to use computer technology to select other easily measurable variables (or auxiliary variables) for important variables that are difficult or temporarily unmeasurable (or dominant variables). A mathematical relationship is established through a soft measurement model to infer and estimate these variables, thus replacing the functions of hardware (hard or physical sensors) with software (soft sensors or virtual sensors). Laser mode soft sensors hold promise for continuous laser mode measurement, offering advantages such as low cost and simple maintenance. They have broad application prospects in industrial fields such as laser manufacturing and large-scale scientific engineering projects such as high-energy lasers.

[0005] Given the stringent requirements of industrial applications and large-scale scientific engineering projects, soft sensors based on deep neural networks must possess high security and stability. However, recent research has shown that deep neural networks are highly vulnerable to adversarial attacks: attackers create adversarial examples by applying carefully designed micro-perturbations to the model's original input. These adversarial examples can trick the models into producing incorrect results, potentially misleading technicians into performing incorrect operations. This phenomenon could pose serious security risks to the practical application of soft sensors. Therefore, for deep learning-based soft sensors to be successfully implemented, in addition to measurement accuracy and speed, the model's adversarial robustness must also be considered. Summary of the Invention

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

[0007] An adversarial attack and defense method against deep neural networks for laser mode decomposition, the method comprising:

[0008] A pattern decomposition training dataset is constructed, and a given deep neural network is trained using the pattern decomposition training dataset to obtain a pattern decomposition deep neural network. The pattern decomposition deep neural network has the ability to predict laser pattern coefficients using a single laser near-field spot image or a dual image of laser near-field and far-field spots as input.

[0009] An adversarial sample dataset is constructed based on an adversarial attack algorithm, and the adversarial robustness of the mode decomposition deep neural network is evaluated using the adversarial sample dataset.

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

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

[0012] The laser mode is calculated based on the given laser physical parameters, and the mode coefficients of the laser mode are randomly generated.

[0013] The laser mode and mode coefficients are weighted and superimposed to obtain the modulus, resulting in the corresponding laser near-field spot intensity distribution, which is then stored in image format to obtain a simulated image of the laser near-field spot.

[0014] The laser mode and mode coefficients are weighted and superimposed, then Fourier transform is performed and the modulus is calculated to obtain the laser far-field spot intensity distribution, which is then stored in image format to obtain a laser far-field spot simulation image.

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

[0016] In one embodiment, a simulation method for constructing a pattern decomposition training dataset is used to construct a pattern decomposition test dataset. The accuracy of the trained pattern decomposition deep neural network is then tested using the pattern decomposition test dataset to confirm that the trained pattern decomposition deep neural network has the ability to predict laser pattern coefficients.

[0017] In one embodiment, when constructing the adversarial sample dataset based on the adversarial attack algorithm, simulation and experimental methods are used;

[0018] The simulation method includes: adding adversarial perturbations to laser spot images in the mode decomposition test dataset using the adversarial attack algorithm. The attack logic of the adversarial attack algorithm is to maximize the loss gradient and minimize the distortion of the spot image. The attack methods include white-box attack and black-box attack.

[0019] A set of simulated adversarial samples is formed by adding adversarial perturbation to the simulated laser near-field spot images and the corresponding mode coefficients, or by adding adversarial perturbation to the simulated laser near-field and far-field spot images and the corresponding mode coefficients. A simulated adversarial sample dataset is constructed based on multiple sets of simulated adversarial samples.

[0020] The experimental method includes: obtaining measurement images of laser near-field and far-field spots through experiments;

[0021] The adversarial attack algorithm is used to add adversarial perturbations to the laser near-field and far-field spot measurement images. The laser near-field spot measurement images with added adversarial perturbations and the corresponding laser near-field spot measurement images are combined into a set of experimental adversarial samples. Alternatively, the laser near-field and far-field spot measurement images with added adversarial perturbations and the corresponding laser spot measurement images are combined into a set of experimental adversarial samples. An experimental adversarial sample dataset is constructed based on multiple sets of experimental adversarial samples.

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

[0023] When an adversarial sample dataset is obtained using a simulation method, a set of laser spot images from the simulated adversarial samples are input into the mode decomposition deep neural network to obtain the predicted laser mode coefficient values.

[0024] Calculate the difference between the predicted laser mode coefficients and the mode coefficients in the set of simulated adversarial samples;

[0025] If the calculation result is greater than the preset threshold, the evaluation result is that the robustness against adversarial forces does not meet the requirements.

[0026] When an adversarial sample dataset is obtained using experimental methods, the laser spot images with added adversarial perturbations from a set of experimental adversarial samples are input into the mode decomposition deep neural network to obtain the predicted laser mode coefficient values.

[0027] The laser spot image is reconstructed based on the laser mode coefficient prediction value to obtain the reconstructed laser spot image.

[0028] Calculate the difference between the reconstructed laser spot image and the laser spot measurement image in the adversarial samples of this set of experiments;

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

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

[0031] A single metric is used to evaluate the adversarial robustness of the pattern decomposition deep neural network; or

[0032] Multiple 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 dataset obtained by mixing the simulated adversarial sample dataset and the mode decomposition training dataset to perform secondary training on the mode decomposition deep neural network until convergence, thereby obtaining the deep neural network with improved adversarial robustness.

[0035] The robust key fine-tuning is achieved by fine-tuning the non-robust key modules of the deep neural network to obtain the deep neural network with improved robustness against adversarial attacks.

[0036] This application also provides a laser mode coefficient measurement soft sensor, which includes a laser spot image acquisition unit and a mode coefficient soft measurement unit. The mode coefficient soft measurement unit is equipped with a deep neural network with improved adversarial robustness obtained according to the adversarial attack and defense method for laser mode decomposition deep neural network described above.

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

[0038] The mode coefficient soft measurement unit is used to obtain the corresponding mode coefficients based on the single laser near-field spot image or the dual images of laser near-field and far-field spots using the deep neural network with improved robustness.

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

[0040] An apparatus for adversarial attacks and defenses against deep neural networks for laser mode decomposition, the apparatus comprising:

[0041] The deep neural network training module for pattern decomposition is used to construct a pattern decomposition training dataset. The given deep neural network framework is trained using the pattern decomposition training dataset to obtain a deep neural network for pattern decomposition. The deep neural network for pattern decomposition has the ability to predict laser pattern coefficients using a single laser near-field spot image or a dual image of laser near-field and far-field spots as input.

[0042] The mode decomposition deep neural network evaluation module is used to add perturbations to the original laser spot image using an adversarial attack algorithm to generate adversarial sample images, and to evaluate the adversarial robustness of the mode decomposition deep neural network using the adversarial sample images.

[0043] An adversarial robustness enhancement module is used to improve the adversarial robustness of the pattern decomposition deep neural network if the evaluation result shows that the adversarial robustness does not meet the requirements.

[0044] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program performing the following steps:

[0045] A pattern decomposition training dataset is constructed, and a given deep neural network is trained using the pattern decomposition training dataset to obtain a pattern decomposition deep neural network. The pattern decomposition deep neural network has the ability to predict laser pattern coefficients using a single laser near-field spot image or a dual image of laser near-field and far-field spots as input.

[0046] An adversarial sample dataset is constructed based on an adversarial attack algorithm, and the adversarial robustness of the mode decomposition deep neural network is evaluated using the adversarial sample dataset.

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

[0048] A computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0049] A pattern decomposition training dataset is constructed, and a given deep neural network is trained using the pattern decomposition training dataset to obtain a pattern decomposition deep neural network. The pattern decomposition deep neural network has the ability to predict laser pattern coefficients using a single laser near-field spot image or a dual image of laser near-field and far-field spots as input.

[0050] An adversarial sample dataset is constructed based on an adversarial attack algorithm, and the adversarial robustness of the mode decomposition deep neural network is evaluated using the adversarial sample dataset.

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

[0052] The aforementioned adversarial attack and defense methods for deep neural networks (DNNs) targeting laser mode decomposition (LDD) involve training a given DNN using a constructed DNN training dataset. This results in a DNN capable of predicting laser mode coefficients from a single near-field laser spot image or dual images of near-field and far-field laser spots. An adversarial example dataset is constructed based on an adversarial attack algorithm. This dataset is then used to evaluate the adversarial robustness of the DNN. If the evaluation results indicate insufficient robustness, an adversarial defense algorithm is employed to improve the DNN's adversarial robustness. This method allows for simultaneous evaluation and training of the deep neural network to enhance its adversarial robustness. Attached Figure Description

[0053] Figure 1 This is a schematic diagram illustrating the use of a deep neural network for laser mode coefficient measurement in one embodiment.

[0054] Figure 2 This is a flowchart illustrating an adversarial attack and defense method for a deep neural network for laser mode decomposition in one embodiment.

[0055] Figure 3 This is a schematic diagram of a laser near-field spot image or laser far-field spot image measurement system in one embodiment;

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

[0057] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0059] like Figure 1 As shown, a deep neural network is used to measure the laser mode coefficient. However, deep neural networks are highly vulnerable to adversarial attacks, which are attacks where attackers can manipulate the input data of the deep neural network to deceive it into producing incorrect outputs, causing serious security problems.

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

[0061] Step S100: Construct a pattern decomposition training dataset, and train a given deep neural network using the pattern decomposition training dataset to obtain a pattern decomposition deep neural network. This pattern decomposition deep neural network has the ability to predict laser pattern coefficients using a single laser near-field spot image or a dual image of laser near-field and far-field spots as input.

[0062] Step S110: Construct an adversarial example dataset based on the adversarial attack algorithm, and use the adversarial example 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, then the adversarial defense algorithm is used to improve the adversarial robustness of the pattern decomposition deep neural network.

[0064] In this 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 dataset based on the adversarial attack algorithm. The adversarial robustness of the pattern decomposition deep neural network is evaluated using the adversarial sample dataset. If the evaluation result is not satisfactory, 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 laser mode coefficients based on a single laser near-field spot image, or a dual image of laser near-field and far-field spots. Training the network may include three steps: constructing a mode decomposition training dataset, training the deep neural network, and evaluating the deep neural network.

[0066] In this embodiment, a simulation method is used to construct the mode decomposition training dataset, including: calculating the laser mode based on given laser physical parameters, randomly generating mode coefficients for the laser mode, weighting and superimposing the laser mode and mode coefficients to obtain the corresponding near-field laser spot intensity distribution, and storing it in image format to obtain a simulated near-field laser spot image. Then, weighting and superimposing the laser mode and mode coefficients, performing a Fourier transform, and then obtaining the modulus again to obtain the far-field laser spot intensity distribution, storing it in image format to obtain a simulated far-field laser spot image. The simulated near-field laser spot image and its corresponding mode coefficients are combined into a set of training samples, or the simulated near-field and far-field laser spot images and their corresponding mode coefficients are combined into a set of training samples. The mode decomposition training dataset is constructed based on multiple sets of training samples.

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

[0068] Specifically, when a training sample set includes simulated images of near-field laser spots and their corresponding mode coefficients, the simulated images are used as input and the mode coefficients as ground truth labels during network training. When a training sample set includes simulated images of both near-field and far-field laser spots and their corresponding mode coefficients, the simulated images are used as input and the mode coefficients corresponding to these two simulated images are used as ground truth labels during network training.

[0069] Furthermore, the given deep neural network is trained using the pattern decomposition training dataset.

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

[0071] Furthermore, based on the given deep neural network and the prediction results from the laser spot image input, a loss function is calculated. The adjustable parameters of the deep neural network are then updated based on the calculation results. This process is repeated until the deep neural network converges. Through training, the deep neural network learns the mapping relationship between the laser spot image and the corresponding mode coefficients.

[0072] In this embodiment, the simulation method used when constructing the pattern decomposition training dataset is adopted to construct the pattern decomposition test dataset. The accuracy of the trained pattern decomposition deep neural network is tested using the pattern decomposition test dataset to confirm that the trained pattern decomposition deep neural network has the ability to predict laser pattern coefficients.

[0073] Specifically, the aforementioned pattern decomposition deep neural network is tested and evaluated using a pattern decomposition test dataset to confirm its training effectiveness. It should be noted that this evaluation typically only assesses the accuracy of the deep neural network's pattern coefficient predictions.

[0074] In another embodiment, the training data in the constructed pattern decomposition training dataset can be divided into two datasets in an 8:2 ratio. One dataset is used as the training set to train the pattern decomposition deep neural network, and the other, smaller dataset 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 dataset. The process will be explained later when constructing the adversarial example dataset, and will not be described here.

[0076] Furthermore, when evaluating the prediction accuracy of deep neural network mode coefficients, for test datasets obtained through simulation methods, the difference between the ground truth mode coefficients and the predicted mode 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 test datasets obtained through experimental methods, since the ground truth mode coefficients are unknown, the difference between the input laser spot image and the reconstructed image is generally used as an indicator for evaluation.

[0077] Considering that deep neural networks may be subject to adversarial attacks in certain practical applications, it is necessary to evaluate their adversarial robustness before practical application. In step S110, an adversarial example dataset is constructed based on adversarial attack algorithms, and the adversarial robustness of the pattern decomposition deep neural network is evaluated using the adversarial example dataset.

[0078] Adversarial examples are tiny perturbations that are imperceptible to humans added to the original samples, causing a degrade in the performance of deep learning models.

[0079] In step S110, the object to be disturbed can 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 adversarial attack algorithm is obtained by optimizing the basic iterative method.

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

[0082] Simulations revealed that the basic iterative method, when used to attack deep neural networks with pattern decomposition, generates adversarial examples with insufficient concealment. In this embodiment, an optimized adversarial attack algorithm based on the basic iterative algorithm considers both attack effectiveness and the concealment of adversarial examples. The attack logic is as follows: given a perturbation threshold, seek the optimal perturbation direction to maximize the loss gradient while minimizing the distortion of the laser spot image, i.e.:

[0083]

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

[0085] When using the aforementioned adversarial attack algorithms, the attack can be categorized into two types based on the amount of information the attacker has about the target: white-box attacks and black-box attacks.

[0086] Specifically, white-box attacks refer to attacks where the attacker has complete knowledge and access to the model, i.e., the deep neural network, including its structure, weights, inputs, and outputs, and can interact with the model system during the generation of adversarial attack data. Because the attacker has complete control over the model's information, they can design specific attack algorithms tailored to the characteristics of the attacked model.

[0087] Specifically, black-box attacks, unlike white-box attacks, involve attackers with only limited knowledge of the model. The attacker knows nothing about the model's structure and weights, only a portion of its inputs and outputs.

[0088] When verifying the effectiveness of the above adversarial attack algorithm, we first verified the algorithm's effectiveness under white-box attacks, and then verified that the algorithm can be used for black-box attacks. Through verification, we found that the adversarial attack algorithm is effective under both white-box and black-box attacks and has transferability.

[0089] In this embodiment, simulation and experimental methods are used when constructing the adversarial sample dataset based on the adversarial attack algorithm.

[0090] Specifically, the simulation method includes: adding adversarial perturbations to laser spot images in the mode decomposition test dataset using an adversarial attack algorithm. The attack logic of the adversarial attack algorithm is to maximize the loss gradient and minimize the distortion of the spot image. The attack methods include white-box attacks and black-box attacks. A set of simulated adversarial samples is constructed by combining the simulated laser near-field spot images with added adversarial perturbations and the corresponding mode coefficients, or a set of simulated adversarial samples is constructed by combining the simulated laser near-field and far-field spot images with added adversarial perturbations and the corresponding mode coefficients. A simulated adversarial sample dataset is then constructed based on multiple sets of simulated adversarial samples.

[0091] Specifically, the experimental method includes: obtaining laser near-field and far-field spot measurement images through experiments. Adversarial perturbations are added to these laser near-field and far-field spot measurement images using an adversarial attack algorithm. The laser near-field spot measurement images with added adversarial perturbations, along with their corresponding images, are combined into a set of adversarial experimental samples. Alternatively, the laser near-field and far-field spot measurement images with added adversarial perturbations, along with their corresponding images, are combined into a set of adversarial experimental samples. An adversarial experimental sample dataset is constructed based on multiple sets of adversarial experimental samples.

[0092] In this embodiment, the following is constructed: Figure 3 The experimental setup shown is used to measure laser near-field (and far-field) spot images in experiments. When constructing the above-mentioned mode decomposition test dataset, multiple laser near-field (and far-field) spot images were repeatedly obtained as test samples. When constructing the adversarial example dataset, multiple laser near-field (and far-field) spot measurement images were first generated experimentally, and then perturbations were added to these measurement images to obtain adversarial examples.

[0093] In this embodiment, when evaluating the adversarial robustness of the mode decomposition deep neural network using an adversarial example dataset: when the adversarial example dataset is obtained by simulation, a set of laser spot images from simulated adversarial examples is input into the mode decomposition deep neural network to obtain laser mode coefficient prediction values. The difference between the laser mode coefficient prediction values ​​and the mode coefficients in the set of simulated adversarial examples is calculated. If the calculation 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 dataset is obtained using experimental methods, the laser spot images with added adversarial perturbations from a set of experimental adversarial samples are input into the mode decomposition deep neural network to obtain laser mode coefficient prediction values. The laser spot images are then reconstructed based on the laser mode coefficient prediction values ​​to obtain reconstructed laser spot images. The difference between the reconstructed laser spot images and the measured laser spot images in the set of experimental adversarial samples is calculated. If the calculation result is greater than a 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 a pattern decomposition deep neural network, a single index can be used to evaluate the adversarial robustness of the pattern decomposition deep neural network; or multiple indices and index aggregation methods can be used to evaluate the adversarial robustness of the pattern decomposition deep neural network.

[0096] Specifically, the indicators include adversarial indicators such as adversarial attack success rate, average confidence of adversarial samples, and upper and lower bounds of conflict, as well as 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 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.

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

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

[0100] The aforementioned adversarial attack and defense method for deep neural networks used in laser mode decomposition involves adding perturbations to sample images using an adversarial attack algorithm to obtain adversarial examples. These adversarial examples are then input into the deep neural network to obtain predicted laser mode coefficients. The adversarial robustness of the trained deep neural network is evaluated based on the difference between the predicted laser mode coefficients and the ground truth labels corresponding to the sample images. If the evaluation result indicates that the adversarial robustness is insufficient, an adversarial defense algorithm is used to improve it. This method can evaluate and improve the adversarial robustness of deep neural networks.

[0101] This application also provides a laser mode coefficient measurement soft sensor, which includes a laser spot image acquisition unit and a mode coefficient soft measurement unit. The mode coefficient soft measurement unit is equipped with an adversarial robustness-enhancing deep neural network obtained from the aforementioned adversarial attack and defense method for laser mode decomposition deep neural networks. 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 coefficients from the single laser near-field spot image or the dual image of the laser near-field and far-field spots using the adversarial robustness-enhancing deep neural network.

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

[0103] When using this laser mode coefficient measurement soft sensor to predict the mode coefficients of adversarial samples 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 sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed 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 some of the sub-steps or stages of other steps.

[0105] In one embodiment, such as Figure 4 As shown, an adversarial attack and defense method device against laser mode decomposition deep neural networks is provided, including: a mode decomposition deep neural network training module 200, a mode decomposition deep neural network evaluation module 210, and an adversarial robustness enhancement module 220, wherein:

[0106] The deep neural network training module 200 for pattern decomposition is used to construct a pattern decomposition training dataset and train a given deep neural network using the pattern decomposition training dataset to obtain a pattern decomposition deep neural network. The pattern 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 laser near-field and far-field spot images as input.

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

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

[0109] Specific limitations regarding adversarial attacks and defenses against laser mode decomposition (LMD) deep neural networks can be found in the above section on adversarial attack and defense methods against LMD deep neural networks, and will not be repeated here. Each module in the aforementioned adversarial attack and defense device against LMD deep neural networks can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in a computer device, or stored in software in the memory of a computer device, so that the processor can call and execute the corresponding operations of each module.

[0110] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When executed by the processor, the computer program implements an adversarial attack and defense method against laser pattern decomposition deep neural networks. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

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

[0112] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0113] A pattern decomposition training dataset is constructed, and a given deep neural network is trained using the pattern decomposition training dataset to obtain a pattern decomposition deep neural network. The pattern decomposition deep neural network has the ability to predict laser pattern coefficients using a single laser near-field spot image or a dual image of laser near-field and far-field spots as input.

[0114] An adversarial sample dataset is constructed based on an adversarial attack algorithm, and the adversarial robustness of the mode decomposition deep neural network is evaluated using the adversarial sample dataset.

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

[0116] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0117] A pattern decomposition training dataset is constructed, and a given deep neural network is trained using the pattern decomposition training dataset to obtain a pattern decomposition deep neural network. The pattern decomposition deep neural network has the ability to predict laser pattern coefficients using a single laser near-field spot image or a dual image of laser near-field and far-field spots as input.

[0118] An adversarial sample dataset is constructed based on an adversarial attack algorithm, and the adversarial robustness of the mode decomposition deep neural network is evaluated using the adversarial sample dataset.

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

[0120] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, 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. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0121] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for adversarial attacks and defenses against deep neural networks for laser mode decomposition, characterized in that, The method includes: A pattern decomposition training dataset is constructed, and a given deep neural network is trained using the pattern decomposition training dataset to obtain a pattern decomposition deep neural network. The pattern decomposition deep neural network has the ability to predict laser pattern coefficients using a single laser near-field spot image or a dual image of laser near-field and far-field spots as input. An adversarial sample dataset is constructed based on an adversarial attack algorithm, and the adversarial robustness of the mode decomposition deep neural network is evaluated using the adversarial sample dataset. If the evaluation result shows that the adversarial robustness does not meet the requirements, then an adversarial defense algorithm is used to improve the adversarial robustness of the pattern decomposition deep neural network. When evaluating the adversarial robustness of the mode decomposition deep neural network using the adversarial example dataset: When an adversarial sample dataset is obtained using a simulation method, a set of laser spot images from the simulated adversarial samples are input into the mode decomposition deep neural network to obtain the predicted laser mode coefficient values. Calculate the difference between the predicted laser mode coefficients and the mode coefficients in the set of simulated adversarial samples; If the calculation result is greater than the preset threshold, the evaluation result is that the robustness against adversarial forces does not meet the requirements. When an adversarial sample dataset is obtained using experimental methods, the laser spot images with added adversarial perturbations from a set of experimental adversarial samples are input into the mode decomposition deep neural network to obtain the predicted laser mode coefficient values. The laser spot image is reconstructed based on the laser mode coefficient prediction value to obtain the reconstructed laser spot image. Calculate the difference between the reconstructed laser spot image and the laser spot measurement image in the adversarial samples of this set of experiments; If the calculation result is greater than the preset threshold, the evaluation result is that the robustness against adversarial forces does not meet the requirements. When constructing an adversarial sample dataset based on adversarial attack algorithms, simulation and experimental methods are employed. The simulation method includes: adding adversarial perturbations to laser spot images in the mode decomposition test dataset using the adversarial attack algorithm. The attack logic of the adversarial attack algorithm is to maximize the loss gradient and minimize the distortion of the spot image. The attack methods include white-box attack and black-box attack. A set of simulated adversarial samples is formed by adding adversarial perturbation to the simulated laser near-field spot images and the corresponding mode coefficients, or by adding adversarial perturbation to the simulated laser near-field and far-field spot images and the corresponding mode coefficients. A simulated adversarial sample dataset is constructed based on multiple sets of simulated adversarial samples. The experimental method includes: obtaining measurement images of laser near-field and far-field spots through experiments; The adversarial attack algorithm is used to add adversarial perturbations to the laser near-field and far-field spot measurement images. The laser near-field spot measurement images with added adversarial perturbations and the corresponding laser near-field spot measurement images are combined into a set of experimental adversarial samples. Alternatively, the laser near-field and far-field spot measurement images with added adversarial perturbations and the corresponding laser spot measurement images are combined into a set of experimental adversarial samples. An experimental adversarial sample dataset is constructed based on multiple sets of experimental adversarial samples. 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 dataset obtained by mixing the simulated adversarial sample dataset and the mode decomposition training dataset to perform secondary training on the mode decomposition deep neural network until convergence, thereby obtaining the deep neural network with improved adversarial robustness. The robust key fine-tuning is achieved by fine-tuning the non-robust key modules of the deep neural network to obtain the deep neural network with improved robustness against adversarial attacks.

2. The adversarial attack and defense method against laser mode decomposition deep neural networks according to claim 1, characterized in that, When constructing the pattern decomposition training dataset, simulation methods are used, including: The laser mode is calculated based on the given laser physical parameters, and the mode coefficients of the laser mode are randomly generated. The laser mode and mode coefficients are weighted and superimposed to obtain the modulus, resulting in the corresponding laser near-field spot intensity distribution, which is then stored in image format to obtain a simulated image of the laser near-field spot. The laser mode and mode coefficients are weighted and superimposed, then Fourier transform is performed and the modulus is calculated to obtain the laser far-field spot intensity distribution, which is then stored in image format to obtain a laser far-field spot simulation image. The simulation images of the laser near-field spot and the corresponding mode coefficients are combined into a set of training samples, or the simulation images of the laser near-field and far-field spot and the corresponding mode coefficients are combined into a set of training samples. The mode decomposition training dataset is constructed based on multiple sets of training samples.

3. The adversarial attack and defense method against laser mode decomposition deep neural networks according to claim 2, characterized in that, The simulation method used to construct the training dataset for pattern decomposition was adopted to construct the test dataset for pattern decomposition. The accuracy of the trained deep neural network for pattern decomposition was tested using the test dataset to confirm that the trained deep neural network for pattern decomposition has the ability to predict laser pattern coefficients.

4. The adversarial attack and defense method against laser mode decomposition deep neural networks according to claim 1, characterized in that, When evaluating the adversarial robustness of the aforementioned pattern decomposition deep neural network: A single metric is used to evaluate the adversarial robustness of the pattern decomposition deep neural network; or Multiple indicators and indicator aggregation methods are used to evaluate the adversarial robustness of the pattern decomposition deep neural network.

5. A soft sensor for measuring laser mode coefficient, 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 adversarial robustness-enhanced deep neural network obtained by the adversarial attack and defense method for laser mode decomposition deep neural network according to any one of claims 1-4. The laser spot image acquisition unit is used to acquire a single laser near-field spot image, or a dual image of laser near-field and far-field spots. The mode coefficient soft measurement unit is used to obtain the corresponding mode coefficients based on the single laser near-field spot image or the dual images of laser near-field and far-field spots using the deep neural network with improved robustness.

6. The laser mode coefficient measurement soft sensor according to claim 5, characterized in that, The mode coefficient soft measurement unit also includes a visualization interface for receiving control commands and displaying mode decomposition results.

Citation Information

Patent Citations

  • Deep neural network robustness evaluation method and tuning method

    CN115439880A

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

    CN117253161A