Gradient-guided adversarial frequency-enhanced image forgery localization method

CN122929370APending Publication Date: 2026-10-16TIANJIN UNIVERSITY OF TECHNOLOGY +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611075862.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-20
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0004]本发明针对现有技术中存在的频率偏置以及跨数据集泛化能力不足等缺陷,研制一种基于梯度引导的对抗性频率增强的图像伪造定位方法

Benefits of technology

本发明提出基于梯度引导的对抗频率边界搜索机制,生成困难增强样本,促使网络减少对浅层频率捷径的依赖,缓解光谱偏差,使模型在面对未知篡改方式与复杂后处理操作时能够提取更具鲁棒性的本质篡改痕迹,从而提升跨域泛化能力;设计对抗频率边界搜索模块与动态困难感知频率增强模块,自适应挖掘更具挑战性的频率截断边界,并动态融合原始训练图像、高频分量和低频分量。该机制有助于提升像素级篡改概率掩码的边界定位精度,降低漏检和误报;对抗频率边界搜索模块与动态困难感知频率增强模块仅作用于训练阶段,在测试推理阶段不参与计算。本发明在基础伪造定位网络架构的基础上,不引入额外推理阶段参数和计算量,能够满足实际取证系统对高效推理的需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122929370A_ABST
    Figure CN122929370A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of image forgery positioning methods based on gradient guide's counter frequency enhancement, belong to computer vision and image forensics technical field.It includes the following steps: the original training image is converted to frequency domain by two-dimensional fast Fourier transform, obtains spectral representation;Through counter frequency boundary search module, freeze network parameter and learnable fusion weight, gradient is calculated based on hybrid segmentation loss, and the counter frequency truncation boundary is dynamically searched and updated with gradient ascent strategy;Based on the construction of high-low pass mask of differentiable Butterworth mask filter, the high-frequency, low-frequency component is decoupled by inverse Fourier transform;Dynamic difficult perception frequency enhancement module is used, and learnable fusion weight is adaptively superimposed to generate difficult enhancement sample with original image and high-low frequency component, and pixel-level tampering probability mask is output by inputting into forgery positioning network.The present application can effectively alleviate spectral bias, improve positioning accuracy and cross-domain robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision and image forensics technology, specifically relating to an adversarial frequency enhancement-based image forgery localization method. Background Technology

[0002] With the rapid popularization of digital image editing tools and advanced image generation technologies such as GANs and diffusion models, the threshold for generating highly realistic tampered images has been significantly lowered, threatening multimedia content security and undermining the foundation of social visual trust. Therefore, image forgery detection and localization technologies that can accurately identify and segment tampered areas at the pixel level have received widespread attention from academia and industry. This task falls under the category of deep visual forensics, requiring models to simultaneously understand the semantic content of images and capture subtle traces left by tampering, which is highly challenging. Currently, related methods can be divided into two categories according to the feature extraction domain: spatial domain and frequency domain. The technical path has evolved from early manual feature design to deep learning-driven dense prediction, resulting in several representative schemes for modeling spatial relationships, multi-view cues, and frequency domain information. Data augmentation strategies have also expanded from conventional spatial transformations to targeted methods such as pixel inconsistency enhancement, continuously improving localization performance.

[0003] Existing methods generally fail to adequately consider the shortcut learning phenomenon in the optimization process of deep neural networks. Frequency domain methods, in particular, often rely on predefined filters, fixed frequency band divisions, or static fusion strategies, making them prone to overfitting to the frequency statistical distribution of specific training datasets and resulting in significant frequency bias. In real-world open scenarios, different tampering methods can cause unknown shifts in image frequency intensity, impairing the generalization ability of models that heavily rely on specific frequency priors. Furthermore, existing data augmentation methods are mostly spatial domain-oriented and cannot effectively address the frequency domain bias problem. To address this deficiency, this paper proposes a gradient-guided adversarial frequency augmentation-based image forgery localization method. Unlike existing static frequency fusion schemes, this method dynamically adjusts the frequency truncation boundary and frequency component fusion weights during training. Through an adversarial mechanism, it actively mines more challenging frequency truncation boundaries and synthesizes difficult augmented samples, effectively mitigating the spectral bias unique to the dataset and enabling the model to learn more robust and generalizable essential tampering traces. Summary of the Invention

