Spatial-frequency black-box adversarial attack method and system combined with perceptual adaptation

By combining a perceptually adaptive spatial-frequency black-box adversarial attack method, utilizing local second-order statistical features and texture-aware mask matrices, the adversarial perturbation value is adaptively updated. Nonlinear deformation and weighted fusion are performed in the spatial and frequency domains, solving the problems of decreased cross-heterogeneous network transfer capability and visual imperceptibility, and achieving efficient attack transfer and sample imperceptibility.

CN123140144APending Publication Date: 2026-11-20QUFU NORMAL UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611635594.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-22
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing black-box migration attack methods suffer from reduced migration capabilities when traversing heterogeneous networks, and it is difficult to maintain a high migration success rate while ensuring the visual imperceptibility of the image.

Method used

A spatial-frequency black-box adversarial attack method combining perception and adaptation is adopted. Texture intensity is calculated through local second-order statistical features to generate a texture-aware mask matrix. The adversarial perturbation value is adaptively updated by combining the minimum attack step size ratio lower bound. At the same time, nonlinear deformation and weighted fusion are performed in the spatial and frequency domains to generate adversarial examples.

Benefits of technology

It improves the success rate of migration attacks across heterogeneous architecture models, and removes visual artifacts from images while maintaining a high migration success rate, achieving a balance between attack migrationability and visual imperceptibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure QLYQS_2
    Figure QLYQS_2
Patent Text Reader

Abstract

The present application belongs to the technical field of black-box adversarial attack, and particularly relates to a space-frequency black-box adversarial attack method and system combined with perception adaptation. On the one hand, the present application combines space topology and frequency spectrum in two dimensions to reconstruct samples at the same time, decouples the dependence of adversarial perturbation on specific feature extraction mechanism, and improves the migration attack success rate of cross-heterogeneous architecture (CNN to ViT) models. On the other hand, the present application constructs a texture perception adaptive optimization strategy, dynamically adjusts the update step according to the local texture intensity of the image, removes the artifacts in the smooth area while maintaining high attack migration success rate, and achieves the balance between attack migration and visual imperceptibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of black-box adversarial attack technology, specifically involving a spatial-frequency adversarial attack method and system that combines perception and adaptation. Background Technology

[0002] Deep neural networks (DNNs) have been widely deployed in high-security fields such as autonomous driving and facial recognition. However, their vulnerability to adversarial examples (images that induce misjudgments by the model after being superimposed with tiny, imperceptible perturbations) exposes serious security risks. In black-box security assessment scenarios, adversarial examples are typically generated using known "alternative models" and then transferred to attack unknown "black-box target models." Among these, input transformation-based methods, which apply transformations (such as random scaling, translation, or frequency domain masking) to the image during iterative gradient updates to mitigate overfitting to the alternative models, are the core technology for improving black-box transfer capabilities.

[0003] However, existing black-box migration attack methods still have the following key flaws and shortcomings in practical applications: 1. The transformation dimension is too singular, making it difficult to cross the decision boundaries of heterogeneous networks (such as from CNN to Vision Transformer). Existing input transformations are mostly limited to single spatial coordinate adjustments or simple frequency domain masks, lacking deep-level collaborative modulation of spatial geometric topology and underlying spectral distribution. Since Convolutional Neural Networks (CNNs) favor high-frequency local textures, while Vision Transformers (ViTs) rely on low-frequency global contexts, adversarial perturbations generated by existing methods are prone to overfitting to specific feature representations of alternative models, resulting in a significant decrease in attack transferability across heterogeneous architectures.

[0004] 2. A serious trade-off exists between high attack transferability and visual imperceptibility. Traditional iterative attacks mostly employ a globally fixed step size for perturbation updates, ignoring the local texture of the image itself and the characteristics of human visual perception. In smooth background areas of an image, a fixed step size easily produces visible noise artifacts; while in highly complex textured areas, a fixed step size limits the full distribution of attack energy, making it impossible to maintain a high transfer success rate while ensuring good visual concealment of the image. Summary of the Invention

