General adversarial disturbance generation method and device based on SAR-ATR, equipment and medium

By using the Vision Transformer generator and averaging processing, the problems of information loss and disturbance randomness in the SAR-ATR system are solved, and the attack success rate and concealment of adversarial samples are improved.

CN120669207APending Publication Date: 2025-09-19Chinese People's Liberation Army Cyberspace Force Information Engineering University
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510758140.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-09
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

Existing SAR-ATR systems suffer from information loss and perturbation randomness problems in adversarial sample attacks, which leads to an increase in the target recognition error rate.

Method used

The Vision Transformer generator is combined with averaging processing to generate a perturbation sequence, and the optimal perturbation sequence is optimized through the total loss function to improve the attack success rate and concealment.

Benefits of technology

The attack success rate and concealment of SAR images are improved, and the information loss and disturbance randomness of adversarial samples are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120669207A_ABST
    Figure CN120669207A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a general adversarial disturbance generation method and device based on SAR-ATR, equipment and a medium, and relates to the technical field of synthetic aperture radar target recognition, and the method comprises the steps: inputting a mean image into a Vision Transform generator, and generating a disturbance sequence; based on the disturbance sequence and the SAR original image, obtaining an adversarial sample and an out-of-order adversarial sample; calculating a total loss function based on the adversarial sample and the out-of-order adversarial sample; and optimizing the disturbance sequence according to the total loss function to obtain an optimal disturbance sequence. According to the scheme, Transform is used for replacing a traditional convolutional neural network to serve as a generator, and equalization processing and a cosine diversity loss function on the image are added, so that the attack success rate and the concealment are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of synthetic aperture radar target recognition, and in particular to a method, device, equipment and medium for generating universal countermeasure disturbances based on SAR-ATR. Background Art

[0002] Synthetic Aperture Radar (SAR) has the advantages of all-day, all-weather, and high-resolution imaging, and has been widely used in civil and military fields such as resource remote sensing, geographic mapping, and precision guidance.

[0003] With the development of artificial intelligence technology, automatic target recognition (ATR) based on deep learning has become the main technical approach for SAR applications. Due to the high sensitivity of deep learning to input data, SAR-ATR systems are vulnerable to adversarial sample attacks, which significantly increase the target recognition error rate.

[0004] Adversarial example attacks against SAR-ATR primarily originate from the field of optics. Since Szegedy et al. first proposed adversarial examples in optics, numerous researchers have conducted research on this technique, with Universal Adversarial Perturbation (UAP) becoming the mainstream of adversarial example research. Universal adversarial perturbations are not generated for a specific type of image; their purpose is to cause errors in the recognition of images of all categories in the original data.

[0005] In the process of generating SAR-ATR adversarial perturbations, research has primarily focused on how to improve the attack effectiveness of the perturbations and enhance their concealment. Overall, the attack success rate is high, but the concealment is still insufficient. On the one hand, SAR-ATR adversarial perturbations primarily use convolutional neural networks (CNNs) to construct the generators of GANs (Generative Adversarial Networks). Convolutional neural networks primarily perform local processing, and when processing this type of data, information loss or confusion may occur. On the other hand, most algorithms use random noise vectors as GAN inputs. While this input helps the generated perturbations be more random, it is not relevant to the dataset. Summary of the Invention

[0006] In view of this, an embodiment of the present invention provides a method for generating a universal anti-perturbation based on SAR-ATR to address the technical problems of information loss and randomness in the generated perturbation in the conventional universal anti-perturbation generation methods. The method includes:

[0007] Perform averaging processing on the original SAR image to obtain the mean image;

[0008] Inputting the mean image into the Vision Transformer generator to generate a perturbation sequence;

[0009] Based on the perturbation sequence and the SAR original image, obtaining an adversarial sample and a disordered adversarial sample;

[0010] Calculating a total loss function based on the adversarial example and the out-of-order adversarial example;