[0004] This invention addresses the shortcomings of existing technologies, such as frequency bias and insufficient cross-dataset generalization ability, by developing an adversarial frequency enhancement-based image forgery localization method guided by gradients. This invention mitigates spectral bias through an adversarial frequency learning mechanism, enabling the model to capture more robust and substantial traces of tampering, thus significantly improving localization accuracy without increasing inference costs.

[0005] The technical solution of this invention to solve the technical problem is as follows: A gradient-guided adversarial frequency enhancement-based image forgery localization method includes the following steps: S1. Obtain the original training image and its corresponding real tamper mask label, and convert the original training image to the frequency domain through two-dimensional fast Fourier transform to obtain the spectral representation of the original training image. S2. In the adversarial frequency boundary search module, based on the spectrum representation and the current frequency truncation boundary, the parameters of the fake localization network and the learnable fusion weights are frozen. The gradient of the current frequency truncation boundary is calculated using the current hybrid segmentation loss. The current frequency truncation boundary is searched and updated using the gradient ascent strategy to obtain the updated adversarial frequency truncation boundary. S3. Construct a high-pass mask and a low-pass mask based on the updated adversarial frequency truncation boundary. After filtering the spectral representation of the original training image, obtain the high-frequency component and low-frequency component in the spatial domain through inverse Fourier transform. S4. A dynamic difficulty-aware frequency enhancement module is used to adaptively superimpose the original training image, high-frequency components, and low-frequency components using a set of learnable fusion weights to generate difficulty-enhanced samples. S5. Input the hardened samples into the fake localization network for feature extraction and decoding, and output a pixel-level tampering probability mask.

[0006] Furthermore, in step S2, the adversarial frequency boundary search module specifically includes: An internal maximization search is performed to find the frequency truncation boundary that increases the segmentation loss: the parameters of the fake localization network and the learnable fusion weights are frozen, the gradient with respect to the current frequency truncation boundary is calculated using the current hybrid segmentation loss, and then the updated adversarial frequency truncation boundary is obtained by searching and dynamically updating it through a gradient ascent strategy, as shown in the following formula: , in, Indicates the current frequency cutoff boundary. This indicates the updated adversarial frequency truncation boundary. Indicates the counter-step size, Represents a symbolic function. Indicates hybrid segmentation loss The gradient of the cutoff boundary at the current frequency, This indicates that the updated value will be limited to the minimum frequency. and maximum frequency The operations between them.

[0007] Furthermore, when searching for adversarial frequency cutoff boundaries, the current frequency cutoff boundary... The initial value is 0.01, minimum frequency. Limit to 0.001, maximum frequency Limit to 0.05, and counteract step size. It is 0.005.

[0008] Furthermore, in step S3, the differentiable spectrum decoupling module specifically includes: A two-dimensional Fast Fourier Transform is performed on the original training image, and the spectral center is shifted to the center of the image spectrum, which is then used as the low-frequency center. The normalized radial distance from each frequency position in the spectrum to the spectral center is calculated. The updated adversarial frequency truncation boundary is used as the cutoff frequency threshold. Based on a differentiable Butterworth mask filter, each frequency position is mapped to a continuous high-pass weight value to obtain the high-pass mask, and then the low-pass mask is obtained. The high-frequency components and low-frequency components are calculated based on the low-pass mask and the high-pass mask. The formulas are as follows: , , , in, Indicates the high-pass mask. Indicates the low-pass mask; This indicates the updated adversarial frequency cutoff boundary; This represents the normalized radial distance from each frequency position in the spectrum to the center of the spectrum. Indicates the filter order; This represents a constant introduced to maintain numerical stability; This represents a two-dimensional Fast Fourier Transform. Indicates the inverse Fourier transform. This represents an element-wise multiplication operation; The original training images representing the spatial domain. Represents high-frequency components, This indicates the low-frequency component.