[0005] To address the problems in the background technology, this invention provides a spatial-frequency black-box adversarial attack method and system that combines perception-adaptive approaches.

[0006] The technical solution of the present invention is as follows: This invention provides a spatial-frequency black-box adversarial attack method that combines perception-adaptive approaches, comprising: S1: Utilize the local second-order statistical features of the original image to calculate the texture intensity, and then combine it with the lower bound of the minimum attack step size ratio to generate a texture-aware mask matrix. S2: For multiple neighborhood samplings in the current round, extract the joint gradient corresponding to the previous sampling, combine it with the basic noise, generate gradient-guided neighborhood noise, and superimpose the neighborhood noise onto the current image to construct a preview sample; S3: Preview samples perform spatial-frequency operations in parallel, as follows: Using the TPS variational decomposition method, the preview sample is subjected to spatial domain nonlinear deformation processing to generate spatially enhanced samples. After the preview sample is segmented, a mixed weight is randomly generated and fused with the amplitude spectrum to generate a frequency domain enhanced sample; S4: Spatial augmentation samples and frequency domain augmentation samples are input into the substitution model in parallel, and the loss with the real label is calculated separately. After superposition, the partial derivative is calculated to obtain the joint gradient corresponding to the current sample. S5: For the current round, take the average of the joint gradients corresponding to all samples, calculate the historical gradient vector using the momentum mechanism, combine it with the texture-aware mask matrix, adaptively update the adversarial perturbation value, and then execute S2. After a preset number of iterations, the obtained target adversarial perturbation values ​​are superimposed on the original image to generate adversarial sample data.

[0007] Based on the aforementioned perceptually adaptive space-frequency black-box adversarial attack method, S3 utilizes the TPS variational decomposition method to perform spatial domain nonlinear deformation processing on the preview sample, generating spatially enhanced samples, specifically as follows: The preview sample is divided into a grid and assigned control points. The control points are randomly offset within a set range. The global nonlinear mapping function is calculated using the TPS variational decomposition method and the principle of bending energy minimization. Based on the global nonlinear mapping function, the pixel coordinates of the preview sample are resampled and distorted to generate a spatially enhanced sample.

[0008] Based on the aforementioned perceptual adaptive spatial-frequency black-box adversarial attack method, after the preview sample is segmented in step S3, a mixed weight is randomly generated and weighted and fused with the amplitude spectrum to generate frequency-domain enhanced samples, specifically: The preview sample undergoes a discrete Fourier transform to separate the amplitude spectrum and phase spectrum. The preview sample is divided into multiple blocks and a mixed weight is randomly generated. After interpolation, the weight is multiplied by a frequency domain Gaussian low-pass mask to obtain a frequency domain fusion coefficient matrix. At the two-dimensional frequency domain coordinates, the amplitude spectrum of the preview sample is dynamically weighted and fused with the amplitude spectrum of the random reference image within the batch using the frequency domain fusion coefficient matrix. The fused amplitude spectrum is then combined with the phase spectrum and inverse Fourier transform is performed to generate frequency domain enhanced samples.

[0009] Based on the above-described perceptual adaptive spatial-frequency black-box adversarial attack method, S5, which combines a texture-aware mask matrix to adaptively update the adversarial perturbation value, specifically involves: After element-wise multiplication of the basic attack iteration step size with the texture-aware mask matrix, and combining this with the sign and direction of the historical gradient vectors, energy is dynamically allocated according to the texture intensity; through The norm projection truncation operator performs threshold truncation to obtain updated adversarial perturbation values.

[0010] Based on the above-described perceptually adaptive spatial-frequency black-box adversarial attack method, S1 utilizes the local second-order statistical features of the original image to calculate texture intensity, specifically as follows: A local window is slid across the three RGB channels of the original image. The variance of the center pixel is calculated based on the original pixel brightness value and mean. A zero-smoothing factor is added to quantify the texture complexity of each pixel. The statistical results of the three channels are averaged and then globally normalized to obtain the texture intensity.

[0011] Furthermore, based on the aforementioned perceptually adaptive spatial-frequency black-box adversarial attack method, the texture complexity of each pixel is quantified using the formula... To achieve; In the formula, Indicates the size is Local window Below, pixels Texture complexity; Represents the original pixel brightness value. This represents the mean. Represents the smoothing factor against zero.