[0011] The perturbation sequence is optimized according to the total loss function to obtain an optimal perturbation sequence.

[0012] The present invention also provides a SAR-ATR-based universal anti-disturbance generation device to address the technical issues of information loss and randomness in the generated disturbances in conventional universal anti-disturbance generation methods. The device includes:

[0013] The averaging module is used to perform averaging processing on the original SAR image to obtain the mean image;

[0014] A perturbation module, configured to input the mean image into a Vision Transformer generator to generate a perturbation sequence;

[0015] A sample acquisition module, configured to obtain adversarial samples and out-of-order adversarial samples based on the perturbation sequence and the SAR original image;

[0016] A loss calculation module, configured to calculate a total loss function based on the adversarial sample and the out-of-order adversarial sample;

[0017] An optimization module is used to optimize the perturbation sequence according to the total loss function to obtain an optimal perturbation sequence.

[0018] An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the computer device implements any of the above-mentioned general anti-disturbance generation methods based on SAR-ATR, so as to solve the technical problems in the prior art of general anti-disturbance generation methods such as information loss and randomness of generated disturbances.

[0019] An embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program for executing any of the above-mentioned SAR-ATR-based universal anti-disturbance generation methods, so as to solve the technical problems of information loss and randomness of the generated disturbance in the conventional universal anti-disturbance generation method.

[0020] Compared with the prior art, the beneficial effects achieved by at least one of the above-mentioned technical solutions adopted in the embodiments of this specification include at least the following: inputting the mean image into the Vision Transformer generator to generate a perturbation sequence; obtaining adversarial samples and shuffled adversarial samples based on the perturbation sequence and the original SAR image; calculating the total loss function based on the adversarial samples and the shuffled adversarial samples; optimizing the perturbation sequence according to the total loss function to obtain the optimal perturbation sequence. This application uses ViT as a universal adversarial perturbation generator for SAR images. The self-attention mechanism of ViT can better capture the texture and structural information in SAR images, thereby improving the success rate and concealment of the attack. At the same time, the mean image is calculated for each batch of original SAR images, and an input vector containing the structural information of the SAR image is constructed, which further improves the concealment of the adversarial sample. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0022] Figure 1 Flowchart of a method for generating a general SAR-ATR anti-disturbance according to an embodiment of the present invention;

[0023] Figure 2 1 is a flowchart of an algorithm implementation of a SAR-ATR general anti-disturbance generation method provided by an embodiment of the present invention;

[0024] Figure 3 This is a diagram of the Transformer generator structure provided by an embodiment of the present invention;

[0025] Figure 4 This is a statistical chart of the recognition effect after non-target attacks provided by an embodiment of the present invention;

[0026] Figure 5 This is a statistical diagram of the target post-attack recognition effect provided by an embodiment of the present invention;

[0027] Figure 6 This is a non-targeted attack adversarial sample graph provided by an embodiment of the present invention;

[0028] Figure 7 is a target attack adversarial sample graph provided by an embodiment of the present invention;

[0029] Figure 8 This is a classification result diagram of non-target attacks provided by an embodiment of the present invention;

[0030] Figure 9 This is a classification result diagram of target attacks provided by an embodiment of the present invention;

[0031] Figure 10 This is a structural block diagram of a computer device provided by an embodiment of the present invention;

[0032] Figure 11 This is a structural block diagram of a SAR-ATR-based universal anti-disturbance generation device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0033] The embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0034] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that, in the absence of conflict, the features in the following embodiments and embodiments can be combined with each other. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative work are within the scope of protection of this application.

[0035] In an embodiment of the present invention, a general anti-disturbance generation method based on SAR-ATR is provided, such as Figure 1 and Figure 2 As shown, the method includes:

[0036] Step S101: performing averaging processing on the original SAR image to obtain a mean image;

[0037] Step S102: input the mean image into the Vision Transformer generator to generate a perturbation sequence;