[0009] Furthermore, in step S4, the calculation process for generating difficult augmented samples is as follows: , in, Indicates difficulty augmentation samples, , and These represent the learnable fusion weights corresponding to the original training image, high-frequency components, and low-frequency components, respectively. This represents the Sigmoid gated function.

[0010] Furthermore, in step S5, the fake location network adopts the SegFormer network.

[0011] Furthermore, during the training process of the fake localization network, a hybrid segmentation loss is calculated based on the pixel-level tampering probability mask and the real tampering mask label. The hybrid segmentation loss is composed of the sum of the binary cross-entropy loss and the Dice loss. The hybrid segmentation loss is minimized by the gradient descent method, and the parameters of the fake localization network and the learnable fusion weights are updated.

[0012] The advantages of this invention are: This invention proposes a gradient-guided adversarial frequency boundary search mechanism to generate challenging enhanced samples. This reduces the network's reliance on shallow frequency shortcuts, alleviates spectral bias, and enables the model to extract more robust, essential tampering traces when faced with unknown tampering methods and complex post-processing operations, thereby improving cross-domain generalization ability. An adversarial frequency boundary search module and a dynamic, challenging frequency enhancement module are designed to adaptively mine more challenging frequency truncation boundaries and dynamically fuse the original training image, high-frequency components, and low-frequency components. This mechanism helps improve the boundary localization accuracy of pixel-level tamper probability masks, reducing false positives and false negatives. The adversarial frequency boundary search module and the dynamic, challenging frequency enhancement module only operate during the training phase and do not participate in computation during the testing and inference phase. Based on the basic forgery localization network architecture, this invention does not introduce additional inference phase parameters or computational overhead, meeting the high-efficiency inference requirements of practical forensic systems. Attached Figure Description

[0013] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.

[0014] Figure 1 This is a flowchart of the steps of the method of the present invention; Figure 2 This is a data flow diagram of the method of the present invention; Figure 3 This is a comparison diagram between the method of the present invention and existing methods. Detailed Implementation

[0015] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0016] Example 1 In this embodiment, as Figure 1 , Figure 2As shown, this invention provides an image forgery localization method based on gradient-guided adversarial frequency augmentation. For ease of description below, the method of this invention will be referred to as Gradient-guided Adversarial Frequency Augmentation (GAFA). GAFA mainly includes an Adversarial Frequency Boundary Search (AFBS) mechanism and a Dynamic Hard-aware Frequency Augmentation (DHFA) mechanism. AFBS is used to dynamically search for adversarial frequency truncation boundaries, and DHFA is used to generate hard-enhanced samples based on high-frequency components, low-frequency components, and the original image. Together, they constitute the core technical solution of this invention. Specific steps include: S1. Obtain the original training image and its corresponding real tamper mask label, and convert the original training image to the frequency domain through two-dimensional fast Fourier transform to obtain the spectral representation of the original training image. In this embodiment, the original training images are acquired and preprocessed. The data preprocessing and frequency domain transformation module takes color images containing various fake regions (such as spliced ​​or copied / pasted regions) as input. To meet the batch processing and input requirements of deep neural networks, the original training images are uniformly resized to 512×512 pixels, and basic data augmentation operations such as random flipping are performed during training. Subsequently, a two-dimensional fast Fourier transform (2D FFT) is used to transform the resized spatial domain image to the frequency domain, exposing its spectral characteristics to facilitate subsequent identification of model weaknesses in the frequency domain.