[0012] Based on the above-described perceptual adaptive spatial-frequency black-box adversarial attack method, S1, which combines the lower bound of the minimum attack step size ratio to generate a texture-aware mask matrix, is obtained through the formula: To achieve; In the formula, Represents a texture-aware mask matrix. This represents the average texture intensity matrix of a single channel. This represents the lower bound of the minimum attack step size ratio.

[0013] Based on the aforementioned perceptual adaptive space-frequency black-box adversarial attack method, step S2, which extracts the joint gradient corresponding to the previous sampling and combines it with the basic noise to generate gradient-guided neighborhood noise, specifically involves: For the first sampling, a base noise sampled from a uniform distribution is generated; in subsequent sampling, the joint gradient corresponding to the previous sampling is extracted, the sign and direction of the joint gradient are taken, and the absolute value of the base noise is multiplied element by element to generate gradient-guided neighborhood noise.

[0014] Based on the above-described perceptually adaptive space-frequency black-box adversarial attack method, the joint gradient corresponding to the current sample in S4 is obtained through the formula: To achieve; In the formula, Indicates the current number The joint gradient corresponding to the sampling. This indicates the partial derivative. Indicates an alternative model, Indicates the true label, Represents the classification loss function. , These represent spatially enhanced samples and frequency-domain enhanced samples, respectively.

[0015] This invention also provides a spatial-frequency black-box adversarial attack system that combines perception-adaptive technology, comprising: Texture-aware mask matrix generation module: Utilizes the local second-order statistical features of the original image to calculate the texture intensity, and then combines the lower bound of the minimum attack step size ratio to generate a texture-aware mask matrix. Gradient-guided sampling module: For multiple neighborhood samples in the current round, extract the joint gradient corresponding to the previous sample, combine it with the basic noise, generate gradient-guided neighborhood noise, and superimpose the neighborhood noise onto the current image to construct a preview sample; Spatial-Frequency Dual-Branch Module: Preview samples perform spatial-frequency operations in parallel, as follows: Using the TPS variational decomposition method, the preview sample is subjected to spatial domain nonlinear deformation processing to generate spatially enhanced samples. After the preview sample is segmented, a mixed weight is randomly generated and fused with the amplitude spectrum to generate a frequency domain enhanced sample; Joint gradient solving module: Spatial augmented samples and frequency domain augmented samples are input into the substitution model in parallel, and the loss with the real label is calculated separately. After superposition, the partial derivative is calculated to obtain the joint gradient corresponding to the current sample. Adaptive update module: For the current round, the joint gradient corresponding to all samples is averaged, the historical gradient vector is calculated using the momentum mechanism, and after adaptively updating the adversarial value in combination with the texture-aware mask matrix, it enters the gradient-guided sampling module. After a preset number of iterations, the obtained target adversarial perturbation values ​​are superimposed on the original image to generate adversarial sample data.

[0016] Beneficial effects On the one hand, this invention constructs a spatial-frequency joint gradient depth combination to reconstruct samples simultaneously in both spatial topology and frequency spectrum dimensions, decoupling the dependence of adversarial perturbations on specific feature extraction mechanisms and improving the success rate of transfer attacks across heterogeneous architectures (CNN to ViT). On the other hand, this invention constructs a texture-aware adaptive optimization strategy to dynamically adjust the update step size according to the local texture intensity of the image, removing artifacts in smooth areas while maintaining a high success rate of attack transfer, thus achieving a balance between attack transferability and visual imperceptibility. Detailed Implementation

[0017] The following examples are intended to illustrate the present invention, and not to further limit the invention.

[0018] Example 1 This invention provides a spatial-frequency black-box adversarial attack method that combines perception-adaptive approaches, including: S1: Utilize the local second-order statistical features of the original image to calculate the texture intensity, and then combine it with the lower bound of the minimum attack step size ratio to generate a texture-aware mask matrix.

