An AI image discrimination method based on consistency of frequency domain and noise domain

By employing a frequency domain and noise domain consistency identification method, directional spectrum and multi-scale noise flow features are extracted. Combined with a cross-domain consistency module and dual-stream fusion, the problem of insufficient cross-model generalization and poor robustness of existing AI-generated image identification methods is solved, achieving higher identification accuracy and adaptability.

CN122265800APending Publication Date: 2026-06-23GUILIN UNIV OF ELECTRONIC TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUILIN UNIV OF ELECTRONIC TECH
Filing Date
2026-03-31
Publication Date
2026-06-23

Smart Images

  • Figure CN122265800A_ABST
    Figure CN122265800A_ABST
Patent Text Reader

Abstract

The application discloses an AI image discrimination method based on frequency domain and noise domain consistency, and belongs to the technical field of image processing, computer vision and artificial intelligence security. The method comprises the following steps: acquiring an image to be discriminated and performing pretreatment, converting the image into a brightness channel and acquiring frequency spectrum information; inputting the image into a dual-domain physical guidance feature extraction module to extract directional spectrum features and multi-scale noise flow features; inputting the directional spectrum features and the multi-scale noise flow features into a cross-domain physical consistency module to generate a local consistency distance map and a global consistency score through shared embedding mapping and feature distance calculation, and obtaining consistency perception features; inputting the directional spectrum features, the multi-scale noise flow features and the consistency perception features into a dual-flow fusion module for cross-flow interactive fusion and global feature aggregation to obtain discrimination feature representation; and inputting the discrimination feature representation into a classification head to output a discrimination result of whether the image to be discriminated is a real image or an AI generated image. The application realizes effective discrimination of AI generated images by jointly modeling the physical consistency relationship between frequency domain features and noise domain features, and improves the robustness and generalization ability of the model under the conditions of cross-generator, cross-dataset and image compression, blurring and other post-processing conditions while ensuring detection accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of image processing, artificial intelligence security, and computer vision, specifically to an AI image identification method based on the consistency between the frequency domain and the noise domain, which is particularly suitable for application scenarios that automatically distinguish between real images and AI-generated images. Background Technology

[0002] With the rapid development of generative adversarial networks, diffusion models, and other image generation models, AI-generated images are continuously improving in terms of visual quality, texture detail, and overall semantic consistency, and are now capable of generating content that is highly similar to real images. These images have wide applications in artistic creation, content generation, and visual synthesis, but they also present new challenges to image authenticity verification, content security review, media credibility assessment, and digital forensics.

[0003] Existing AI-generated image identification methods typically rely on spatial domain texture features, frequency domain statistical features, deep semantic features, or network classification features for recognition. However, as generative models iterate, the types of artifacts generated by different models vary significantly. Single-domain features are easily affected by generator type, training data distribution, and image post-processing operations, resulting in insufficient cross-model generalization ability, poor cross-dataset adaptability, and weak robustness.

[0004] Furthermore, real images typically undergo a physical imaging process involving optical imaging, sensor sampling, image signal processing, and compression encoding, resulting in a relatively stable physical correlation between their frequency distribution characteristics and residual noise characteristics. While AI-generated images can approximate the visual appearance of real images, they often lack the physical consistency between their frequency domain features and noise characteristics that corresponds to the real imaging process. Therefore, relying solely on a single frequency domain feature or a single noise feature for identification is insufficient to fully uncover the deeper differences between real images and AI-generated images.

[0005] Therefore, there is a need for an AI-generated image identification method that can jointly utilize frequency domain information and noise domain information and explicitly characterize the physical consistency differences between the two, so as to improve the ability to identify images with different generation models, different data sources, and post-processed images such as compressed, blurred, and scaled images. Summary of the Invention

[0006] The purpose of this invention is to provide an AI image identification method based on the consistency between the frequency domain and the noise domain, so as to solve the problems of existing AI-generated image identification methods, such as strong dependence on a single feature, insufficient generalization ability across generators, weak robustness across datasets, and sensitivity to post-processing perturbations.

[0007] To achieve the above objectives, the present invention adopts the following technical solution:

[0008] An AI image identification method based on the consistency between the frequency domain and the noise domain includes the following steps:

