An ai-generated image detection, tracing and positioning method
Patent Information
- Application Number
- CN202610858523.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-15
- Publication Date
- 2026-10-23
AI Technical Summary
[0005]本发明的目的在于提供一种AI生成图像检测、溯源与定位方法,以解决现有技术在跨生成器泛化能力不足、后处理鲁棒性较弱、缺乏生成源追踪能力以及难以提供像素级解释等方面存在的问题
1.通过采用预训练且冻结的视觉语言模型图像编码器提取高层语义特征,结合多尺度离散小波分解、频带感知令牌化与Transformer编码提取低层频域痕迹证据,并通过可靠性自适应融合模块根据输入图像质量动态调整融合权重,实现了语义证据与痕迹证据的优势互补,在面对未知生成器时,即使语义内容分布发生变化,仍能依赖痕迹证据实现鲁棒检测,跨生成器泛化能力显著优于现有技术;同时可靠性自适应融合模块能够根据输入图像质量动态调整融合权重,在图像经过强后处理导致语义特征退化时自动提升痕迹证据权重,从而保持检测性能,在后处理测试集上平均检测准确率相比现有技术有所提高,对JPEG压缩、高斯模糊、缩放等后处理具有强鲁棒性。
Smart Images

Figure CN122967008A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of artificial intelligence, computer vision and digital content security technology, and in particular relates to an interpretable dual-evidence adaptive fusion method for AI-generated image detection, tracing and localization. Background Technology
[0002] With the development of generative models such as diffusion models and generative adversarial networks, high-quality AI-generated images are rapidly gaining popularity in scenarios such as social media dissemination, digital content production, commercial design, and online platform publishing. At the same time, AI-generated images may also be used for disseminating false information, identity fraud, online scams, copyright infringement, and public opinion manipulation.
[0003] Existing technologies mostly fall into two categories: one type relies on RGB appearance information or high-level semantic features to determine the authenticity of images; this type of method can achieve good detection results when the distribution of training data and test data is similar, but it is easily affected by content bias when facing unknown generators, cross-dataset transfer, or changes in semantic content distribution, resulting in insufficient generalization ability; the other type of method mainly extracts evidence from the frequency domain, wavelet domain, noise residuals, or texture artifacts. Although it can capture low-level anomalies in generated images to a certain extent, such artifacts are easily weakened under post-processing conditions such as compression, blurring, scaling, and noise addition, resulting in decreased detection stability.
[0004] Furthermore, existing methods typically only output a single binary classification result, lacking the ability to further trace the source of generation and failing to locate suspicious generation areas at the pixel level. This makes it difficult to meet the integrated requirements of "detection, tracing, location, and interpretation" for application scenarios such as digital forensics, platform review, and judicial assistance. Summary of the Invention
[0005] The purpose of this invention is to provide an AI-generated image detection, source tracing, and localization method to solve the problems of existing technologies, such as insufficient generalization ability across generators, weak post-processing robustness, lack of source tracing ability, and difficulty in providing pixel-level interpretation.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: An AI-generated image detection, source tracing, and localization method is implemented according to the following steps: Step 1. Create a training dataset Establish a training dataset consisting of real images, AI-generated images, real / generated binary classification labels, and generated source category labels; Step 2. Construct and initialize the AI-generated image forensics network An AI-generated image forensics network is constructed and initialized. The AI-generated image forensics network includes an image preprocessing module. The output of the image preprocessing module is connected to a parallel semantic evidence extraction sub-network, a trace evidence extraction sub-network, a serially connected reliability adaptive fusion module, and a multi-task output module. Step 3. Joint Training The AI-generated image forensics network is jointly trained using the training dataset to obtain the trained AI-generated image forensics network; during the joint training process, the detection task is supervised by real / generated binary classification labels, and the source tracing task is supervised by generated source category labels. Step 4. Inference Output The trained AI-generated image forensics network is used to process the image to be detected, and outputs the detection results of the AI-generated image and the source tracing results.
[0007] The preferred step 2 is as follows: Step 2.1 Establish and initialize the image preprocessing module, which is used to perform size normalization, pixel standardization and channel alignment processing on the input image to obtain a standardized input image; Step 2.2 Establish and initialize the semantic evidence extraction subnetwork, which consists of a pre-trained and frozen visual language model image encoder and a linear mapping layer; Step 2.3 Establish and initialize the trace evidence extraction sub-network, which consists of a multi-scale discrete wavelet decomposition module, a global trace modeling module, and a local trace feature extraction module connected in series; the global trace modeling module consists of a frequency band sensing tokenization module, a Transformer coding module, and a token aggregation module connected in series. Step 2.4 Establish and initialize the reliability adaptive fusion module. The reliability adaptive fusion module consists of a joint evidence splicing unit, a weight prediction unit and a weighted fusion unit connected in series. The weight prediction unit consists of a lightweight multilayer perceptron and a Softmax layer. Step 2.5 Establish and initialize the multi-task output module, which includes a parallel detection head and a source tracing head.
[0008] The preferred step 3 is as follows: Step 3.1 Input the training dataset into the AI-generated image forensics network; Step 3.2 Forward Propagation Step 3.2.1 Input the real images and AI-generated images from the training dataset into the image preprocessing module to obtain standardized input images; Step 3.2.2 Input the standardized input image into the semantic evidence extraction subnetwork to obtain the semantic evidence representation; Step 3.2.3 Input the standardized input image into the trace evidence extraction subnetwork to obtain the global trace representation and local trace feature map; Step 3.2.4 Input the semantic evidence representation and the global trace representation into the reliability adaptive fusion module to predict the semantic weight and trace weight, and perform weighted fusion based on the semantic weight and trace weight to obtain the fused feature; Step 3.2.5 Input the fused features into the detection head to obtain the detection probability of the AI-generated image; input the global trace representation into the source tracing head to obtain the prediction result of the generated source category; Step 3.2.6 Calculate the detection loss based on the AI-generated image detection probability and the real / generated binary classification labels; calculate the source tracing loss based on the generated source category prediction result and the generated source category label; Step 3.2.7: The detection loss and the source tracing loss are weighted and summed to obtain the overall loss function; Step 3.3 Backpropagation and parameter update Based on the overall loss function, the parameters of the trace evidence extraction sub-network, the reliability adaptive fusion module, and the multi-task output module of the AI-generated image forensics network are updated using the backpropagation algorithm; Step 3.4 Repeat steps 3.1 to 3.3 until the preset number of training rounds or the convergence condition of the loss function are met, and the trained AI-generated image forensics network is obtained.
[0009] The preferred overall loss function is shown in the following formula: ; in, L Represents the overall loss function. Indicates detection loss, Indicates the loss from tracing the source. , These represent the weight coefficients of the loss for each task. The detection loss uses binary cross-entropy loss, and the source tracing loss uses multi-class cross-entropy loss.
[0010] The preferred training dataset in step 1 further includes a pixel-level forged region mask; the multi-task output module in step 2.5 includes a localization head running in parallel with the detection head and the source tracing head; step 3.2.5 includes inputting a local trace feature map into the localization head to obtain a pixel-level localization heatmap or mask; step 3.2.6 includes calculating the localization loss based on the pixel-level localization heatmap or mask and the pixel-level forged region mask; step 3.2.7 is to perform a weighted summation of the detection loss, the source tracing loss, and the localization loss to obtain the overall loss function; The overall loss function is shown in the following formula: ; in, L Represents the overall loss function. Indicates detection loss, Indicates the loss from tracing the source. Indicates location loss. , and These represent the weighting coefficients of the losses for each task. The detection loss uses binary cross-entropy loss, the source tracing loss uses multi-class cross-entropy loss, and the localization loss uses a weighted combination of pixel-level binary cross-entropy loss and Dice loss as a supervision signal.
[0011] The preferred step 4 involves inputting the image to be detected into the trained AI-generated image forensics network for forward inference. The specific steps are as follows: Step 4.1 Input the image to be detected into the image preprocessing module, and perform size normalization, pixel standardization and channel alignment processing on the image to be detected to obtain a standardized input image; Step 4.2 Input the standardized input image into the semantic evidence extraction subnetwork, use the visual language model image encoder to extract semantic feature vectors, and obtain the semantic evidence representation after linear mapping; Step 4.3 Input the standardized input image into the trace evidence extraction subnetwork. First, perform multi-scale discrete wavelet decomposition on the image using a multi-scale discrete wavelet decomposition module. Second, perform block segmentation, linear embedding, frequency band embedding, scale embedding, and position embedding on the multi-scale subband set using a global trace modeling module to obtain a frequency band-aware token sequence. Input the frequency band-aware token sequence into a Transformer encoding module for encoding, and obtain a global trace representation through token aggregation. Simultaneously, perform convolutional mapping on the high-frequency response using a local trace extraction module to obtain a local trace feature map. Step 4.4 Input the semantic evidence representation and the global trace representation into the reliability adaptive fusion module to predict the semantic weight and trace weight, and perform weighted fusion of the two types of evidence according to the semantic weight and trace weight to obtain the fused features; Step 4.5 inputs the fused features into the detection head, outputs the probability that the image to be detected belongs to the AI-generated image, and obtains the detection and discrimination result according to the preset threshold; Step 4.6 inputs the global trace representation into the source tracing head and outputs the result of the generation source category judgment corresponding to the image to be detected; Step 4.7 Input the local trace feature map into the localization head and output the pixel-level localization heatmap or mask corresponding to the image to be detected.
[0012] Preferably, step 2.5 is followed by the establishment of a language report generation module, which consists of a structured prompting construction unit and a frozen large-scale multimodal model. After step 4.7, the language report generation module organizes the image to be detected, the probability of AI-generated images, the detection and discrimination results, the generation source category or category distribution, the pixel-level localization heatmap or mask, and the semantic weight and trace weight into structured prompting information through the structured prompting construction unit, and then generates a natural language forensics report by the frozen large-scale multimodal model.
[0013] Compared with the prior art, the present invention has the following beneficial effects: 1. By employing a pre-trained and frozen visual language model image encoder to extract high-level semantic features, and combining multi-scale discrete wavelet decomposition, frequency band-aware tokenization, and Transformer coding to extract low-level frequency domain trace evidence, and through a reliability adaptive fusion module that dynamically adjusts the fusion weights according to the input image quality, the advantages of semantic evidence and trace evidence are complemented. When facing an unknown generator, even if the semantic content distribution changes, robust detection can still be achieved by relying on trace evidence, and the cross-generator generalization ability is significantly better than existing technologies. At the same time, the reliability adaptive fusion module can dynamically adjust the fusion weights according to the input image quality, and automatically increase the weight of trace evidence when the semantic features are degraded due to strong post-processing, thereby maintaining detection performance. The average detection accuracy on the post-processing test set is improved compared with existing technologies, and it has strong robustness to post-processing such as JPEG compression, Gaussian blur, and scaling.
[0014] 2. By setting a source tracing head, the generation source category or category distribution is output based on the global trace representation. Through multi-task joint training, the detection task and the source tracing task are optimized collaboratively. This enables high-precision detection while accurately tracing the source of the generation model. The source tracing accuracy is high, meeting the requirements of source tracing in application scenarios such as digital forensics, platform review, and judicial assistance.
[0015] 3. By setting a positioning head, pixel-level positioning heatmaps or masks are output based on local trace feature maps. Through multi-task joint training, the positioning task is enhanced by the synergistic effect of detection and source tracing tasks. It can accurately identify suspicious generation areas in images and provide fine-grained spatial positioning information for evidence analysis. Its pixel-level positioning capability is superior to existing technologies. 4. By setting up an optional language report generation module, the numerical detection, tracing, and location results, as well as the fusion weights, are converted into natural language reports. This clearly shows professional reviewers and non-professional users whether an image is suspected of being AI-generated, its possible source, the location of abnormal areas, and the basis for judgment. This significantly improves the interpretability and practicality of the evidence results and meets the needs of real-world application scenarios for interpretable AI. Attached Figure Description
[0016] Figure 1 A schematic diagram of the AI-generated image forensics network architecture process according to an embodiment of the present invention.
[0017] Figure 2 This is a schematic diagram of the pixel-level positioning results according to an embodiment of the present invention.
[0018] Figure 3 This is a diagram of a natural language forensics report output by an embodiment of the present invention. Detailed Implementation
[0019] This invention provides a method for detecting, tracing, and locating AI-generated images, which is performed according to the following steps: Step 1. Create a training dataset Create a training dataset consisting of real images, AI-generated images, real / generated binary classification labels, and generated source category labels; the specific steps are as follows: Step 1.1 Acquire real images and AI-generated images; Step 1.2 Configure real / generated binary labels for real images and AI-generated images, where real images correspond to real class labels and AI-generated images correspond to generated class labels; Step 1.3 Configure the generation source category label for the AI-generated image. The generation source category label indicates the generation model category or generation source corresponding to the AI-generated image. Step 1.4 Obtain the corresponding pixel-level forgery region mask from the data marked with pixel-level forgery regions; Step 2: Build and initialize the AI-generated image forensics network The AI-generated image forensics network, such as Figure 1 As shown: An image preprocessing module is provided. The output of the image preprocessing module is connected to a reliability adaptive fusion module, a multi-task output module, and a language report generation module, which are sequentially connected through a parallel semantic evidence extraction sub-network and a trace evidence extraction sub-network. The specific steps are as follows: Step 2.1 Establish and initialize the image preprocessing module, which is used to process the input image. Size normalization, pixel standardization, and channel alignment are performed to obtain a standardized input image, ensuring that the semantic evidence extraction subnetwork and the trace evidence extraction subnetwork receive the same standardized input image. Step 2.2 Establish and initialize the semantic evidence extraction subnetwork, which consists of a pre-trained and frozen visual language model image encoder. and linear mapping matrix constitute; Input image The semantic feature vector is obtained after inputting the image encoder of the visual language model. The process is shown in formula (1): ; (1); semantic feature vector Through linear mapping matrix Projecting onto the fusion space yields a semantic evidence representation. The process is shown in formula (2): ; (2); Step 2.3 Establish and initialize the trace evidence extraction sub-network, which consists of a multi-scale discrete wavelet decomposition module, a global trace modeling module, and a local trace feature extraction module connected in series; the global trace modeling module consists of a frequency band sensing tokenization module, a Transformer coding module, and a token aggregation module connected in series. The multi-scale discrete wavelet decomposition module is used to process the input image. I conduct S Multi-scale discrete wavelet decomposition at layer S yields approximate subbands. LL And detail sub-bands in the horizontal, vertical and diagonal directions. LH , HL , HH Represent each scale and frequency band sub-band as ,in s Indicates scale index. b Indicates the frequency band index; The frequency band-aware tokenization module is used to divide and linearly embed subbands of each scale and frequency band, and superimpose frequency band embedding, scale embedding, and position embedding to obtain frequency band-aware tokens. The process is shown in formula (3): ; (3) In the formula: This represents block partitioning and linear embedding; , and These represent frequency band embedding, scale embedding, and position embedding, respectively. The Transformer encoding module uses a frequency band-aware token. Cross-scale and cross-band dependency modeling is performed to obtain the encoded output token sequence. The process is shown in formula (4): (4) The token aggregation module is used to process the token sequence encoded by the Transformer. Aggregation To obtain the global trace representation The process is shown in formula (5): ; (5) The local trace feature extraction module is used to process the wavelet high-frequency response of the input image. Extract local trace information and apply it through a convolutional mapping function. Obtain local trace feature map The process is shown in formula (6): (6) Step 2.4 Establish and initialize the reliability adaptive fusion module. The reliability adaptive fusion module consists of a joint evidence splicing unit, a weight prediction unit, and a weighted fusion unit connected in series. The weight prediction unit consists of a lightweight multilayer perceptron and a Softmax layer. The joint evidence splicing unit is used to splice the global trace representation and the semantic evidence representation. The lightweight multilayer perceptron... The Softmax weight prediction unit is used to predict the trace weight α and the semantic weight β; the process is shown in formula (7): ; The weighted fusion unit is used to perform weighted fusion of the two types of evidence according to the prediction weights to obtain fusion features. The process is shown in formula (8): (8) Step 2.5 Establish and initialize the multi-task output module, which includes parallel detection heads. tracing the source and positioning head Output the probability of AI-generated images respectively Source category And pixel-level localization results (heatmap or mask). The process is shown in formulas (9), (10), and (11): (9) (10) ; (11) Step 2.6 Establish an optional language report generation module. The language report generation module consists of a structured prompt construction unit and a frozen large-scale multimodal model. The structured prompt construction unit is used to combine the image to be detected, the detection result, the source tracing result, the localization result, and the fusion weights into structured prompt information. The frozen large-scale multimodal model processes the structured prompt information to obtain a natural language forensics report, as shown in formula (12). (12) Step 3. Joint Training The AI-generated image forensics network is jointly trained using a training dataset to obtain the trained AI-generated image forensics network. During the joint training process, real / generated binary classification labels supervise the detection task, and generated source category labels supervise the source tracing task. The specific steps are as follows: Step 3.1 Input the training dataset into the AI-generated image forensics network; Step 3.2 Forward Propagation Step 3.2.1 Input the real images and AI-generated images from the training dataset into the image preprocessing module to obtain standardized input images; Step 3.2.2 Input the standardized input image into the semantic evidence extraction subnetwork to obtain the semantic evidence representation. ; Step 3.2.3 Input the standardized input image into the trace evidence extraction subnetwork to obtain the global trace representation. and local trace feature map ; Step 3.2.4 Represent the semantic evidence Global Trace Representation The input reliability adaptive fusion module predicts semantic weights and trace weights, and performs weighted fusion based on the semantic weights α and trace weights β to obtain fused features. ; Step 3.2.5 will fuse the features Input the detection head to obtain the detection probability of the AI-generated image. Representing global traces Input the source header to obtain the predicted source category. ; local trace feature map Input the positioning head to obtain pixel-level positioning detection results (heatmap or mask). ; Step 3.2.6 Generate image detection probabilities based on AI. Calculate the detection loss using real / generated binary labels. Based on the prediction results of the generated source category Calculate the source tracing loss with the generated source category label ; Calculate the positioning loss based on the pixel-level positioning heatmap or mask and the pixel-level fake region mask. ; Step 3.2.7 involves weighted summation of the detection loss, source tracing loss, and localization loss to obtain the overall loss function; The overall loss function is shown in formula (13): (13) in, L Represents the overall loss function. Indicates detection loss, Indicates the loss from tracing the source. Indicates location loss. , and These represent the weighting coefficients for the losses of each task; The detection loss adopts the binary cross-entropy loss, as shown in formula (14): (14) in, Indicates true / generated binary labels; The source tracing loss adopts a multi-class cross-entropy loss, as shown in formula (15): (15) in, This indicates the generation of the source category index. Indicates the first k The source category label for class generation. This represents the predicted probability for the corresponding category; The localization loss is a weighted combination of pixel-level binary classification cross-entropy loss and Dice loss, as shown in formula (16): (16) in, This represents a pixel-level location heatmap or mask. This represents a pixel-level forged region mask. and The weighting coefficients represent the two types of localization losses; Step 3.3 Backpropagation and parameter update Based on the overall loss function, the parameters of the trace evidence extraction subnetwork, the reliability adaptive fusion module, and the multi-task output module of the AI-generated image forensics network are updated using the backpropagation algorithm, while the visual language model image encoder and the large-scale multimodal model in the semantic evidence extraction subnetwork of the AI-generated image forensics network remain frozen. Step 3.4 Repeat steps 3.1 to 3.3 until the preset number of training rounds or the loss function convergence condition is met, and the trained AI-generated image forensics network is obtained. Step 4. Inference Output The image to be detected is input into the trained AI-generated image forensics network for forward inference. The specific steps are as follows: Step 4.1 Input the image to be detected into the image preprocessing module, and perform size normalization, pixel standardization and channel alignment processing on the image to be detected to obtain a standardized input image; Step 4.2 Input the standardized input image into the semantic evidence extraction subnetwork, extract semantic feature vectors using the visual language model image encoder, and obtain the semantic evidence representation after linear mapping. ; Step 4.3 inputs the standardized input image into the trace evidence extraction subnetwork. First, it is decomposed into multi-scale discrete wavelet decomposition by the multi-scale discrete wavelet decomposition module. Second, the multi-scale sub-band set is divided into blocks, linearly embedded, and then subjected to frequency band embedding, scale embedding, and position embedding by the global trace modeling module to obtain a frequency band-aware token sequence. The frequency band-aware token sequence is then input into the Transformer encoding module for encoding, and the global trace representation is obtained through token aggregation. Simultaneously, the high-frequency response is convolved and mapped using a local trace extraction module to obtain a local trace feature map. ; Step 4.4 Represent the semantic evidence Global Trace Representation The input reliability adaptive fusion module predicts trace weights α and semantic weights β, and then performs weighted fusion of the two types of evidence based on trace weights α and semantic weights β to obtain the fused features. ; Step 4.5 will fuse the features Input the detection head, output the probability that the image to be detected belongs to an AI-generated image. And as shown in formula (17), based on the preset threshold Obtain the detection and discrimination results : (17) Step 4.6 Input the global trace representation Tracing back to the source, outputting the distribution of the generation source categories corresponding to the image to be detected. And the distribution of the generated source categories can be obtained through formula (18). Take the maximum value to get the source category. : ; (18) When the maximum class prediction probability When the image is below a preset threshold, it can be marked as an unknown source to support open set forensics scenarios. Step 4.7 Map the local trace features Input the localization head, output the pixel-level localization mask corresponding to the image to be detected. Furthermore, thresholding, morphological processing, or connected region analysis can be performed to obtain clearer outlines of suspicious regions. The pixel-level positioning results are as follows: Figure 2As shown, there are three sets of images, from top to bottom: the image to be detected, the pixel-level localization mask, and the heatmap overlay result. The pixel-level localization mask is used to indicate the location of suspected AI-generated or abnormal areas, and the heatmap overlay result is used to visually display the distribution of suspicious areas on the image to be detected.
[0020] Step 4.8 uses the language report generation module to organize the image to be detected, the probability of the AI-generated image, the detection and discrimination results, the generation source category or category distribution, the pixel-level localization heatmap or mask, and the semantic weight and trace weight into structured prompt information, and then generates a report such as... Figure 3 The natural language forensics report shown includes AI-generated image detection results, source category, pixel-level suspicious area location results, and natural language forensics report, thus forming an integrated forensics output of detection, source tracing, location, and interpretation.
[0021] The integrated forensic output of this invention includes detection, tracing, location and interpretation. Depending on the application scenario, only the integrated output of detection, tracing and location can be selected, or only the integrated output of detection and tracing can be selected.
Claims
1. A method for detecting, tracing, and locating AI-generated images, characterized in that... Follow these steps: Step 1. Create a training dataset Establish a training dataset consisting of real images, AI-generated images, real / generated binary classification labels, and generated source category labels; Step 2. Construct and initialize the AI-generated image forensics network An AI-generated image forensics network is constructed and initialized. The AI-generated image forensics network includes an image preprocessing module. The output of the image preprocessing module is connected to a parallel semantic evidence extraction sub-network, a trace evidence extraction sub-network, a serially connected reliability adaptive fusion module, and a multi-task output module. Step 3. Joint Training The AI-generated image forensics network is jointly trained using the training dataset to obtain the trained AI-generated image forensics network; during the joint training process, the detection task is supervised by real / generated binary classification labels, and the source tracing task is supervised by generated source category labels. Step 4. Inference Output The trained AI-generated image forensics network is used to process the image to be detected, and outputs the detection results of the AI-generated image and the source tracing results.
2. The AI-generated image detection, tracing, and localization method according to claim 1, characterized in that... Step 2 is described in detail below: Step 2.1 Establish and initialize the image preprocessing module, which is used to perform size normalization, pixel standardization and channel alignment processing on the input image to obtain a standardized input image; Step 2.2 Establish and initialize the semantic evidence extraction subnetwork, which consists of a pre-trained and frozen visual language model image encoder and a linear mapping layer; Step 2.3 Establish and initialize the trace evidence extraction sub-network, which consists of a multi-scale discrete wavelet decomposition module, a global trace modeling module, and a local trace feature extraction module connected in series; the global trace modeling module consists of a frequency band sensing tokenization module, a Transformer coding module, and a token aggregation module connected in series. Step 2.4 Establish and initialize the reliability adaptive fusion module. The reliability adaptive fusion module consists of a joint evidence splicing unit, a weight prediction unit and a weighted fusion unit connected in series. The weight prediction unit consists of a lightweight multilayer perceptron and a Softmax layer. Step 2.5 Establish and initialize the multi-task output module, which includes a parallel detection head and a source tracing head.
3. The AI-generated image detection, tracing, and localization method according to claim 2, characterized in that... Step 3 is as follows: Step 3.1 Input the training dataset into the AI-generated image forensics network; Step 3.2 Forward Propagation Step 3.2.1 Input the real images and AI-generated images from the training dataset into the image preprocessing module to obtain standardized input images; Step 3.2.2 Input the standardized input image into the semantic evidence extraction subnetwork to obtain the semantic evidence representation; Step 3.2.3 Input the standardized input image into the trace evidence extraction subnetwork to obtain the global trace representation and local trace feature map; Step 3.2.4 Input the semantic evidence representation and the global trace representation into the reliability adaptive fusion module to predict the semantic weight and trace weight, and perform weighted fusion based on the semantic weight and trace weight to obtain the fused feature; Step 3.2.5 Input the fused features into the detection head to obtain the detection probability of the AI-generated image; input the global trace representation into the source tracing head to obtain the prediction result of the generated source category; Step 3.2.6 Calculate the detection loss based on the AI-generated image detection probability and the real / generated binary classification labels; calculate the source tracing loss based on the generated source category prediction result and the generated source category label; Step 3.2.7: The detection loss and the source tracing loss are weighted and summed to obtain the overall loss function; Step 3.3 Backpropagation and parameter update Based on the overall loss function, the parameters of the trace evidence extraction sub-network, the reliability adaptive fusion module, and the multi-task output module of the AI-generated image forensics network are updated using the backpropagation algorithm; Step 3.4 Repeat steps 3.1 to 3.3 until the preset number of training rounds or the convergence condition of the loss function are met, and the trained AI-generated image forensics network is obtained.
4. The AI-generated image detection, tracing, and localization method according to claim 3, characterized in that... The overall loss function is shown in the following formula: ; in, Represents the overall loss function. Indicates detection loss, Indicates the loss from tracing the source. , These represent the weight coefficients of the loss for each task. The detection loss uses binary cross-entropy loss, and the source tracing loss uses multi-class cross-entropy loss.
5. The AI-generated image detection, tracing, and localization method according to claim 3, characterized in that... The training dataset in step 1 also includes pixel-level forged region masks; the multi-task output module in step 2.5 includes a localization head that runs parallel to the detection head and the source tracing head; step 3.2.5 includes inputting local trace feature maps into the localization head to obtain pixel-level localization heatmaps or masks; step 3.2.6 includes calculating the localization loss based on the pixel-level localization heatmaps or masks and the pixel-level forged region masks; step 3.2.7 is to perform a weighted summation of the detection loss, the source tracing loss, and the localization loss to obtain the overall loss function; The overall loss function is shown in the following formula: ; in, Represents the overall loss function. Indicates detection loss, Indicates the loss from tracing the source. Indicates location loss. , and These represent the weight coefficients of the loss for each task. The detection loss uses binary cross-entropy loss, the source tracing loss uses multi-class cross-entropy loss, and the localization loss uses a weighted combination of pixel-level binary cross-entropy loss and Dice loss as a supervision signal.
6. The AI-generated image detection, tracing, and localization method according to claim 5, characterized in that... Step 4 involves inputting the image to be detected into the trained AI-generated image forensics network for forward inference. The specific steps are as follows: Step 4.1 Input the image to be detected into the image preprocessing module, and perform size normalization, pixel standardization and channel alignment processing on the image to be detected to obtain a standardized input image; Step 4.2 Input the standardized input image into the semantic evidence extraction subnetwork, use the visual language model image encoder to extract semantic feature vectors, and obtain the semantic evidence representation after linear mapping; Step 4.3 Input the standardized input image into the trace evidence extraction subnetwork. First, perform multi-scale discrete wavelet decomposition on the image using a multi-scale discrete wavelet decomposition module. Second, perform block segmentation, linear embedding, frequency band embedding, scale embedding, and position embedding on the multi-scale subband set using a global trace modeling module to obtain a frequency band-aware token sequence. Input the frequency band-aware token sequence into a Transformer encoding module for encoding, and obtain a global trace representation through token aggregation. Simultaneously, perform convolutional mapping on the high-frequency response using a local trace extraction module to obtain a local trace feature map. Step 4.4 Input the semantic evidence representation and the global trace representation into the reliability adaptive fusion module to predict the semantic weight and trace weight, and perform weighted fusion of the two types of evidence according to the semantic weight and trace weight to obtain the fused features; Step 4.5 inputs the fused features into the detection head, outputs the probability that the image to be detected belongs to the AI-generated image, and obtains the detection and discrimination result according to the preset threshold; Step 4.6 inputs the global trace representation into the source tracing head and outputs the generation source category discrimination result corresponding to the image to be detected; Step 4.7 Input the local trace feature map into the localization head and output the pixel-level localization heatmap or mask corresponding to the image to be detected.
7. The AI-generated image detection, tracing, and localization method according to claim 6, characterized in that: Step 2.5 is followed by the establishment of a language report generation module, which consists of a structured prompting construction unit and a frozen large-scale multimodal model. Step 4.7 is followed by the use of the language report generation module to organize the image to be detected, the probability of AI-generated images, the detection and discrimination results, the generation source category or category distribution, the pixel-level localization heatmap or mask, and the semantic weight and trace weight into structured prompting information through the structured prompting construction unit. Then, the frozen large-scale multimodal model generates a natural language forensics report.