[0019] In its implementation, this embodiment first performs a refined evaluation of the visual features of the original image. Traditional iterative attacks use a globally fixed step size to update the perturbation, ignoring the human visual system's ability to perceive the differences in noise in different texture regions (i.e., spatial masking effect). This results in visible noise artifacts in smooth background areas of the image, while the attack energy injection into complex texture regions is insufficient. Therefore, this embodiment calculates texture intensity based on local second-order statistical features to measure the local texture complexity at various locations in the image.

[0020] Specifically, the calculation of texture intensity using local second-order statistical features of the original image involves: A local window is slid across the three RGB channels of the original image. Based on the original pixel brightness value and mean, the variance of the center pixel is calculated, and a zero-smoothing factor is added to quantify the texture complexity of each pixel. The statistical results of the three channels are averaged and then globally normalized to obtain the texture intensity, thereby accurately quantifying the texture complexity of each pixel.

[0021] Furthermore, the texture complexity of each pixel is quantified using the formula... To achieve this.

[0022] In the formula, Indicates the size is Local window Below, pixels Texture complexity; Represents the original pixel brightness value. This represents the mean. Represents the smoothing factor against zero.

[0023] Subsequently, the statistical results of the three channels are averaged and globally normalized to obtain the average texture intensity matrix of a single channel. .

[0024] In order to The weights are transformed into weights that can participate in gradient optimization. In this embodiment, a lower bound for the minimum attack step size ratio in the smooth region is introduced through linear mapping. , .

[0025] The texture-aware mask matrix is ​​generated by combining the lower bound of the minimum attack step size ratio, using the formula: To achieve this.

[0026] In the formula, Represents a texture-aware mask matrix. This represents the average texture intensity matrix of a single channel. This represents the lower bound of the minimum attack step size ratio.

[0027] This invention utilizes the final generated texture-aware mask matrix to effectively constrain values ​​in smooth regions to near the lower bound, while values ​​in complex texture regions are close to 1. This provides precise numerical guidance for subsequent adaptive step size allocation, overcoming the shortcomings of traditional globally uniform step sizes that easily degrade image quality.

[0028] S2: For multiple neighborhood samples in the current round, extract the joint gradient corresponding to the previous sample, combine it with the basic noise, generate gradient-guided neighborhood noise, and superimpose the neighborhood noise onto the current image to construct a preview sample.

[0029] When generating adversarial perturbation values ​​for each round, directly updating along a single direction can easily lead to local minima in the alternative model. Therefore, this invention performs multiple inner-neighborhood samplings in each outer iteration to explore the loss.