[0009] Step 1: Obtain the image to be identified and preprocess it to obtain the input image;

[0010] Step 2: Input the input image into the dual-domain physical guidance feature extraction module to extract directional spectral features and multi-scale noise flow features;

[0011] Step 3: Input the directional spectral features and the multi-scale noise flow features into the cross-domain physical consistency module to perform shared embedding mapping, consistency distance calculation and consistency-aware feature generation, and obtain the local consistency distance map, global consistency score and consistency-aware feature map;

[0012] Step 4: Input the directional spectral features, the multi-scale noise flow features, and the consistency-aware feature map into the dual-stream fusion module to perform cross-stream interactive fusion and global feature aggregation to obtain the discriminative feature representation;

[0013] Step 5: Input the identification feature representation into the classification head, and output the discrimination result of whether the image to be identified is a real image or an AI-generated image.

[0014] Furthermore, the preprocessing in step 1 includes: converting the image to be identified into a luminance channel image, and performing a two-dimensional discrete Fourier transform on the luminance channel image to obtain spectral information.

[0015] Further, the dual-domain physical guidance feature extraction module in step 2 includes a frequency domain feature extraction branch and a noise domain feature extraction branch; wherein, the frequency domain feature extraction branch applies multiple learnable directional filters to the spectrum of the luminance channel image and performs an inverse Fourier transform on the filter response to obtain the spatial energy distribution corresponding to multiple directional frequency bands. The spatial energy distribution can be expressed as:

[0016] in, This represents the spectral information corresponding to the luminance channel image. Indicates the first A learnable directional filter This represents element-wise multiplication. Indicates the inverse Fourier transform. Indicates the first The energy distribution of each directional frequency band in the spatial domain. The spatial energy distribution corresponding to multiple directional frequency bands is input into the frequency domain encoder to obtain the directional spectral characteristics.

[0017] Furthermore, the noise domain feature extraction branch in step 2 obtains multi-scale residual noise by constructing a Gaussian pyramid of the input image and calculating the Laplacian residual based on adjacent scale images. Its expression is:

[0018] in, Indicates the first Image of the Gaussian pyramid Indicates a smooth operation. Indicates an upsampling operation. Indicates the first Layer Laplace residuals; preferably, the residuals of the last layer satisfy The multi-scale residual noise is upsampled to a uniform resolution, then stitched together and input into a noise domain encoder to obtain multi-scale noise flow features.

[0019] Further, the cross-domain physical consistency module in step 3 includes: mapping the directional spectral features and the multi-scale noise flow features to a shared embedding space to obtain frequency domain embedding features and noise domain embedding features, the expressions of which are:

[0020] in, Indicates directional spectral characteristics, Represents the characteristics of multi-scale noise flow. and These represent convolutional transformations that map features in the frequency domain and noise domain, respectively. and These represent the frequency domain embedding features and noise domain embedding features in the shared embedding space, respectively.

[0021] In the shared embedding space, the feature distances for the frequency domain embedding features and the noise domain embedding features at each spatial location are calculated to obtain a local consistency distance map, the expression of which is:

[0022] in, Indicates position The local consistency distance value is calculated. A global consistency score is obtained by spatially aggregating the local consistency distance map. The local consistency distance map is used to characterize the degree of physical consistency between frequency domain information and noise domain information at each spatial location; the smaller the distance value, the higher the consistency, and the larger the distance value, the more obvious the physical inconsistency.

[0023] Furthermore, during model training, a consistency constraint loss function is used to constrain the global consistency score, and its expression is:

[0024] in, Representing image category labels, when referring to real images When AI generates images , Indicates the preset interval threshold. This represents the global consistency score. For real images, the global consistency score is reduced; for AI-generated images, when the global consistency score is less than a preset interval threshold, an interval constraint penalty is applied.

[0025] Furthermore, the cross-domain physical consistency module also performs nonlinear fusion based on the frequency domain embedding features and the noise domain embedding features to generate a consistency-aware feature map, which is used to explicitly inject cross-domain consistency information into the subsequent identification process.