[0017] S2. In the adversarial frequency boundary search module, based on the spectrum representation and the current frequency truncation boundary, the parameters of the fake localization network and the learnable fusion weights are frozen. The gradient of the current frequency truncation boundary is calculated using the current hybrid segmentation loss. The current frequency truncation boundary is searched and updated using the gradient ascent strategy to obtain the updated adversarial frequency truncation boundary. The adversarial frequency truncation boundary search module performs an internal maximization search, which involves searching for frequency truncation boundaries that increase the segmentation loss of the current fake localization network during the training phase. Specifically, the parameters of the fake localization network and the learnable fusion weights are frozen, the gradient with respect to the current frequency truncation boundary is calculated using the current hybrid segmentation loss, and then the updated adversarial frequency truncation boundary is searched and dynamically updated using a gradient ascent strategy, as shown in the following formula: , in, Indicates the current frequency cutoff boundary. This indicates the updated adversarial frequency truncation boundary. Indicates the counter-step size, Represents a symbolic function. Indicates hybrid segmentation loss The gradient of the cutoff boundary at the current frequency, This indicates that the updated value will be limited to the minimum frequency. and maximum frequency Operations between; When searching for adversarial frequency cutoff boundaries, the current frequency cutoff boundary The initial value is 0.01, minimum frequency. Limit to 0.001, maximum frequency Limit to 0.05, and counteract step size. The value is 0.005. The above update formula describes the projection gradient ascent process of the current frequency truncation boundary in this embodiment. Gradient ascent is used to adjust the current frequency truncation boundary along the direction of increasing hybrid segmentation loss, and the projection operation is used to restrict the updated boundary within a preset frequency range. The improvement of this invention lies not in proposing gradient ascent or projection operations separately, but in using them for adversarial frequency boundary search in image forgery localization tasks, enabling the model to actively discover more difficult frequency segmentation locations during the training phase and generate difficult augmented samples accordingly.

[0018] S3. Construct a high-pass mask and a low-pass mask based on the updated adversarial frequency truncation boundary. After filtering the spectral representation of the original training image, obtain the high-frequency component and low-frequency component in the spatial domain through inverse Fourier transform. Specifically, the differentiable spectrum decoupling module performs a two-dimensional fast Fourier transform on the original training image and moves the spectrum center to the center of the image spectrum, using this spectrum center as the low-frequency center. It calculates the normalized radial distance from each frequency position in the spectrum to the spectrum center. Using the updated adversarial frequency cutoff boundary as the cutoff frequency threshold, it maps each frequency position to a continuous high-pass weight value based on a differentiable Butterworth mask filter to obtain a high-pass mask, and subsequently a low-pass mask. For the high-pass mask, high-frequency positions far from the spectrum center are given larger pass weights, while low-frequency positions near the spectrum center are gradually suppressed. After obtaining the high-pass mask, a low-pass mask is constructed in a complementary manner, i.e., the low-pass mask is obtained by subtracting the high-pass mask from 1, giving high pass weights to low-frequency positions near the spectrum center while gradually suppressing high-frequency positions far from the spectrum center. Because the Butterworth filter function is continuously differentiable, this mask construction process can participate in the backpropagation calculation.

[0019] Calculate the high-frequency and low-frequency components based on the low-pass and high-pass masks; the formula is as follows: , , , in, Indicates the high-pass mask. Indicates the low-pass mask; This represents the normalized radial distance from each frequency position in the spectrum to the center of the spectrum, which is obtained by calculating the Euclidean distance from each frequency position to the center of the spectrum and dividing it by the maximum radius of the spectrum. This indicates the filter order, which is preferably 2 in this embodiment; This represents a small constant introduced to maintain numerical stability; This represents a two-dimensional Fast Fourier Transform. Indicates the inverse Fourier transform. This represents an element-wise multiplication operation; The original training images representing the spatial domain. This represents the high-frequency components that have been decoupled. The high-pass mask represents the decoupled low-frequency components; the low-pass mask is used to retain high-frequency components far from the center of the spectrum, and the low-pass mask is obtained by complementing the high-pass mask to retain low-frequency components near the center of the spectrum. The Butterworth filter itself is a commonly used form of smoothing frequency domain filtering. The improvement of this invention lies not in proposing the Butterworth filter itself separately, but in combining it with the updated adversarial frequency truncation boundary to construct dynamic high-pass and low-pass masks that can participate in backpropagation, and using them for the synthesis of difficult enhancement samples in image forgery localization tasks.