[0038] Step S103: obtaining adversarial samples and out-of-order adversarial samples based on the perturbation sequence and the SAR original image;

[0039] Step S104: Calculate a total loss function based on the adversarial sample and the out-of-order adversarial sample;

[0040] Step S105: Optimize the perturbation sequence according to the total loss function to obtain an optimal perturbation sequence.

[0041] In this embodiment, a general adversarial perturbation generation method for SAR image automatic target recognition based on deep learning is proposed. It is used to add small perturbations to SAR imaging interference to achieve the attack effect of misrecognition. Traditional SAR-ATR adversarial perturbations mainly use convolutional neural networks to construct the GAN generator. However, convolutional neural networks mainly perform local processing and may suffer from information loss or information confusion when processing such data. To address this problem, this embodiment uses the Vision Transformer (ViT) as a general adversarial perturbation generator for SAR images. ViT's self-attention mechanism can better capture the texture and structure information in SAR images. By interacting with the discriminator constructed by the convolutional neural network, it achieves a high attack success rate and stealth. Therefore, the method in this embodiment solves the problems of information loss and randomness of the generated perturbations caused by common methods, further improving the stealth of adversarial samples and the attack success rate.

[0042] On the other hand, most traditional algorithms use random noise vectors as GAN input. While this input helps generate more random perturbations, it is not relevant to the dataset. To address this issue, this example designs an AvgImage Composer module (AC, average image generator, used for averaging). This module calculates the average image for each batch of raw SAR images, constructing an input vector that contains structural information about the SAR image, further improving the stealth of adversarial examples.

[0043] In specific implementation, the expression for averaging the original SAR image is as follows:

[0044]

[0045] Among them, n is the size of the batch, x is the original image, i and j represent the width and height of the image pixel values ​​respectively. is the mean image. By averaging the batch of images to obtain a new image vector, which replaces the original random noise, the image characteristics of the SAR image can be better understood.

[0046] In one embodiment, inputting the mean image into a Vision Transformer generator to generate a perturbation sequence includes:

[0047] Inputting the mean image into the Vision Transformer generator for initialization and one-dimensional transformation to obtain multiple image blocks;

[0048] Performing a fully connected layer conversion on the multiple image blocks to obtain a first eigenvector;

[0049] Performing a secondary dimensional transformation and position encoding on the first eigenvector to obtain a second eigenvector;

[0050] Input the second feature vector into the encoder module of the Vision Transformer generator for processing and perform an upsampling operation to obtain a third feature vector;

[0051] Performing a three-dimensional transformation and a convolution operation on the third eigenvector to obtain the disturbance sequence.

[0052] When implementing it, refer to Figure 3 First, the input is a single-channel image of size 128×128, which is then initialized and dimensionally transformed to obtain several image blocks of size 16×16. It is then converted into a higher-dimensional feature representation (first eigenvector) through a fully connected layer, which facilitates the model's feature extraction and improved understanding of the data. After that, it undergoes dimension transformation again, and position encoding is performed to add the position information to the first eigenvector. It is then input to the Encoder module of the Transformer and up-sampled. The Encoder of the Transformer is a repeatedly stacked Encoder Block, which is stacked 5, 4, and 2 times in this embodiment, respectively. Each layer is mainly composed of a Layer Norm layer (layer normalization), an Attention layer (attention mechanism), and an MLP layer (multi-layer perceptron). The Layer Norm layer is used to normalize the input or output of a certain layer in the neural network, making the input distribution of each layer more stable, thereby accelerating training and improving the stability of the model; the Attention layer is used to dynamically assign weights by calculating the correlation between different positions in the input sequence, thereby capturing long-distance dependencies; the MLP layer is used to perform nonlinear transformations on the features of each position to enhance the expressive power of the model.

[0053] The upsampling operation (pixel shuffle) is performed twice. The upsampling operation is shown in the formula:

[0054] H→2H, W→2W, C→C / 4,