[0026] Furthermore, the dual-stream fusion module in step 4 includes: flattening and mapping the directional spectral features, the multi-scale noise stream features, and the consistency-aware feature map into token sequences, adding position encoding to each token sequence, performing self-attention and cross-attention updates on the frequency domain stream and the noise domain stream through multiple dual-stream Transformer modules, and globally aggregating the updated frequency domain stream token sequences and the noise domain stream token sequences to obtain the discriminative feature representation.

[0027] In a preferred embodiment, when the frequency domain stream performs cross-attention update on the noise domain stream, the token sequence of the noise domain stream is concatenated with the token sequence corresponding to the consistency-aware feature to form a key sequence and a value sequence, the expression of which is:

[0028] Accordingly, the cross-attention update expression for the frequency domain flow on the noise domain flow is:

[0029]

[0030] in, Represents a token sequence in the noise domain. This represents the token sequence corresponding to the consistency-aware feature. and These represent the key mapping matrix and the value mapping matrix, respectively. Represents the frequency domain flow query vector. This represents the dimension of the key vector. The cross-attention update of the noise domain flow to the frequency domain flow is performed in a symmetric manner.

[0031] Compared with the prior art, the present invention has the following beneficial effects:

[0032] (1) This invention starts from the physical consistency between frequency domain features and noise domain features, and no longer relies solely on single domain artifacts for identification, thus more fully depicting the essential differences between real images and AI-generated images.

[0033] (2) The present invention extracts directional spectral features and multi-scale noise flow features simultaneously through a dual-domain physical guided feature extraction module, which can take into account both frequency statistical information and residual noise information, thereby improving the completeness and effectiveness of feature expression.

[0034] (3) The present invention sets up a cross-domain physical consistency module to explicitly generate a local consistency distance map and a global consistency score, which not only enhances the separability of real and fake images, but also has good interpretability.

[0035] (4) The present invention uses a dual-stream fusion module to jointly model the frequency domain flow, noise domain flow and consistency perception features, which can improve the interaction between features in different domains, thereby improving the discrimination accuracy and generalization ability.

[0036] (5) The present invention has strong adaptability to cross-generator migration, cross-dataset generalization and post-processing perturbations such as compression, blurring and scaling, and is suitable for tasks such as image authenticity detection, content review and digital forensics. Attached Figure Description

[0037] Figure 1 This is a schematic diagram of the overall framework of an AI image identification method based on the consistency between the frequency domain and the noise domain according to the present invention.

[0038] Figure 2 This diagram illustrates the difference in physical consistency between real images and AI-generated images in the frequency domain and noise domain features.

[0039] Figure 3 This is a schematic diagram of the results of the dual-domain physical guidance feature extraction module in this invention.

[0040] Figure 4 This is a schematic diagram of the cross-domain physical consistency modeling process and consistency distance graph in this invention.

[0041] Figure 5 This is a schematic diagram illustrating the results of the method of the present invention in distinguishing between real images and AI-generated images. Detailed Implementation

[0042] To make the objectives, technical solutions, and beneficial effects of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the following embodiments are for illustrative purposes only and are not intended to limit the scope of protection of this invention. All equivalent substitutions, improvements, and modifications made within the spirit and principles of this invention should be included within the scope of protection of this invention.

[0043] like Figure 1 In this embodiment, the present invention proposes an AI image identification method based on the consistency of the frequency domain and noise domain, which includes five stages: image preprocessing, dual-domain physically guided feature extraction, cross-domain physical consistency modeling, dual-stream interactive fusion, and real / fake classification. The method can be applied to the automatic discrimination between real images and AI-generated images, and can also be extended to scenarios such as image credibility analysis, digital media forensics, and visual content security detection.

[0044] First, an image to be identified is acquired. This image can be an RGB color image or decoded standard image format data. In a preferred embodiment, the image to be identified is converted into a luminance channel image to reduce the interference of color information differences on spectral analysis and highlight the statistical features of the image at the structural and texture levels.

[0045] After completing the luminance channel conversion, a two-dimensional discrete Fourier transform is performed on the luminance channel image to obtain spectral information. This spectral information can be used to characterize the image's response features in different frequency directions, providing input for subsequent directional spectrum extraction. In practical implementation, the spectral information can also be centered, normalized in amplitude, or subjected to logarithmic transformation to enhance the stability of the spectral representation.