[0020] S4. A dynamic difficulty-aware frequency enhancement module is used to adaptively superimpose the original training image, high-frequency components, and low-frequency components using a set of learnable fusion weights to generate difficulty-enhanced samples. Specifically, this embodiment introduces a set of learnable fusion weights, all with initial values ​​of 0. The Sigmoid activation function is used to map these weights to the (0,1) interval (i.e., an initial gate value of 0.5 to provide a neutral starting point). Adaptive weighted superposition of the original training image, high-frequency components, and low-frequency components is then performed to generate enhanced samples with a difficult frequency distribution. The calculation process is as follows: , in, Indicates difficulty augmentation samples, , and These represent the learnable fusion weights corresponding to the original training image, high-frequency components, and low-frequency components, respectively. This represents the Sigmoid gating function; as training progresses, this set learns to update the fusion weights based on the hybrid segmentation loss, thus adaptively adjusting the contribution of different frequency components in hard-amplified samples. This step enables the model to adapt to dynamically changing frequency distributions, thereby learning more robust features for fundamental tampering.

[0021] S5. Input the difficult augmented samples into the fake localization network for feature extraction and decoding, and output a pixel-level tampering probability mask; In this embodiment, the spoofing localization network uses SegFormer (preferably SegFormer-B2) based on the Transformer architecture as the backbone network. This network extracts global and local multi-scale features through a hierarchical encoder and fuses the features through a lightweight decoder, outputting a pixel-level tampering probability mask with the same size as the input image.

[0022] S6. Calculate the hybrid segmentation loss based on the pixel-level tampering probability mask and the real tampering mask label, minimize the hybrid segmentation loss using gradient descent, and update the parameters of the fake localization network and the learnable fusion weights.

[0023] The hybrid segmentation loss is composed of the binary cross-entropy loss used for pixel-level dense classification and the Dice loss used to evaluate structural overlap, as expressed in the following formula: , , in, This represents the binary cross-entropy loss. This indicates Dice's loss. This represents the final hybrid segmentation loss. This represents the total number of pixels in the image. Indicates the first The real tamper-evident mask label for each pixel. Indicates the first The predicted probability value of each pixel. This represents a small constant introduced to maintain numerical stability. In this embodiment, the AdamW optimizer is used to minimize the constant through gradient descent. To update the parameters and learnable fusion weights of the backbone network, the initial learning rate of the backbone network is set to 1×10. -4 The weight decay is set to 0.05.

[0024] Example 2 In this embodiment, the model is trained using the hybrid training set provided by the IMDLBenCo benchmark, and all input images are uniformly adjusted to 512×512 pixels. To ensure the efficiency and fine granularity of feature extraction, SegFormer-B2 is used as the spoofing localization network for feature extraction and segmentation. During the feature frequency decoupling stage, the Butterworth mask filter order is set to 2. During the adversarial search process, the initial value of the current frequency truncation boundary is set to 0.01, and its minimum and maximum frequencies are limited to 0.001 and 0.05, respectively, with an adversarial step size of 0.005. Model optimization uses the AdamW optimizer with a learning rate of 1×10⁻⁶. -4 The weight decays to 0.05.

[0025] During testing, since the Adversarial Frequency Boundary Search (AFBS) and Dynamic Hard Aware Frequency Enhancement (DHFA) mechanisms are only used during the training phase, there is no need to perform the corresponding frequency boundary search and hard enhancement operations during testing. The image to be detected is directly input into the trained spoofing localization network for inference, making the testing process relatively simple. First, the image to be detected is adjusted to a specified size, and then directly input into the trained spoofing localization network for multi-scale feature extraction and decoding. Finally, the network directly outputs a pixel-level tampering probability mask with the same resolution as the input image. Then, the pixel-level tampering probability mask is thresholded according to a preset probability threshold to obtain a binary tampering localization mask, where the foreground region in the binary tampering localization mask is the finally predicted spoofed tampering region.