[0055] In the formula, H represents the height of the image, W represents the width of the image, and C represents the number of channels of the image. After two upsampling operations, the dimension of the data is changed from (bs, 256, 512) to (bs, 4096, 32). Then, after the dimension transformation (view) and convolution operation (Conv2d), the data is transformed back to the original image size. The output (Output) is the same as the original image. Figure 1 The perturbation sequence of sample size (bs,1,128,128).

[0056] In one embodiment, referring to Figure 2 , obtaining adversarial samples and disordered adversarial samples based on the perturbation sequence and the SAR original image, including:

[0057] Adding the perturbation sequence to the SAR original image to obtain the adversarial sample;

[0058] Randomly shuffling the disturbance sequence to obtain a disordered disturbance sequence;

[0059] The disordered perturbation sequence is added to the SAR original image to obtain the disordered adversarial sample.

[0060] In one embodiment, the calculating the total loss function based on the adversarial sample and the out-of-order adversarial sample includes:

[0061] Obtaining a cosine diversity loss function according to the cosine distance between the adversarial sample and the scrambled adversarial sample;

[0062] Obtaining a distortion loss function based on the adversarial sample and the SAR original image;

[0063] Based on the adversarial example, obtaining an attack loss function;

[0064] The cosine diversity loss function, the distortion loss function, and the attack loss function are summed according to preset weights to obtain the total loss function.

[0065] In one embodiment, the attack loss function includes a non-target attack loss function and a target attack loss function.

[0066] Specifically, attacks are categorized into non-targeted and targeted attacks based on the attacker's purpose. A non-targeted attack involves simply tricking the target model into misidentifying an object, while a targeted attack involves deceiving the recognition system into identifying it as a specific target.

[0067] The non-target attack loss function is as follows:

[0068]

[0069] The target attack loss function is as follows:

[0070]

[0071] The expression of the distortion loss function is:

[0072]

[0073] Among them, L a Represents the attack loss function, K ta is the target category, K tr is the true target category, x is the clean sample, is an adversarial sample, L n is the distortion loss function, i represents the target category label in the dataset, and p is the norm.

[0074] Furthermore, the calculation formula of the cosine diversity loss function is:

[0075]

[0076] Among them, L m is the cosine diversity loss function, x n is the original SAR image, δ n is the disturbance sequence, δ n' is the disordered perturbation sequence, d represents the distance operation and the mean operation, and B is the total number of images in the same batch.

[0077] In this embodiment, by introducing CosineDiversity Loss (cosine diversity loss function) into the loss function part, the cosine distance between the scrambled adversarial sample and the original adversarial sample is calculated, thereby improving the universality of the adversarial perturbation to different image samples in the data set and further increasing the attack success rate of the universal adversarial perturbation.

[0078] The total loss function can be calculated using the following formula:

[0079] L tol =α a L a +α n L n +α m L m ,

[0080] Among them, α a , α n , α m Represent the weight of the attack loss function, the weight of the distortion loss function, and the weight of the CosineDiversity Loss function, respectively. tol is the total loss function.

[0081] In one embodiment, optimizing the perturbation sequence according to the total loss function includes:

[0082] According to the total loss function, the perturbation sequence is optimized by an Adam optimization generator.

[0083] During the specific implementation, in order to gain a deeper understanding of the image features of the SAR image, this embodiment first averages the original data to obtain a mean image, and then imports it into the Transformer generator. Transformer is used to generate a sequence of perturbations, and the perturbation sequence is combined with the original image to obtain the corresponding adversarial sample. The adversarial sample is used to attack the target and check the attack effect. In order to ensure the diversification of subsequent perturbations and improve the general attack effect, the generated perturbation sequence is randomly shuffled and added to the original image to obtain the perturbed adversarial sample (random adversarial sample). The cosine distance between the perturbed adversarial sample and the normal adversarial sample is calculated to obtain the Cosine Diversity Loss (cosine diversity loss function). The total loss function is then obtained by superimposing it with the attack loss function and the distortion loss function according to certain weights. The Adam optimization generator is used to optimize according to the total loss function, and finally the generated perturbation satisfies the deception effect.