[0046] In this invention, the dual-domain physical-guided feature extraction module includes a frequency domain feature extraction branch and a noise domain feature extraction branch, such as... Figure 3 As shown, the frequency domain feature extraction branch takes the spectral information of the luminance channel image as input and models the response of different directional frequency bands through multiple learnable directional filters. Different directional filters correspond to frequency-sensitive regions in different directions, so as to extract the directional distribution differences of the image in the frequency space.

[0047] In a preferred embodiment, after the plurality of learnable directional filters are applied to the spectral information, filter responses for multiple directional frequency bands are obtained; further, an inverse Fourier transform is performed on the filter responses to obtain the energy distribution map of the corresponding directional frequency band in the spatial domain; its expression is:

[0048] in, Represents the image spectrum. Indicates the first A learnable directional filter Indicates the first The energy distribution maps of multiple directional frequency bands in the spatial domain are then combined along the channel dimension and input into a frequency domain encoder to obtain directional spectral features. The frequency domain encoder may employ a convolutional neural network structure to extract high-level frequency domain semantic information from the spatial energy distribution maps.

[0049] Meanwhile, the noise domain feature extraction branch constructs a Gaussian pyramid based on the input image. Specifically, Gaussian images at different scales are obtained by smoothing and downsampling the input image layer by layer; then, Laplacian residuals are constructed based on the differences between Gaussian images at adjacent scales to extract residual details and noise information of the image at different scales.

[0050] In a preferred embodiment, the multi-scale Laplace residuals satisfy the following expression:

[0051] in, Indicates the first Layered Gaussian image, Indicates the first Layer residual diagram, preferably, the last layer satisfies The Laplacian residual maps obtained at different scales are upsampled to a uniform resolution and stitched together along the channel dimension to form a multi-scale residual noise representation. The multi-scale residual noise representation is then input into the noise domain encoder to obtain multi-scale noise flow features.

[0052] like Figure 4 After extracting the directional spectral features and multi-scale noise flow features, they are input into a cross-domain physical consistency module to explicitly model the physical relationship between the frequency domain features and the noise domain features. The cross-domain physical consistency module first performs convolution mapping on the directional spectral features and the multi-scale noise flow features respectively to transform them into a shared embedding space.

[0053] In the shared embedding space, feature distances are calculated for frequency domain embedding features and noise domain embedding features at each spatial location to obtain a local consistency distance map.

[0054]

[0055] in, Indicates position The local consistency distance value at a given location. For the differences in physical consistency between real images and AI-generated images in the frequency domain and noise domain features, please refer to [reference needed]. Figure 2For real images, there is usually a strong physical consistency between frequency domain information and noise domain information, resulting in a relatively small distance value. For AI-generated images, since they do not pass through a real imaging process, the physical correspondence between the frequency domain and noise domain is often weaker, resulting in a relatively large distance value. By spatially aggregating the local consistency distance map, a global consistency score can be obtained. .

[0056] In addition to generating local consistency distance maps and global consistency scores, the cross-domain physical consistency module also performs nonlinear fusion based on the frequency domain embedding features and the noise domain embedding features to generate a consistency-aware feature map, which is used to explicitly inject consistency information into the subsequent discrimination process, so that the subsequent network can pay more attention to the regions where there is a mismatch between the frequency domain and the noise domain.

[0057] In this invention, the dual-stream fusion module is used to jointly model directional spectral features, multi-scale noise flow features, and consistency-aware feature maps. Specifically, the directional spectral features, multi-scale noise flow features, and consistency-aware feature maps are first flattened and mapped into token sequences; then, position encoding is added to each token sequence to preserve the original spatial location information.

[0058] After tokenization, the frequency domain stream and the noise domain stream are updated with self-attention and cross-attention through multiple dual-stream Transformer modules. The frequency domain stream and the noise domain stream perform self-attention modeling within their respective branches to learn long-range dependencies within their respective domains. Simultaneously, during cross-stream interaction, the frequency domain stream and the noise domain stream exchange information through a cross-attention mechanism, thereby enhancing the coupling modeling capability between features of different domains.