[0030] The step of extracting the joint gradient corresponding to the previous sampling and combining it with the basic noise to generate gradient-guided neighborhood noise is as follows: For the first sampling ( Generate the fundamental noise sampled from a uniform distribution. In subsequent sampling ( In the previous sample (the first one), extract the last sample (the last one). The joint gradient corresponding to (time) Take the joint gradient sign direction This is then element-wise multiplied with the absolute value of the base noise to generate gradient-guided neighborhood noise. The formula is as follows.

[0031] .

[0032] This invention generates neighborhood noise through gradient guidance. The preview samples built by overlaying the current image not only expand the search range, but also ensure that the inner exploration always proceeds in a direction with high aggressiveness and generalization.

[0033] S3: Preview samples perform spatial-frequency operations in parallel, as follows: Using the TPS variational decomposition method, the preview sample is subjected to spatial domain nonlinear deformation processing to generate spatially enhanced samples. After the preview sample is segmented, a mixed weight is randomly generated and weighted and fused with the amplitude spectrum to generate a frequency domain enhanced sample.

[0034] To prevent S2's blind random sampling from causing the exploration to deviate from the original attack direction, this invention improves the traditional sampling mechanism by combining it with the bi-branch space-frequency joint gradient depth.

[0035] On the one hand, different neural network architectures have varying degrees of dependence on the spatial location of image pixels. If adversarial perturbations are optimized only on fixed spatial coordinates, it will lead to severe overfitting of a single network. Specifically, since CNNs focus on extracting local high-frequency textures, while Vision Transformer (ViT) relies on self-attention mechanisms to capture global low-frequency context, perturbations struggle to cross the decision boundaries of heterogeneous networks. To address this, this invention introduces a spatial domain nonlinear deformation branch.

[0036] The process of using the TPS variational decomposition method to perform spatial domain nonlinear deformation processing on the preview sample to generate a spatially enhanced sample is as follows: The preview sample is divided into a grid and assigned control points. The control points are randomly offset within a set range. The global nonlinear mapping function is calculated using the TPS variational decomposition method and the principle of bending energy minimization. Based on the global nonlinear mapping function, the pixel coordinates of the preview sample are resampled and distorted to generate a spatially enhanced sample.

[0037] The spatial domain nonlinear deformation branch of this invention, by applying continuously differentiable nonlinear geometric topological deformation, interferes with the patch position encoding and self-attention global dependency of ViT, thereby reducing the dependence of the perturbation on the fixed spatial coordinates of a specific model.

[0038] On the other hand, spatial domain transformation alone cannot change the frequency distribution pattern of the image. In order to further improve the generalization of the perturbation, this invention introduces a frequency domain enhancement branch.

[0039] After the preview sample is segmented, a mixed weight is randomly generated and fused with the amplitude spectrum to generate a frequency domain enhanced sample, specifically: The preview sample undergoes a Discrete Fourier Transform to separate the amplitude and phase spectra. The preview sample is then divided into multiple blocks with randomly generated mixed weights. After interpolation, these weights are multiplied by a frequency-domain Gaussian low-pass mask to obtain the frequency-domain fusion coefficient matrix. ; In two-dimensional frequency domain coordinates At this point, the frequency domain fusion coefficient matrix is ​​used. Preview the amplitude spectrum of the sample Amplitude spectrum of random reference image within batch Perform dynamic weighted fusion and convert the fused amplitude spectrum Combined with the phase spectrum, an inverse Fourier transform is performed to generate frequency domain enhanced samples.

[0040] The formula for implementing the weighted fusion operation is as follows.

[0041] .

[0042] In addition, "random reference image within batch" refers to another image randomly selected from the current batch of input data. If the current batch contains only a single image, the original image is horizontally flipped and used as the reference image.

[0043] The frequency domain enhancement branch of this invention confines spectral mixing to a low-frequency robust region, thus protecting the high-frequency edge structure of the image while disrupting the frequency domain distribution structure that CNNs depend on.

[0044] Therefore, this invention is not limited to a single spatial dimension. For example, published patent CN115544499A focuses on using the fast gradient sign method to predict the sample generation path in advance and sampling by superimposing simple uniformly distributed random noise in the neighborhood of the predicted point. This invention constructs a parallel spatial-frequency dual-branch collaborative transformation mechanism. On the one hand, it applies continuous nonlinear geometric and topological deformation to the samples in the spatial domain using the TPS variational decomposition method; on the other hand, it performs block mixing in the frequency domain by dynamically weighting and fusing the amplitude spectrum of the random reference image within the batch with the amplitude spectrum of the original sample. This enables the generated adversarial perturbation to effectively cross heterogeneous network architectures with drastically different feature perceptions, effectively improving the success rate of black-box transfer attacks.

[0045] S4: Spatial augmented samples and frequency domain augmented samples are input into the substitution model in parallel. The loss with the real label is calculated separately. After superposition, the partial derivative is calculated to obtain the joint gradient corresponding to the current sample.

[0046] Wherein, the joint gradient corresponding to the current sample is obtained by the formula: To achieve this.

[0047] In the formula, Indicates the current number The joint gradient corresponding to the sampling. This indicates the partial derivative. Indicates an alternative model, Indicates the true label, Represents the classification loss function. , These represent spatially enhanced samples and frequency-domain enhanced samples, respectively.

[0048] This invention utilizes the joint gradient obtained by the bi-branch aggregation loss, which not only has robustness against spatial deformation but also incorporates adaptability to changes in the underlying frequency. It can effectively decouple the dependence of perturbations on specific internal features of the model and significantly improve the ability of adversarial examples to cross the decision boundaries of different network architectures.

[0049] S5: For the current round, take the average of the joint gradients corresponding to all samples, calculate the historical gradient vector using the momentum mechanism, combine it with the texture-aware mask matrix, adaptively update the adversarial perturbation value, and then execute S2. After a preset number of iterations, the obtained target adversarial perturbation values ​​are superimposed on the original image to generate adversarial sample data.

[0050] After completing all sampling of the inner layer, this embodiment first averages the collected joint gradients and uses the known momentum mechanism to analyze the historical gradient vector. To ensure stable trajectory updates.

[0051] At this point, we enter the core stage of perturbation update. Traditional algorithms use a globally constant step size to directly combine momentum gradient for updates, such as the published patent CN115544499A, which ignores the visual features and texture distribution of the image itself, thus easily leading to excessive visual distortion.

[0052] To address this, the present invention proposes a texture-aware adaptive optimization strategy: texture intensity is pre-calculated using local second-order statistical features of the image to generate a texture-aware mask matrix; when updating perturbations, the texture-aware mask matrix is ​​combined to adaptively update the anti-perturbation value, thereby dynamically adjusting the energy distribution of each pixel according to the local texture intensity.

[0053] Preferably, the adaptive update of the adversarial perturbation value by combining the texture-aware mask matrix specifically involves: After element-wise multiplication of the basic attack iteration step size with the texture-aware mask matrix, and combining this with the sign and direction of the historical gradient vectors, energy is dynamically allocated according to the texture intensity; through The norm projection truncation operator performs threshold truncation to obtain updated adversarial perturbation values.

[0054] The formula is as follows.

[0055] .

[0056] This expression indicates that, in the case of the first... wheel disturbance Updated to the latest version wheel disturbance During the process, the texture-aware mask matrix calculated by S1 is called. Through element-wise multiplication operator This is substantially incorporated into the perturbation solution equation, along with the basic attack iteration step size. Combine.

[0057] Under this mechanism, the sign and direction of the historical gradient vector Dynamically allocated energy: Smooth areas of the image are forced to shrink their stride to suppress visible noise, while complex texture areas are given a larger stride to compensate for the loss of attack strength.

[0058] Finally, through Norm projection truncation operator Threshold truncation is performed to ensure that the perturbation pixels of the entire image are strictly limited to the maximum constraint budget, thereby maintaining high transferability while ensuring the imperceptibility of adversarial examples.

[0059] After external After rounds of iterative loops, the finally converged adversarial perturbation is obtained. The target adversarial perturbation value is superimposed on the original image and effectively truncated to generate a high-quality adversarial sample, which is then sent to the target black-box system for robustness evaluation.

[0060] .

[0061] Generated adversarial examples It can be directly and without contact input into black-box target models with unknown architectures or commercial cloud APIs to achieve high success rates of cross-architecture deception and robust vulnerability detection.

[0062] In summary, on the one hand, this invention constructs a spatial-frequency joint gradient depth combination to simultaneously reconstruct samples in both spatial topology and frequency spectrum dimensions, decoupling the dependence of adversarial perturbations on specific feature extraction mechanisms and improving the success rate of transfer attacks on heterogeneous architecture (CNN to ViT) models; on the other hand, this invention constructs a texture-aware adaptive optimization strategy, dynamically adjusting the update step size according to the local texture intensity of the image (strictly suppressing noise in smooth areas and efficiently injecting energy into texture areas), removing artifacts in smooth areas while maintaining a high success rate of attack transfer, achieving a balance between attack transferability and visual imperceptibility.

[0063] Example 2 Based on Embodiment 1, this embodiment provides a spatial-frequency black-box adversarial attack system that combines perception-adaptive technology, including: Texture-aware mask matrix generation module: Utilizes the local second-order statistical features of the original image to calculate the texture intensity, and then combines the lower bound of the minimum attack step size ratio to generate a texture-aware mask matrix. Gradient-guided sampling module: For multiple neighborhood samples in the current round, extract the joint gradient corresponding to the previous sample, combine it with the basic noise, generate gradient-guided neighborhood noise, and superimpose the neighborhood noise onto the current image to construct a preview sample; Spatial-Frequency Dual-Branch Module: Preview samples perform spatial-frequency operations in parallel, as follows: Using the TPS variational decomposition method, the preview sample is subjected to spatial domain nonlinear deformation processing to generate spatially enhanced samples. After the preview sample is segmented, a mixed weight is randomly generated and fused with the amplitude spectrum to generate a frequency domain enhanced sample; Joint gradient solving module: Spatial augmented samples and frequency domain augmented samples are input into the substitution model in parallel, and the loss with the real label is calculated separately. After superposition, the partial derivative is calculated to obtain the joint gradient corresponding to the current sample. Adaptive update module: For the current round, the joint gradient corresponding to all samples is averaged, the historical gradient vector is calculated using the momentum mechanism, and after adaptively updating the adversarial value in combination with the texture-aware mask matrix, it enters the gradient-guided sampling module. After a preset number of iterations, the obtained target adversarial perturbation values ​​are superimposed on the original image to generate adversarial sample data.

[0064] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A spatial-frequency black-box adversarial attack method combining perception-adaptive approaches, characterized in that, include: S1: Utilize the local second-order statistical features of the original image to calculate the texture intensity, and then combine it with the lower bound of the minimum attack step size ratio to generate a texture-aware mask matrix. S2: For multiple neighborhood samplings in the current round, extract the joint gradient corresponding to the previous sampling, combine it with the basic noise, generate gradient-guided neighborhood noise, and superimpose the neighborhood noise onto the current image to construct a preview sample; S3: Preview samples perform spatial-frequency operations in parallel, as follows: Using the TPS variational decomposition method, the preview sample is subjected to spatial domain nonlinear deformation processing to generate spatially enhanced samples. After the preview sample is segmented, a mixed weight is randomly generated and fused with the amplitude spectrum to generate a frequency domain enhanced sample; S4: Spatial augmentation samples and frequency domain augmentation samples are input into the substitution model in parallel, and the loss with the real label is calculated separately. After superposition, the partial derivative is calculated to obtain the joint gradient corresponding to the current sample. S5: For the current round, take the average of the joint gradients corresponding to all samples, calculate the historical gradient vector using the momentum mechanism, combine it with the texture-aware mask matrix, adaptively update the adversarial perturbation value, and then execute S2. After a preset number of iterations, the obtained target adversarial perturbation values ​​are superimposed on the original image to generate adversarial sample data.

2. The spatial-frequency black-box adversarial attack method combining perception and adaptation as described in claim 1, characterized in that, S3 describes using the TPS variational decomposition method to perform spatial domain nonlinear deformation processing on the preview sample to generate a spatially enhanced sample, specifically: The preview sample is divided into a grid and assigned control points. The control points are randomly offset within a set range. The global nonlinear mapping function is calculated using the TPS variational decomposition method and the principle of bending energy minimization. Based on the global nonlinear mapping function, the pixel coordinates of the preview sample are resampled and distorted to generate a spatially enhanced sample.

3. The spatial-frequency black-box adversarial attack method combining perception and adaptation as described in claim 1, characterized in that, After the preview sample is segmented as described in S3, a mixed weight is randomly generated and weighted and fused with the amplitude spectrum to generate a frequency domain enhanced sample, specifically: The preview sample undergoes a discrete Fourier transform to separate the amplitude spectrum and phase spectrum. The preview sample is divided into multiple blocks and a mixed weight is randomly generated. After interpolation, the weight is multiplied by a frequency domain Gaussian low-pass mask to obtain a frequency domain fusion coefficient matrix. At the two-dimensional frequency domain coordinates, the amplitude spectrum of the preview sample is dynamically weighted and fused with the amplitude spectrum of the random reference image within the batch using the frequency domain fusion coefficient matrix. The fused amplitude spectrum is then combined with the phase spectrum and inverse Fourier transform is performed to generate frequency domain enhanced samples.

4. The spatial-frequency black-box adversarial attack method combining perception and adaptation as described in claim 1, characterized in that, S5 describes the adaptive update of adversarial perturbation values ​​by combining a texture-aware mask matrix, specifically as follows: After element-wise multiplication of the basic attack iteration step size with the texture-aware mask matrix, and combining this with the sign and direction of the historical gradient vectors, energy is dynamically allocated according to the texture intensity; through The norm projection truncation operator performs threshold truncation to obtain updated adversarial perturbation values.

5. The spatial-frequency black-box adversarial attack method combining perception and adaptation according to claim 1, characterized in that, S1 describes the calculation of texture intensity using local second-order statistical features of the original image, specifically as follows: A local window is slid across the three RGB channels of the original image. The variance of the center pixel is calculated based on the original pixel brightness value and mean. A zero-smoothing factor is added to quantify the texture complexity of each pixel. The statistical results of the three channels are averaged and then globally normalized to obtain the texture intensity.

6. The spatial-frequency black-box adversarial attack method combining perception and adaptation as described in claim 5, characterized in that, The texture complexity of each pixel is quantified by a formula. To achieve; In the formula, Indicates the size is Local window Below, pixels Texture complexity; Represents the original pixel brightness value. This represents the mean. Represents the smoothing factor against zero.

7. The spatial-frequency black-box adversarial attack method combining perception and adaptation according to claim 1, characterized in that, S1 describes the generation of a texture-aware mask matrix by combining the lower bound of the minimum attack step size ratio, using the formula: To achieve; In the formula, Represents a texture-aware mask matrix. This represents the average texture intensity matrix of a single channel. This represents the lower bound of the minimum attack step size ratio.

8. The spatial-frequency black-box adversarial attack method combining perception and adaptation according to claim 1, characterized in that, S2 describes extracting the joint gradient corresponding to the previous sampling, combining it with the basic noise, and generating gradient-guided neighborhood noise, specifically as follows: For the first sampling, a base noise sampled from a uniform distribution is generated; in subsequent sampling, the joint gradient corresponding to the previous sampling is extracted, the sign and direction of the joint gradient are taken, and the absolute value of the base noise is multiplied element by element to generate gradient-guided neighborhood noise.

9. The spatial-frequency black-box adversarial attack method combining perception and adaptation according to claim 1, characterized in that, The joint gradient corresponding to the current sample mentioned in S4 is obtained through the formula: To achieve; In the formula, Indicates the current number The joint gradient corresponding to the sampling. This indicates the partial derivative. Indicates an alternative model, Indicates the true label, Represents the classification loss function. , These represent spatially enhanced samples and frequency-domain enhanced samples, respectively.

10. A spatial-frequency black-box adversarial attack system combining perception-adaptive technology, characterized in that, include: Texture-aware mask matrix generation module: Utilizes the local second-order statistical features of the original image to calculate the texture intensity, and then combines the lower bound of the minimum attack step size ratio to generate a texture-aware mask matrix. Gradient-guided sampling module: For multiple neighborhood samples in the current round, extract the joint gradient corresponding to the previous sample, combine it with the basic noise, generate gradient-guided neighborhood noise, and superimpose the neighborhood noise onto the current image to construct a preview sample; Spatial-Frequency Dual-Branch Module: Preview samples perform spatial-frequency operations in parallel, as follows: Using the TPS variational decomposition method, the preview sample is subjected to spatial domain nonlinear deformation processing to generate spatially enhanced samples. After the preview sample is segmented, a mixed weight is randomly generated and fused with the amplitude spectrum to generate a frequency domain enhanced sample; Joint gradient solving module: Spatial augmented samples and frequency domain augmented samples are input into the substitution model in parallel, and the loss with the real label is calculated separately. After superposition, the partial derivative is calculated to obtain the joint gradient corresponding to the current sample. Adaptive update module: For the current round, the joint gradient corresponding to all samples is averaged, the historical gradient vector is calculated using the momentum mechanism, and after adaptively updating the adversarial value in combination with the texture-aware mask matrix, it enters the gradient-guided sampling module. After a preset number of iterations, the obtained target adversarial perturbation values ​​are superimposed on the original image to generate adversarial sample data.

Citation Information

Patent Citations

  • Transferable black box adversarial attack sample generation method and system and electronic equipment

    CN115544499A