[0084] The results of the recognition effect after non-target attack using the method of this application are referenced Figure 4 , the recognition effect after the target attack refers to Figure 5 ,The AC-ViT in the figure is the generation model adopted by this application, Figure 6 and Figure 7 They are adversarial sample graphs for non-targeted attacks and targeted attacks, Figure 8 and Figure 9 These are the classification results for non-targeted attacks and targeted attacks respectively.

[0085] exist Figure 6 and Figure 7 In the figure, the images in row a are original images, the images in row b are perturbations, and the images in row c are adversarial samples. Figure 6 、 Figure 7It can be seen that the adversarial examples generated by the Transformer generator are highly concealed and have a high degree of similarity to the original image. Furthermore, the perturbations generated by the Transformer differ significantly from those generated by neural networks. The perturbations generated by traditional neural networks are similar in style to the original image and appear as a single, integrated part. The perturbations generated by the Transformer have a distinct blocky pattern. Furthermore, observing the perturbations reveals that the perturbations are primarily concentrated in the center area of ​​the target. An overall analysis of the perturbations reveals a wide variety of perturbation pixel distribution and pixel count.

[0086] Figure 8 and Figure 9 The figures show the classification results after non-targeted attack and targeted attack respectively. The vertical axis is the true original image label, and the horizontal axis is the corresponding prediction result, that is, the classification result of the recognition model.

[0087] In non-targeted attacks, the classification results after the attack are discrete. The numbers along the diagonal from the upper left to the lower right represent correct classifications, but the results show that the correct classification rate is relatively low. This intuitively shows that the attack is quite effective.

[0088] The target category selected for the targeted attack was T-72, the eighth target. Experimental results show that the final targeted attack classification results accurately focused on T-72, with a few images classified as other targets.

[0089] In the above embodiment, ViT is used as a generator of universal adversarial perturbations for SAR images. The self-attention mechanism of ViT can better capture the texture and structural information in SAR images, and obtains a higher attack success rate and concealment by competing with the discriminator constructed by the convolutional neural network. At the same time, the present application designs an AvgImage Composer module to calculate the mean image for each batch of SAR original images, construct an input vector containing SAR image structural information, and further improve the concealment of the adversarial sample. At the same time, CosineDiversityLoss is introduced in the loss function part, which is obtained by calculating the cosine distance between the adversarial sample after scrambling the order (random adversarial sample) and the original adversarial sample, further increasing the attack success rate of the universal adversarial perturbation. Therefore, the present application improves the attack effect by using Transformer to replace the traditional convolutional neural network as the generator, and adding averaging processing and cosine diversity loss function.

[0090] In this embodiment, a computer device is provided, such as Figure 10As shown, it includes a memory 101, a processor 102 and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any of the above-mentioned general countermeasure disturbance generation methods based on SAR-ATR is implemented.

[0091] Specifically, the computer device may be a computer terminal, a server or a similar computing device.

[0092] In this embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program for executing any of the above-mentioned SAR-ATR-based universal countermeasure disturbance generation methods.

[0093] Specifically, computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable storage media does not include transitory media such as modulated data signals and carrier waves.

[0094] Based on the same inventive concept, a SAR-ATR-based universal anti-disturbance generating device is also provided in the embodiments of the present invention, as described in the following embodiments. Since the principle of solving the problem based on the SAR-ATR-based universal anti-disturbance generating device is similar to that based on the SAR-ATR-based universal anti-disturbance generating method, the implementation based on the SAR-ATR-based universal anti-disturbance generating device can refer to the implementation based on the SAR-ATR-based universal anti-disturbance generating method, and the repetitions are not repeated here. As used below, the term "unit" or "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented with software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0095] Figure 11 : is a structural block diagram of a SAR-ATR general anti-disturbance generation device according to an embodiment of the present invention, such as Figure 11As shown, it includes: an averaging module 111, a perturbation module 112, a sample acquisition module 113, a loss calculation module 114 and an optimization module 115. The structure is described below.