[0059] In a preferred embodiment, the token sequence corresponding to the consistency-aware feature map serves as auxiliary memory information in the cross-attention calculation. Specifically, when updating the cross-attention of the frequency domain stream to the noise domain stream, the token sequence of the noise domain stream and the token sequence corresponding to the consistency-aware feature map are concatenated to form a key sequence and a value sequence, the expression of which is:

[0060] Accordingly, the expression for the cross-attention update of the frequency domain flow to the noise domain flow is:

[0061]

[0062] in, Represents a token sequence in the noise domain. This represents the token sequence corresponding to the consistency-aware feature. Represents the frequency domain flow query vector. The dimension of the key vector is represented. The cross-attention update of the noise domain stream to the frequency domain stream is performed symmetrically. Through the above design, the two-stream interaction can not only rely on the feature information of the two domains themselves, but also explicitly utilize the consistency modeling results to guide the discrimination of real and fake images.

[0063] After processing by multiple dual-stream Transformer modules, the updated frequency domain stream token sequence and noise domain stream token sequence are globally aggregated to obtain a discriminative feature representation. This global aggregation can employ average pooling, weighted pooling, classification token extraction, or other suitable feature aggregation methods. Subsequently, the discriminative feature representation is input into a classification head, which outputs a discrimination result indicating whether the image to be identified is a real image or an AI-generated image.

[0064] During the model training phase, in addition to using conventional classification loss to constrain the classification results, this invention also uses a consistency constraint loss function to constrain the global consistency score, the expression of which is:

[0065] Among them, the real image corresponds to AI-generated image correspondence For real images, the consistency constraint loss function reduces their global consistency score, prompting the model to learn a stable correspondence between the frequency domain and the noise domain in real images; for AI-generated images, when their global consistency score is less than a preset interval threshold... At that time, an interval constraint penalty is imposed on it to force the global consistency score of the AI-generated image to remain sufficiently different from that of the real image.

[0066] Through the above training methods, the model not only learns the differences between real images and AI-generated images at the classification label level, but also learns the differences in physical consistency between the two in the frequency domain and noise domain, thereby enhancing the model's stability and generalization ability under different generation models, different data sources, and different post-processing conditions.

[0067] In one exemplary embodiment, the method of the present invention can be used for AI-generated image discrimination tasks under cross-generator conditions, that is, after the model is trained on images generated by one or more generative models, it can still effectively distinguish images generated by other unseen generative models.

[0068] In another embodiment, the method of the present invention can also be used for AI-generated image identification tasks under cross-dataset conditions, or for image authenticity identification tasks after post-processing such as compression, blurring, and scaling. For different application scenarios, only the source and classification of training data need to be adjusted according to the actual task, without changing the overall technical approach of dual-domain extraction, cross-domain consistency modeling, and dual-stream fusion proposed in this invention.

[0069] It should be noted that the number of filters, pyramid layers, encoder structure, Transformer layers, feature dimensions, loss function weights, and threshold settings involved in the above embodiments are merely illustrative and do not constitute a limitation on the scope of protection of this invention. Those skilled in the art can make appropriate adjustments according to actual application needs.

[0070] Those skilled in the art will also understand that, without departing from the spirit and essence of the present invention, any equivalent substitution or conventional transformation made to the frequency domain feature extraction method, noise domain residual construction method, shared embedding mapping method, feature distance calculation method, consistency-aware feature generation method, two-stream interaction order, and specific implementation of the loss function should be considered to fall within the protection scope of the present invention.

Claims

1. An AI image identification method based on the consistency between the frequency domain and the noise domain, characterized in that, Includes the following steps: Step 1: Obtain the image to be identified and preprocess it to obtain the input image; Step 2: Input the input image into the dual-domain physical guidance feature extraction module to extract directional spectral features and multi-scale noise flow features; Step 3: Input the directional spectral features and the multi-scale noise flow features into the cross-domain physical consistency module to perform shared embedding mapping, consistency distance calculation and consistency-aware feature generation, and obtain the local consistency distance map, global consistency score and consistency-aware feature map; Step 4: Input the directional spectral features, the multi-scale noise flow features, and the consistency-aware feature map into the dual-stream fusion module to perform cross-stream interactive fusion and global feature aggregation to obtain the discriminative feature representation; Step 5: Input the identification feature representation into the classification head, and output the discrimination result of whether the image to be identified is a real image or an AI-generated image.