[0026] This embodiment selects four publicly available benchmark datasets (Coverage, Columbia, NIST16, and CASIAv1) for evaluation. In terms of evaluation metrics, in addition to the standard pixel-level F1 score, a Permute F1 score based on the IMDLBenCo benchmark framework is also introduced (this score is used to more rigorously measure the robustness of the model in handling complex environments and mask alignment). Table 1 compares the standard F1 scores of the method of this invention with other methods on the above datasets, and Table 2 compares the Permute F1 scores.

[0027] Table 1. Comparison of the standard F1 scores of the method of this invention with other methods on the dataset. For the four standard datasets, the method of this invention can achieve scores of 0.6001, 0.9212, 0.4485 and 0.8525 on the standard F1 score, respectively, with an average best performance of 0.7056.

[0028] Table 2. Comparison of Permute F1 scores of the method of this invention with other methods on the dataset. Furthermore, as shown in Table 2, the method of this invention also exhibits extremely strong robustness in the Permute F1 score evaluation. The average Permute F1 score of the method of this invention reached 0.7483, comprehensively surpassing all the comparison methods, further demonstrating that adversarial frequency enhancement can enable the model to learn more discriminative essential tampering features.

[0029] To highlight the roles of each module in this invention, this embodiment conducts ablation experiments by progressively adding a dynamic hard-aware frequency enhancement module and an adversarial frequency boundary search module to a baseline model. The results are shown in Table 3. Here, "Baseline" represents a basic model using only SegFormer-B2 as the spoofing localization network without introducing the dynamic hard-aware frequency enhancement module and the adversarial frequency boundary search module; "Baseline + DHFA" represents a model with the dynamic hard-aware frequency enhancement module added during the Baseline training phase; and "Baseline + DHFA + AFBS" represents a complete model with both the dynamic hard-aware frequency enhancement module and the adversarial frequency boundary search module added, i.e., the method of this invention.

[0030] Table 3 Comparison of ablation test results In addition, in view of the needs of actual deployment applications, the present invention compared the computational efficiency, and the results are shown in Table 4.

[0031] Table 4 Comparison of computational efficiency between the method of the present invention and existing methods Compared to the baseline model and existing advanced methods, the method incorporating the present invention can improve the localization consistency of the prediction boundary by effectively alleviating the frequency bias; at the same time, the method of the present invention does not increase the model parameters and computational burden in the inference stage, and has good practical deployment advantages.

[0032] like Figure 3 As shown in the figure, this diagram visually demonstrates the comparison between the method of this invention and existing mainstream methods in terms of qualitative visual effects. It can be seen that when faced with forged regions that have extremely strong visual concealment (such as the addition of tiny objects or complex background splicing), existing methods (such as MVSS-Net, CAT-Net, etc.) often exhibit missed detections, false alarms, or blurred edges; while the binary tampering localization mask output by the complete framework (GAFA) of this invention is not only internally coherent but also has clearer boundaries, showing a high degree of consistency with the real mask.

[0033] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A gradient-guided adversarial frequency enhancement-based image forgery localization method, characterized in that, Includes the following steps: S1. Obtain the original training image and its corresponding real tamper mask label, and convert the original training image to the frequency domain through two-dimensional fast Fourier transform to obtain the spectral representation of the original training image. S2. In the adversarial frequency boundary search module, based on the spectrum representation and the current frequency truncation boundary, the parameters of the fake localization network and the learnable fusion weights are frozen. The gradient of the current frequency truncation boundary is calculated using the current hybrid segmentation loss. The current frequency truncation boundary is searched and updated using the gradient ascent strategy to obtain the updated adversarial frequency truncation boundary. S3. Construct a high-pass mask and a low-pass mask based on the updated adversarial frequency truncation boundary. After filtering the spectral representation of the original training image, obtain the high-frequency component and low-frequency component in the spatial domain through inverse Fourier transform. S4. A dynamic difficulty-aware frequency enhancement module is used to adaptively superimpose the original training image, high-frequency components, and low-frequency components using a set of learnable fusion weights to generate difficulty-enhanced samples. S5. Input the hardened samples into the fake localization network for feature extraction and decoding, and output a pixel-level tampering probability mask.