[0096] The averaging module 111 is used to perform averaging processing on the original SAR image to obtain a mean image;

[0097] a perturbation module 112, configured to input the mean image into a Vision Transformer generator to generate a perturbation sequence;

[0098] A sample acquisition module 113 is configured to obtain adversarial samples and out-of-order adversarial samples based on the perturbation sequence and the SAR original image;

[0099] A loss calculation module 114 is configured to calculate a total loss function based on the adversarial example and the scrambled adversarial example;

[0100] The optimization module 115 is configured to optimize the perturbation sequence according to the total loss function to obtain an optimal perturbation sequence.

[0101] In one embodiment, the disturbance module 112 is further configured to:

[0102] Inputting the mean image into the Vision Transformer generator for initialization and one-dimensional transformation to obtain multiple image blocks;

[0103] Performing a fully connected layer conversion on the multiple image blocks to obtain a first eigenvector;

[0104] Performing a secondary dimensional transformation and position encoding on the first eigenvector to obtain a second eigenvector;

[0105] Input the second feature vector into the encoder module of the Vision Transformer generator for processing and perform an upsampling operation to obtain a third feature vector;

[0106] Performing a three-dimensional transformation and a convolution operation on the third eigenvector to obtain the disturbance sequence.

[0107] In one embodiment, the sample acquisition module 113 is further configured to:

[0108] Adding the perturbation sequence to the SAR original image to obtain the adversarial sample;

[0109] Randomly shuffling the disturbance sequence to obtain a disordered disturbance sequence;

[0110] The disordered perturbation sequence is added to the SAR original image to obtain the disordered adversarial sample.

[0111] In one embodiment, the loss calculation module 114 is further configured to:

[0112] Obtaining a cosine diversity loss function according to the cosine distance between the adversarial sample and the scrambled adversarial sample;

[0113] Obtaining a distortion loss function based on the adversarial sample and the SAR original image;

[0114] Based on the adversarial example, obtaining an attack loss function;

[0115] The cosine diversity loss function, the distortion loss function, and the attack loss function are summed according to preset weights to obtain the total loss function.

[0116] In one embodiment, the loss calculation module 114 is further configured to:

[0117]

[0118] Among them, L m is the cosine diversity loss function, x n is the original SAR image, δ n is the disturbance sequence, δ n' is the disordered perturbation sequence, d represents the distance operation and the mean operation, and B is the total number of images in the same batch.

[0119] In one embodiment, the loss calculation module 114 is further configured to:

[0120] The attack loss function includes a non-target attack loss function and a target attack loss function.

[0121] In one embodiment, the optimization module 115 is further configured to:

[0122] According to the total loss function, the perturbation sequence is optimized by an Adam optimization generator.

[0123] The embodiments of the present invention achieve the following technical effects: averaging the original SAR image to obtain a mean image; inputting the mean image into the Vision Transformer generator to generate a perturbation sequence; obtaining adversarial samples and shuffled adversarial samples based on the perturbation sequence and the original SAR image; calculating the total loss function based on the adversarial samples and shuffled adversarial samples; optimizing the perturbation sequence according to the total loss function to obtain the optimal perturbation sequence. This application uses ViT as a universal adversarial perturbation generator for SAR images. The self-attention mechanism of ViT can better capture the texture and structural information in SAR images, thereby improving the success rate and concealment of the attack. At the same time, the mean image is calculated for each batch of original SAR images, and an input vector containing the structural information of the SAR image is constructed, which further improves the concealment of the adversarial sample.