2. The AI ​​image identification method based on the consistency between the frequency domain and the noise domain according to claim 1, characterized in that: The preprocessing in step 1 includes converting the image to be identified into a luminance channel image and performing a two-dimensional discrete Fourier transform on the luminance channel image to obtain spectral information.

3. The AI ​​image identification method based on the consistency between the frequency domain and the noise domain according to claim 1, characterized in that: The dual-domain physical guidance feature extraction module in step 2 includes a frequency domain feature extraction branch and a noise domain feature extraction branch. The frequency domain feature extraction branch applies multiple learnable directional filters to the spectrum of the brightness channel image and performs an inverse Fourier transform on the filter response to obtain the spatial energy distribution of multiple directional frequency bands. The spatial energy distribution of multiple directional frequency bands is input into the frequency domain encoder to obtain directional spectral features.

4. The AI ​​image identification method based on the consistency between the frequency domain and the noise domain according to claim 3, characterized in that: The noise domain feature extraction branch in step 2 constructs a Gaussian pyramid of the input image and calculates the Laplacian residual based on adjacent scale images to obtain multi-scale residual noise. The multi-scale residual noise is then upsampled to a uniform resolution, stitched together, and input into the noise domain encoder to obtain multi-scale noise flow features.

5. The AI ​​image identification method based on the consistency between the frequency domain and the noise domain according to claim 1, characterized in that: The cross-domain physical consistency module in step 3 includes: Step 3.1: Map the directional spectral features and the multi-scale noise flow features to the shared embedding space through 1×1 convolution to obtain frequency domain embedding features and noise domain embedding features, respectively; Step 3.2: Calculate the Euclidean distance at each spatial location based on the frequency domain embedding features and the noise domain embedding features to obtain a local consistency distance map; Step 3.3: Spatially aggregate the local consistency distance map to obtain a global consistency score; and fuse the frequency domain embedding features and the noise domain embedding features to obtain a consistency-aware feature map.

6. The AI ​​image identification method based on the consistency between the frequency domain and the noise domain according to claim 5, characterized in that: The distance values ​​at each spatial location in the local consistency distance map are used to characterize the degree of consistency between frequency domain features and noise domain features at the corresponding locations; the smaller the distance value, the higher the consistency, and the larger the distance value, the more obvious the physical inconsistency.

7. The AI ​​image identification method based on the consistency between the frequency domain and the noise domain according to claim 1, characterized in that: The dual-stream fusion module in step 4 includes: Step 4.1: Flatten the directional spectral features, the multi-scale noise flow features, and the consistency-aware feature map and map them into token sequences, respectively; Step 4.2: Add positional encoding to each token sequence; Step 4.3: Update the frequency domain flow and noise domain flow using multiple dual-stream Transformer modules through self-attention and cross-attention, wherein the token sequence corresponding to the consistency-aware feature is used as an auxiliary memory for cross-attention calculation; Step 4.4: Globally aggregate the updated frequency domain flow tokens and noise domain flow tokens to obtain the discriminative feature representation.

8. The AI ​​image identification method based on the consistency between the frequency domain and the noise domain according to claim 7, characterized in that: In the dual-stream Transformer module, when the frequency domain stream performs cross-attention on the noise domain stream, the token sequence of the noise domain stream and the token sequence corresponding to the consistency-aware feature are concatenated to form a key sequence and a value sequence. When the noise domain flow performs cross-attention on the frequency domain flow, a symmetrical approach is used for updating.

9. The AI ​​image identification method based on the consistency between the frequency domain and the noise domain according to claim 1, characterized in that: During model training, a consistency constraint loss function is used to constrain the global consistency score; for real images, the global consistency score is reduced; for AI-generated images, when the global consistency score is less than a preset interval threshold, an interval constraint penalty is applied.

10. The AI ​​image identification method based on the consistency between the frequency domain and the noise domain according to claim 1, characterized in that: The identification method is applicable to tasks such as cross-generator transfer, cross-dataset generalization, and identification of AI-generated images after compression, blurring, or scaling.