2. The image forgery localization method based on gradient-guided adversarial frequency enhancement according to claim 1, characterized in that, In step S2, the adversarial frequency boundary search module specifically includes: An internal maximization search is performed to find the frequency truncation boundary that increases the segmentation loss: the parameters of the fake localization network and the learnable fusion weights are frozen, the gradient with respect to the current frequency truncation boundary is calculated using the current hybrid segmentation loss, and then the updated adversarial frequency truncation boundary is obtained by searching and dynamically updating it through a gradient ascent strategy, as shown in the following formula: , in, Indicates the current frequency cutoff boundary. This indicates the updated adversarial frequency truncation boundary. Indicates the counter-step size, Represents a symbolic function. Indicates hybrid segmentation loss The gradient of the cutoff boundary at the current frequency, This indicates that the updated value will be limited to the minimum frequency. and maximum frequency The operations between them.

3. The image forgery localization method based on gradient-guided adversarial frequency enhancement according to claim 1, characterized in that, In step S3, the differentiable spectrum decoupling module specifically includes: A two-dimensional Fast Fourier Transform is performed on the original training image, and the spectral center is shifted to the center of the image spectrum, which is then used as the low-frequency center. The normalized radial distance from each frequency position in the spectrum to the spectral center is calculated. The updated adversarial frequency truncation boundary is used as the cutoff frequency threshold. Based on a differentiable Butterworth mask filter, each frequency position is mapped to a continuous high-pass weight value to obtain the high-pass mask, and then the low-pass mask is obtained. The high-frequency components and low-frequency components are calculated based on the low-pass mask and the high-pass mask. The formulas are as follows: , , , in, Indicates the high-pass mask. Indicates the low-pass mask; This indicates the updated adversarial frequency cutoff boundary; This represents the normalized radial distance from each frequency position in the spectrum to the center of the spectrum. Indicates the filter order; This represents a constant introduced to maintain numerical stability; This represents a two-dimensional Fast Fourier Transform. Indicates the inverse Fourier transform. This represents an element-wise multiplication operation; The original training images representing the spatial domain. Represents high-frequency components, This indicates the low-frequency component.

4. The image forgery localization method based on gradient-guided adversarial frequency enhancement according to claim 1, characterized in that, In step S4, the calculation process for generating difficult augmented samples is as follows: , in, Indicates difficulty augmentation samples, , and These represent the learnable fusion weights corresponding to the original training image, high-frequency components, and low-frequency components, respectively. This represents the Sigmoid gated function.

5. The image forgery localization method based on gradient-guided adversarial frequency enhancement according to claim 1, characterized in that, In step S5, the fake location network uses the SegFormer network.

6. The image forgery localization method based on gradient-guided adversarial frequency enhancement according to claim 5, characterized in that, During the training of the fake localization network, a hybrid segmentation loss is calculated based on the pixel-level tampering probability mask and the real tampering mask label. The hybrid segmentation loss is minimized by gradient descent, and the parameters of the fake localization network and the learnable fusion weights are updated.

7. The image forgery localization method based on gradient-guided adversarial frequency enhancement according to claim 1, characterized in that, The hybrid segmentation loss is composed of the sum of the binary cross-entropy loss and the Dice loss.

8. The image forgery localization method based on gradient-guided adversarial frequency enhancement according to claim 2, characterized in that, When searching for adversarial frequency cutoff boundaries, the current frequency cutoff boundary The initial value is 0.01, minimum frequency. Limit to 0.001, maximum frequency Limit to 0.05, and counteract step size. It is 0.005.