[0124] Obviously, those skilled in the art should understand that the various modules or steps of the above-mentioned embodiments of the present invention can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices. Alternatively, they can be implemented using program code executable by the computing device, so that they can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described can be performed in a different order than herein, or they can be made into separate integrated circuit modules, or multiple modules or steps can be made into a single integrated circuit module for implementation. Thus, the embodiments of the present invention are not limited to any specific combination of hardware and software.

[0125] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A general anti-disturbance generation method based on SAR-ATR, characterized in that: include: Perform averaging processing on the original SAR image to obtain the mean image; Inputting the mean image into the Vision Transformer generator to generate a perturbation sequence; Based on the perturbation sequence and the SAR original image, obtaining an adversarial sample and a disordered adversarial sample; Calculating a total loss function based on the adversarial example and the out-of-order adversarial example; The perturbation sequence is optimized according to the total loss function to obtain an optimal perturbation sequence.

2. The SAR-ATR general anti-disturbance generation method according to claim 1, wherein: Inputting the mean image into the Vision Transformer generator to generate a perturbation sequence includes: Inputting the mean image into the Vision Transformer generator for initialization and one-dimensional transformation to obtain multiple image blocks; Performing a fully connected layer conversion on the multiple image blocks to obtain a first eigenvector; Performing a secondary dimensional transformation and position encoding on the first eigenvector to obtain a second eigenvector; Input the second feature vector into the encoder module of the Vision Transformer generator for processing and perform an upsampling operation to obtain a third feature vector; Performing a three-dimensional transformation and a convolution operation on the third eigenvector to obtain the disturbance sequence.

3. The SAR-ATR general anti-disturbance generation method according to claim 1, wherein: The obtaining of adversarial samples and disordered adversarial samples based on the perturbation sequence and the SAR original image includes: Adding the perturbation sequence to the SAR original image to obtain the adversarial sample; Randomly shuffling the disturbance sequence to obtain a disordered disturbance sequence; The disordered perturbation sequence is added to the SAR original image to obtain the disordered adversarial sample.

4. The SAR-ATR general anti-disturbance generation method according to claim 1, wherein: The calculating of a total loss function based on the adversarial sample and the out-of-order adversarial sample includes: Obtaining a cosine diversity loss function according to the cosine distance between the adversarial sample and the scrambled adversarial sample; Obtaining a distortion loss function based on the adversarial sample and the SAR original image; Based on the adversarial example, obtaining an attack loss function; The cosine diversity loss function, the distortion loss function, and the attack loss function are summed according to preset weights to obtain the total loss function.

5. The SAR-ATR general anti-disturbance generation method according to claim 4, wherein: The calculation formula of the cosine diversity loss function is: Among them, L m is the cosine diversity loss function, x n is the original SAR image, δ n is the disturbance sequence, δ n' is the disordered perturbation sequence, d represents the distance operation and the mean operation, and B is the total number of images in the same batch.

6. The SAR-ATR general anti-disturbance generation method according to claim 4, wherein: The attack loss function includes a non-target attack loss function and a target attack loss function.

7. The SAR-ATR general anti-disturbance generation method according to claim 1, wherein: Optimizing the perturbation sequence according to the total loss function includes: According to the total loss function, the perturbation sequence is optimized by an Adam optimization generator.

8. A SAR-ATR based universal anti-disturbance generation device, characterized in that: include: The averaging module is used to perform averaging processing on the original SAR image to obtain the mean image; A perturbation module, configured to input the mean image into a Vision Transformer generator to generate a perturbation sequence; A sample acquisition module, configured to obtain adversarial samples and out-of-order adversarial samples based on the perturbation sequence and the SAR original image; A loss calculation module, configured to calculate a total loss function based on the adversarial sample and the out-of-order adversarial sample; An optimization module is used to optimize the perturbation sequence according to the total loss function to obtain an optimal perturbation sequence.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the SAR-ATR-based universal anti-disturbance generation method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program for executing the SAR-ATR based universal countermeasure disturbance generation method according to any one of claims 1 to 7.