An automatic detection method and system for authenticity of an image generated based on artificial intelligence
Patent Information
- Application Number
- CN202610957126.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-30
- Publication Date
- 2026-10-30
AI Technical Summary
现有方法多为黑盒决策,即使借助梯度可视化方法(如Grad-CAM)生成热力图,其结果仍属定性观察,难以用客观、可复现、可比较的统计指标刻画真伪图像在模型决策层面的差异,无法为检测结论提供具有统计意义的判别依据
[0063]1、少样本下检测准确率高。仅需每类约200张训练样本(约1%训练数据),即可在GAN测试集上达到97%以上的分类准确率,在扩散模型测试集上达到约96%的准确率,多数对比方法在使用100%训练数据时仍未达到该水平。
Smart Images

Figure CN123016175A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image forensics and pattern recognition technology, and in particular to an automatic method and system for detecting the authenticity of artificial intelligence-generated (deepfake) images. Background Technology
[0002] With the rapid development of image generation technologies such as Generative Adversarial Networks (GANs) and Diffusion Models, algorithmically synthesized forged images have reached a level of visual realism that is difficult for the human eye to distinguish, posing a serious threat to the authenticity of visual information. To address this threat, the industry has proposed various deepfake image detection methods, which can be broadly classified into two categories based on their underlying characteristics:
[0003] Spatial domain detection method: The end-to-end convolutional neural network directly learns the artifacts or local abnormal textures introduced by a specific generator in the pixel domain, thereby performing binary classification of real and fake images;
[0004] Frequency domain detection method: Transform the image to the frequency domain (such as Fourier transform or discrete cosine transform domain), and use the periodic anomalies introduced in the frequency domain by the upsampling process of the generative model as the discrimination criterion.
[0005] Existing deepfake image detection technologies have the following main drawbacks:
[0006] Insufficient cross-domain generalization ability. Existing methods mostly rely on artifact features introduced by a specific generative model. Since different generative paradigms (such as GANs and diffusion models) differ significantly in synthesis mechanisms, frequency domain characteristics, and statistical distributions, detection models trained on known generators often experience a sharp drop in detection accuracy when faced with unknown generators or unknown semantic content, making them difficult to apply reliably in open environments.
[0007] It relies on large-scale labeled samples. Existing methods typically require a large number of labeled training samples to achieve good performance. Performance degrades significantly when there are insufficient training samples (few samples), and deployment costs are high.
[0008] Feature supervision is singular. Existing methods generally use binary classification of real and fake images as the sole optimization objective (single task), lacking explicit auxiliary supervision signals for the feature learning process. This leads to the network being prone to overfitting to local artifacts of a specific generator, making it difficult to learn stable frequency domain statistical features that reflect the essential differences between real and fake images.
[0009] There is a lack of quantifiable and interpretable evidence. Existing methods are mostly black-box decision-making. Even when gradient visualization methods (such as Grad-CAM) are used to generate heatmaps, the results are still qualitative observations. It is difficult to use objective, reproducible, and comparable statistical indicators to characterize the differences between real and fake images at the model decision level, and thus cannot provide statistically significant criteria for the detection conclusions.
[0010] Therefore, it is necessary to provide a new method and system for automatic detection of the authenticity of artificial intelligence-generated images to solve the above-mentioned technical problems. Summary of the Invention
[0011] To address the aforementioned technical problems, this invention provides a deepfake image detection method that achieves high detection accuracy, strong generalization ability across generative models and semantics, and quantifiable interpretability of the decision-making process, even with only a small number of training samples.
[0012] This invention provides an automatic method and system for detecting the authenticity of images generated by artificial intelligence. It introduces "spectral entropy" as an information-theoretic measure of the uniformity of local frequency domain energy distribution in an image, and uses the reconstructed image's "spectral entropy map" as an auxiliary task. This map shares the same encoder with the main binary classification task, forming an encoder-decoder dual-task learning framework (hereinafter referred to as the SER network, Spectral Entropy Reconstruction Network). The reconstruction task provides structured auxiliary supervision signals to the shared encoder, forcing the encoder to actively model the frequency domain energy statistical distribution of the image. This allows it to learn a richer and more generalized frequency representation than simple classification supervision, achieving high-precision, strong-generalization detection under conditions of few samples.
[0013] The overall processing flow of this invention includes the following steps:
[0014] Step 1: Frequency Domain Feature Extraction
[0015] S1.1 Convert the input RGB image to the YCbCr color space to separate the luminance (Y) and chromaticity (Cb, Cr) information;
[0016] S1.2 Divide the Y, Cb, and Cr channels into non-overlapping image patches of a fixed size of 4×4.
[0017] S1.3 Perform a two-dimensional orthogonal transform on each image block to convert the spatial domain signal into a set of transform domain coefficients; the orthogonal transform refers to a linear transform in which the transform basis satisfies orthogonality and can losslessly map the spatial signal to the transform domain and reversibly reconstruct it. As a preferred embodiment, this step uses a two-dimensional discrete cosine transform (DCT) to obtain 16 frequency domain coefficients for each 4×4 image block.
[0018] S1.4 The coefficients at the same transform domain position in the three channels are arranged alternately in the order of Y, Cb, Cr, and the transform domain positions are stacked sequentially to obtain a transform domain feature map F with a channel dimension of 3×L (L is the number of transform coefficients in a single block; for DCT with 4×4 blocks, L=16, and the channel dimension is 48) and a spatial size of (H / B)×(W / B) (B is the block side length), which serves as the encoder input. This arrangement enables the model to simultaneously perceive the spatial distribution of different transform domain components and cross-channel correlations.
[0019] Note: The spectral entropy concept and dual-task reconstruction framework of this invention are not limited to DCT. Any transformation that satisfies orthogonality (see the "Optional Orthogonal Transformations" section below) can be used as an implementation of S1.3. DCT is the preferred embodiment of this invention due to its strong energy concentration, high computational efficiency, and compatibility with mainstream coding systems such as JPEG.
[0020] Step 2: Calculation of Spectral Entropy Map (Supervisory Labels for Reconstruction Task)
[0021] The input image is divided into blocks, and the spectral entropy map is calculated as the target (ground truth label) for the decoder reconstruction task. Specifically:
[0022] S2.1 For the k-th image block, its orthogonal transform coefficients (preferably DCT coefficients) are used. The energy at each transform domain location is calculated as shown in Equation (1), where (u,v) are the transform domain coordinates (u,v∈{0,1,2,3} for DCT and 4×4 block partitioning):
[0023] (1)
[0024] S2.2 The total energy of the block is calculated as the sum of all energies within the block, as shown in formula (2); to avoid division by zero, a safety total energy is introduced, as shown in formula (3) – when the total energy is 0 (for a flat block), take 1; otherwise, take its total energy:
[0025] (2)
[0026] (3)
[0027] S2.3 Calculate the normalized transform domain energy probability distribution, as shown in formula (4):
[0028] (4)
[0029] S2.4 Calculate the block-level spectral entropy based on Shannon entropy, as shown in formula (5), where ε is a minimal constant (e.g., 10⁻¹²) to ensure numerical stability:
[0030] (5)
[0031] S2.5 Calculate the spectral entropy for all local blocks in the entire image. The combination yields a "spectral entropy map". The spectral entropy map reflects the uniformity of frequency energy distribution in a local area: the lower the entropy value, the more concentrated the energy is in a few frequency components (corresponding to a smooth area), and the higher the entropy value, the more dispersed the energy is in multiple frequency components (corresponding to a complex texture area).
[0032] Step 3: Dual-task encoder-decoder network (SER network)
[0033] The SER network employs an encoder-decoder symmetric architecture, where encoder parameters are shared by the classification and reconstruction tasks.
[0034] The S3.1 encoder first maps the 48-channel input to a 64-dimensional feature space using 1×1 convolutions. Then, it extracts features through two sequential residual layers: the first residual layer contains three Bottleneck residual blocks, expanding the channels from 64 to 256; the second residual layer contains four residual blocks, further expanding to 512. Each residual block employs a bottleneck structure (1×1 dimensionality reduction → 3×3 spatial convolution → 1×1 dimensionality increase), with Dropout (p=0.1) applied after the first two convolutions. A CBAM attention module is embedded before the residual connections, where channel attention adaptively strengthens frequency components that contribute significantly to authenticity discrimination, and spatial attention guides the network to focus on local spectral anomalies.
[0035] S3.2 Classification Head (Main Task): Performs global average pooling on the 512-dimensional features output by the encoder, and maps them to a 2-dimensional output through Dropout (p=0.5) and a fully connected layer to complete the true / false binary classification.
[0036] S3.3 Decoder (Auxiliary Task): Receives the 512-channel features output from the encoder. Using a structure symmetrical to the encoder, it progressively compresses the channels from 512 to 256 and then to 64, finally mapping them through a 1×1 convolution to a 3-channel output, corresponding to the spectral entropy reconstruction results of the Y, Cb, and Cr channels respectively. Each residual block of the decoder also integrates a CBAM module.
[0037] Step 4: Dual-Task Joint Loss Training
[0038] The training is performed using a joint loss calculated by weighting the classification loss and the spectral entropy reconstruction loss, as shown in Equation (6):
[0039] (6)
[0040] The classification loss L_cls is the cross-entropy loss, as shown in formula (7) (M is the batch size, and y and ŷ are the true and predicted probabilities of the true and false labels, respectively):
[0041] (7)
[0042] The reconstruction loss L_rec is the mean square error (MSE) between the reconstructed spectral entropy map and the true spectral entropy map, as shown in Equation (8) (K is the total number of image patches):
[0043] (8)
[0044] Preferably, the weights are configured as λ_cls=0.9 and λ_rec=0.1.
[0045] Step 5: Interpretability Quantization Based on Grad-CAM Activation Matrix
[0046] To provide a quantifiable interpretation of the model's decisions, two complementary metrics are calculated for the Grad-CAM class activation map M (flattened into a vector m of length N):
[0047] S5.1 Gradient Entropy Index: First, normalize m to a spatial probability distribution, as shown in formula (9), and then calculate the gradient entropy according to formula (10). This index measures the degree of concentration of the activation distribution. The lower the entropy value, the more concentrated the activation and the clearer the discrimination criteria.
[0048] (9)
[0049] (10)
[0050] S5.2 The gradient variance index, as shown in formula (11), measures the dispersion of activation intensity:
[0051] (11)
[0052] S5.3 The above two indicators are used to statistically analyze the distribution of real images and generated images respectively. The two images show consistent statistical patterns under cross-generative model conditions (real images have high entropy values, narrow bandwidth, and low variance; fake images have generally low entropy values, wider distribution range, and larger variance), thus transforming the visual observation of heatmaps into statistically verifiable criteria.
[0053] Optional Orthogonal Transformation Description
[0054] The orthogonal transformation in step one (S1.3) can be implemented by various linear transformations that satisfy orthogonality. Several optional implementation methods and their adaptation descriptions are listed below, all of which can be used in conjunction with the spectrum entropy calculation and dual-task reconstruction framework of this invention:
[0055] (1) Discrete Cosine Transform (DCT, preferred): It has strong energy concentration characteristics, high information density of low frequency components, and is sensitive to frequency domain artifacts introduced by upsampling of the generative model; the energy probability distribution and block-level Shannon entropy are directly calculated according to S1~S2.
[0056] (2) Discrete Fourier Transform / Fast Fourier Transform (DFT / FFT): The transform coefficients are complex numbers. The square of the amplitude spectrum is taken as the energy at each frequency position, as shown in formula (12). Then, normalize according to formulas (2) to (5) and calculate the Shannon entropy. The entropy map can be constructed simultaneously or separately using the amplitude spectrum and the phase spectrum.
[0057] (12)
[0058] (3) Discrete wavelet transform (DWT): The image patch is decomposed into low-frequency and high-frequency sub-bands of different scales. The Shannon entropy is calculated after normalizing the energy distribution of each sub-band coefficient and the energy of the sub-band is used to obtain the spectral entropy map that reflects the multi-scale frequency structure.
[0059] (4) Hadamard / Walsh-Hadamard: The transformation basis is a ±1 orthogonal matrix, which has low computational cost and no multiplication operation, making it suitable for resource-constrained scenarios; the Shannon entropy is calculated using the square of the coefficients in the sequence domain as energy.
[0060] (5) Slant Transform (ST): The slant transform is a real orthogonal transform. Its transform basis has an approximately linear slope change characteristic, which can better match local areas in the image where the gray level changes slowly or linearly. It has the characteristics of simple calculation and strong energy compression capability.
[0061] Each of the above transformations can map image blocks to orthogonal transform domains and provide coefficient distributions with computable energy. Therefore, they can all serve as the carriers of the core idea of this invention: "block-level energy probability distribution → Shannon entropy → entropy map reconstruction". This invention does not limit the scope of the transformations; DCT is a preferred embodiment.
[0062] Compared with related technologies, the automatic authenticity detection method and system for artificial intelligence-generated images provided by this invention have the following advantages:
[0063] 1. High detection accuracy with few samples. Only about 200 training samples per class (about 1% of the training data) are needed to achieve a classification accuracy of over 97% on the GAN test set and about 96% on the diffusion model test set. Most comparative methods still cannot reach this level when using 100% training data.
[0064] 2. Strong generalization ability across generative models. It performs stably under both adversarial generation (GAN) and diffusion denoising paradigms, achieving an accuracy of over 95% on seven diffusion models, indicating that the learned frequency domain statistical features reflect the common artifact patterns of different generation mechanisms.
[0065] 3. Strong cross-semantic generalization ability. On the cross-semantic benchmark CSAIID, it achieves an average accuracy of approximately 97.84% with only 1% of the training data and approximately 99.06% with the full dataset, significantly outperforming existing comparative methods.
[0066] 4. Enhanced feature learning ability. Spectral entropy reconstruction, as a regularization auxiliary task, significantly improves classification performance; ablation experiments show that removing the reconstruction branch degenerates into a single task, resulting in a decrease in accuracy of approximately 1.13% and an AP decrease of approximately 0.51%.
[0067] 5. The decision-making process can be quantitatively explained. Gradient entropy and gradient variance indices transform the qualitative observations of heatmaps into statistically significant and reproducible quantitative criteria. True and false images exhibit consistent statistical patterns across generative models on these indices.
[0068] 6. Stable and reproducible performance. Under 5 different random seeds, the accuracy is stable at 95.71% to 97.22% (mean 96.34% ± 0.50%), and the AUC is stable at 99.23% to 99.58% (mean 99.36% ± 0.12%), and it is not sensitive to random initialization. Attached Figure Description
[0069] Figure 1 This is an overall flowchart of the deepfake image detection method provided by the present invention;
[0070] Figure 2 This is a schematic diagram of the structure of the SER network (encoder-decoder dual-task architecture) provided by the present invention;
[0071] Figure 3 A schematic diagram illustrating the calculation process of the spectral entropy map provided by this invention;
[0072] Figure 4 Grad-CAM heatmaps of real and fake images provided for this invention;
[0073] Figure 5 A comparison chart of gradient entropy / gradient variance distributions provided by this invention. Detailed Implementation
[0074] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0075] Example 1: Dataset and Experiment Configuration
[0076] The training data uses the ForenSynths dataset, covering four semantic categories: cars, cats, chairs, and horses. Each category contains 18,000 fake images generated by ProGAN and an equal number of real images sampled from LSUN. Testing was conducted on three benchmarks: ForenSynths (including 7 GANs and Deepfake), GenImage (including 7 diffusion models and 1 GAN), and CSAIID (cross-semantic, including 6 semantic images generated by SDv2, LDM, and LCM).
[0077] Training was performed on an NVIDIA GeForce RTX 4090D GPU using the Adam optimizer, with an initial learning rate of 1×10⁻³ and weight decay of 1×10⁻. 4 The training run lasted 50 epochs with a batch size of 32. The classification loss and reconstruction loss weights were 0.9 and 0.1, respectively. Images were randomly cropped to 224×224 pixels during training and centered to 256×256 pixels during testing. Smaller images were filled with reflections. The main hyperparameter configurations are shown in Table 1.
[0078] Optimizer Adam Initial learning rate 1×10⁻³ Weight decay <![CDATA[1×10⁻ 4 ]]> Dropout Encoder / decoder = 0.1, Classifier = 0.5 Regularization methods Weight decay + Dropout Loss weights Classification = 0.9, Reconstruction = 0.1 Normalization mean=[0.5,0.5,0.5], std=[0.5,0.5,0.5] Number of training epochs / batch size 50 / 32
[0079] Table 1
[0080] Example 2: Cross-GAN Generalization (ForenSynths Test Set)
[0081] Table 2 shows the average accuracy (Acc) and average precision (AP) of this method on the 8-class generator of the ForenSynths test set under different training data scales.
[0082] 1% 97.22 99.58 4% 95.83 99.25 20% 96.18 99.48 50% 96.50 99.53 100% 96.53 99.46
[0083] Table 2
[0084] It is evident that using only 1% of the training data, an average Acc of 97.22% and an AP of 99.58% were achieved, which is superior to most comparative methods that use the full dataset.
[0085] Example 3: Generalization of the cross-diffusion model (GenImage test set)
[0086] The results of training ForenSynths' ProGAN on four types of data and testing on eight generative models of GenImage are shown in Table 3:
[0087] 1% 95.81 98.99 4% 94.11 98.80 20% 96.79 99.74 50% 96.34 99.32 100% 96.94 99.64
[0088] Table 3
[0089] This method achieves an average Acc of 96.94% and an AP of 99.64% with the full dataset, which is about 1.34 percentage points higher than the comparative method SAFE. Even with only 1% of the data, the average Acc still reaches 95.81%, and it achieves an accuracy of over 95% on all 7 diffusion models.
[0090] Example 4: Loss Weight Ablation (1% of Training Data)
[0091] The classification loss weights α (reconstructed weights are 1−α) are traversed in the range [0,1] with a step size of 0.1. The results are shown in Table 4.
[0092] 1c+0r 96.61 96.65 99.46 0.9c + 0.1r (preferred) 97.22 97.21 99.58 0.7c+0.3r 97.09 97.12 99.53 0.5c+0.5r 96.48 96.54 99.32 0c+1r 73.65 76.08 50.00
[0093] Table 4
[0094] The results show that when only classification loss (1c+0r) is used, Acc is 96.61%, which increases to 97.22% after introducing a small amount of reconstruction weight (0.9c+0.1r); when only reconstruction loss (0c+1r) is used, it can still reach 73.65%, proving that the spectral entropy feature itself has considerable discriminative power. The optimal configuration is α=0.9.
[0095] Example 5: DCT block-size ablation (1% of training data)
[0096] The effects of different DCT block sizes were examined, as shown in Table 5:
[0097] 4×4 (preferred) 97.22 99.58 8×8 96.23 98.01 16×16 84.94 89.28 32×32 73.25 85.22
[0098] Table 5
[0099] As the patch size increases from 4×4 to 32×32, the model performance monotonically decreases (Acc drops from 97.22% to 73.25%). This is because the larger the patch size, the more globally uniform the frequency energy distribution described by a single entropy value becomes, and the local entropy difference between real and fake images is smoothly eliminated. Therefore, this invention preferably uses 4×4 as the standard block configuration.
[0100] Example 6: Quantitative Verification of Interpretability
[0101] Visualizing the feature responses of the last layer of the encoder using Grad-CAM reveals that activation is generally low and dispersed when processing real images; however, activation intensity significantly increases and becomes clustered when processing fake images, concentrating on object contours, texture transitions, and smooth backgrounds. This clustering pattern is consistent across GAN-generated and diffusion-generated images. Further statistical analysis of gradient entropy and gradient variance reveals that real sample entropy values are distributed in a high range with extremely narrow bandwidth and low variance; fake sample entropy values shift towards lower values with a wider distribution range and larger variance. This statistically validates that spectral entropy reconstruction can guide the model to extract more discriminative frequency domain features.
[0102] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. An automatic method for detecting the authenticity of images generated by artificial intelligence, characterized in that, Includes the following steps: S1: Frequency domain feature extraction; S2: Spectral entropy map calculation: Spectral entropy map is calculated for each block of the input image, serving as the target for the decoder reconstruction task; S3: Dual-task encoder-decoder network (SER network). The SER network adopts an encoder-decoder symmetric architecture, and the encoder parameters are shared by the classification and reconstruction tasks. S4: Dual-task joint loss training; S5: Based on the interpretability quantification of the Grad-CAM activation matrix, the model decision is quantifiable and interpretable, and two complementary indices are calculated for the Grad-CAM class activation graph M.
2. The method for automatic authenticity detection of images generated based on artificial intelligence according to claim 1, characterized in that: Step S1 includes the following steps: S1.1: Convert the input RGB image to the YCbCr color space to separate the luminance (Y) and chrominance (Cb, Cr) information; S1.2: Divide the Y, Cb, and Cr channels into non-overlapping image patches of a fixed size of 4×4. S1.3: Perform a two-dimensional orthogonal transform on each image block to convert the spatial domain signal into a set of transform domain coefficients; the orthogonal transform refers to a linear transform in which the transform basis satisfies orthogonality, can losslessly map the spatial signal to the transform domain and reversibly reconstruct it, and a two-dimensional discrete cosine transform (DCT) is used to obtain 16 frequency domain coefficients for each 4×4 image block; S1.4 The coefficients in the same transform domain position in the three channels are arranged alternately in the order of Y, Cb, Cr, and the transform domain positions are stacked in sequence to obtain a channel dimension of 3×L, where L is the number of transform coefficients in a single block. When DCT is divided into 4×4 blocks, L=16, the channel dimension is 48, the spatial size is (H / B)×(W / B), and B is the transform domain feature map F of the block side length, which is used as the encoder input. This arrangement enables the model to simultaneously perceive the spatial distribution of different transform domain components and cross-channel correlation.
3. The method for automatic authenticity detection of images generated based on artificial intelligence according to claim 1, characterized in that: Step S2 includes the following steps: S2.1: For the k-th image patch, its orthogonal transform coefficients (DCT coefficients) are used. The energy at each transform domain location is calculated as shown in formula (1): (1) Where (u,v) are the transform domain coordinates (u,v∈{0,1,2,3} when DCT is used and the blocks are divided into 4×4). S2.2: The total energy of the block is the sum of all the energies within the block, as shown in formula (2): (2) To avoid division by zero, a safety total energy is introduced, as shown in formula (3): (3) Take 1 when the total energy is 0 (for a flat block); otherwise, take its total energy. S2.3: Calculate the normalized transform domain energy probability distribution, as shown in formula (4): (4) S2.4: Calculate the block-level spectral entropy based on Shannon entropy, as shown in formula (5): (5) Where ε is a minimal constant to ensure numerical stability; S2.5: Calculate the spectral entropy for all local blocks in the entire image. The combination yields the "spectral entropy map"; the spectral entropy map reflects the uniformity of frequency energy distribution in a local area: the lower the entropy value, the more concentrated the energy is in a few frequency components, and the higher the entropy value, the more dispersed the energy is in multiple frequency components.
4. The method for automatic authenticity detection of images generated based on artificial intelligence according to claim 1, characterized in that: Step S3 includes the following steps: S3.1: Encoder: First, a 1×1 convolution maps the 48-channel input to a 64-dimensional feature space; then, two sequential residual layers are used for feature extraction—the first residual layer contains 3 Bottleneck residual blocks, expanding the channels from 64 to 256; the second residual layer contains 4 residual blocks, further expanding to 512; each residual block adopts a bottleneck structure, 1×1 dimensionality reduction → 3×3 spatial convolution → 1×1 dimensionality increase, with Dropout (p=0.1) applied after the first two convolutions; a CBAM attention module is embedded before the residual connection, whose channel attention adaptively strengthens the frequency components that contribute highly to the true / false discrimination, and spatial attention guides the network to focus on local spectral anomaly regions; S3.2: Classification Head: The 512-dimensional features output by the encoder are globally averaged and pooled, then mapped to a 2-dimensional output via Dropout (p=0.5) and a fully connected layer to complete the true / false binary classification; S3.3: Decoder: Receives the 512-channel features output by the encoder, adopts a structure symmetrical to the encoder, and gradually compresses the channels from 512 to 256 and then to 64. Finally, it is mapped to a 3-channel output through 1×1 convolution, which corresponds to the spectral entropy reconstruction results of the Y, Cb and Cr channels respectively. Each residual block of the decoder also integrates the CBAM module.
5. The method for automatic authenticity detection of images generated based on artificial intelligence according to claim 1, characterized in that: Step S4 includes the following steps: The training is performed using a joint loss calculated by weighting the classification loss and the spectral entropy reconstruction loss, as shown in Equation (6): (6) Where the classification loss L_cls is the cross-entropy loss, as shown in formula (7): (7) M is the batch size, and y and ŷ are the true value and predicted probability of the true and false labels, respectively. The reconstruction loss L_rec is the mean square error (MSE) between the reconstructed spectral entropy map and the true spectral entropy map, as shown in Equation (8): (8) K is the total number of image patches.
6. The method for automatic authenticity detection of images generated based on artificial intelligence according to claim 5, characterized in that: The weights are configured as λ_cls=0.9 and λ_rec=0.
1.
7. The method for automatic authenticity detection of images generated based on artificial intelligence according to claim 1, characterized in that: Step S5 includes the following steps: S5.1: Gradient entropy index: First, normalize m to a spatial probability distribution, as shown in formula (9). (9) Then calculate the gradient entropy using formula (10): (10) This indicator measures the degree of concentration of activation distribution; the lower the entropy value, the more concentrated the activation and the clearer the judgment criteria. S5.2: The gradient variance index, as shown in formula (11), measures the dispersion of activation intensity. (11) S5.3: Using the above two indicators, the distribution of real images and generated images is statistically analyzed. The two images show consistent statistical patterns under cross-generative model conditions, thus transforming the visual observation of heatmaps into statistically verifiable criteria.
8. The method for automatic authenticity detection of images generated based on artificial intelligence according to claim 2, characterized in that: The orthogonal transformation in step one (S1.3) can be implemented by a variety of linear transformations that satisfy orthogonality, including: Discrete Cosine Transform (DCT), Discrete Fourier Transform / Fast Fourier Transform (DFT / FFT), Discrete Wavelet Transform (DWT), Hadamard / Walsh-Hadamard, and Slant Transform (ST).
9. A detection system, apparatus, computer equipment, and computer-readable storage medium for implementing the automatic detection method for the authenticity of images generated based on artificial intelligence as described in any one of claims 1 to 8.
