Source-linked AI summary
Frequency-Domain AI-Generated Image Detection: Exploring Decoder and Channel Attention for Feature Refinement
Uday Shankar Roy, Mahbuba Jahan Minu
TL;DR
Reliable detection is challenged by increasingly realistic AI-generated images and by information that direct encoder-to-classifier pipelines may lose. This paper evaluates EfficientNet-B0 with frequency-domain feature refinement, finding the best overall results with Attention U-Net.
Problem
Realistic AI-generated images challenge reliable detection, and direct encoder-to-classifier pipelines may discard multi-scale frequency information.
Source: §I · p. 1Method
The paper evaluates EfficientNet-B0 on frequency representations with ECA, U-Net, and Attention U-Net as feature-refinement alternatives.
Source: §I · p. 2, C. Baseline Architecture… · p. 3, §V · p. 5Results
85.51% accuracy and 92.99% ROC-AUC: Attention U-Net achieved the best overall reported performance, improving accuracy by 0.87 percentage points over EfficientNet-B0.
Source: §V · p. 5Takeaways & Limitations
Decoder-based feature refinement, particularly Attention U-Net, improves the reported frequency-domain detection results, while ECA does not improve the baseline.
Source: §V · p. 5The Attention U-Net improvement over EfficientNet-B0 was relatively small; further experiments across datasets and more generation models, and statistical significance testing, are suggested.
Source: §V · p. 6
Abstract
from arXiv · showhide
With the rapid progress of AI, the number of AI-generated images has increased significantly in recent years. However, the increasing variety of image generation models makes detection more difficult. In this work, we use Fast Fourier Transform (FFT) representation with EfficientNet-B0 for AI-generated image detection. EfficientNet-B0 provides a lightweight architecture that can be useful for resource-limited applications. Most frequency-domain detectors use a standard encoder to extract features from the FFT spectrum and directly pass them to a classifier. We explored a different approach by investigating ECA, U-Net, and Attention U-Net as alternatives to this direct encoder-to-classifier approach. ECA applies channel attention, while U-Net and Attention U-Net use decoder-based architectures to recover and refine spatial information in the extracted frequency features. We used a balanced subset of the MS COCOAI dataset that includes AI-generated images from five different models. Three runs were carried out for each experiment, and the average values were recorded. Experimental results indicate that EfficientNet-B0 obtained an accuracy of 84.64%, which is 4.50 percentage points higher than the ResNet-50 baseline reported in the dataset paper. EfficientNet-B0 with U-Net provided a small improvement, achieving an accuracy of 84.85%, while ECA did not increase the overall performance. EfficientNet-B0 with Attention U-Net achieved the best overall performance, with an accuracy of 85.51% and an ROC-AUC of 92.99%. This represents an improvement of 0.87 percentage points in accuracy compared to the EfficientNet-B0 baseline and 5.37 percentage points over the ResNet-50 baseline reported in the dataset paper.
I. INTRODUCTION
The paper investigates whether channel attention and decoder-based feature refinement can improve frequency-domain AI-generated image detection. Attention U-Net achieves the strongest reported result, while the motivation is to retain multi-scale frequency information that direct encoder-to-classifier pipelines may lose.
I. INTRODUCTION
- Frequency-domain detection uses Fourier-spectrum differences between real photographs and AI-generated images, which may persist even when generated images look realistic.Generative-model upsampling can leave subtle spectral patterns not typically found in real photographs.Source: §I · p. 1
- Direct encoder-to-classifier pipelines may lose multi-scale spatial information when encoder features are reduced to a single average before classification.Earlier encoder layers preserve more local detail, while deeper layers learn more complex features.Source: §I · p. 1
- The study tests ECA, U-Net, and Attention U-Net as alternatives for refining EfficientNet-B0 frequency features before classification.U-Net-style decoders recover earlier encoder features through skip connections; Attention U-Net adds spatial and channel attention in the decoder.Source: §I · pp. 1–2
- ECA did not improve the EfficientNet-B0 baseline, while U-Net provided a small improvement.Experiments used a balanced subset of MS COCOAI and reported averages across three random seeds.Source: §I · p. 2
- 85.51% accuracy: Attention U-Net achieved the best overall performance among the tested architectures, improving 0.87 percentage points over EfficientNet-B0.EfficientNet-B0 achieved 84.64% accuracy, 4.50 percentage points above the ResNet-50 baseline reported in the dataset paper.Source: §I · p. 2
II. RELATED WORK
Prior work identifies Fourier-spectrum artifacts as signals for detecting generated images, but their presence can vary across generators and methods. This paper situates decoder-based multi-scale frequency refinement among approaches that combine or model image-frequency information.
II. RELATED WORK
- Dzanic et al. and Frank et al. found that generated-image Fourier spectra differ from real photographs, while Durall et al. linked patterns to transposed-convolution upsampling.The cited work relates these patterns to departures from the natural 1/f spectral falloff.Source: §II · p. 2
- Frequency artifacts are not universal: small GAN upsampling changes can remove them, and tests across eight architectures reported the same vulnerability.Prior work also explored combining spatial and frequency information; two-stream, wavelet-RGB, and dual-branch approaches reported gains over individual streams.Source: §II · p. 2
- Recent methods model real-image frequency characteristics or use reconstruction gaps, including SPAI, FIRE, and FRADet.SPAI reported generalization across 13 generative models; FIRE used mid-frequency reconstruction gaps, and FRADet reported a 3.98% accuracy improvement on GenImage.Source: §II · p. 2
- Most frequency pipelines pass encoder output directly to pooling, and full U-Net decoders as multi-scale frequency refiners within classification were not widely explored.The paper investigates whether decoder-based feature recovery before classification can improve detection.Source: §II · p. 2
- EfficientNet is used as a lightweight encoder in frequency pipelines, while ECA offers channel attention and U-Net skip connections combine features from multiple encoder depths.These prior design elements provide context for testing attention and decoder-based refinement together with frequency-domain classification.Source: §II · p. 2
III. METHODOLOGY
The methodology converts images into frequency-domain representations and evaluates EfficientNet-B0 with channel-attention and decoder-based variants. The experimental pipeline is presented as an overview figure.
III. METHODOLOGY
- The experimental pipeline begins with a balanced MS COCOAI subset, converts images to frequency-domain representations, and trains EfficientNet-B0 as the baseline.The passage identifies Fig. 1 as the overview of the proposed work.Source: §III · p. 2, Figure 1 · p. 2
- The method compares feature refinement approaches against an EfficientNet-B0 baseline.The overview states that the baseline is trained before the additional architectures are explored.Source: §III · p. 2
- ECA, U-Net, and Attention U-Net are explored as alternatives for detecting AI-generated images.The variants test channel attention and decoder-based feature refinement.Source: §III · p. 2
A. Dataset
The experiments use a balanced 32K-image subset of MS COCOAI and represent images through normalized FFT spectra. The frequency representation is prepared from grayscale inputs and replicated across three channels for EfficientNet-B0.
A. Dataset
- 32K images: the balanced subset contains 16K real and 16K AI-generated images selected from MS COCOAI, with generated images drawn from five models.All images were resized to 224 × 224 pixels; the real images came from MS COCO and generated images were created from their captions.Source: A. Dataset · p. 3, Figure 2 · p. 3
B. Frequency-Domain Representation
- The frequency representation starts by converting RGB images to grayscale, then applying a two-dimensional FFT and shifting the spectrum to center the zero-frequency component.The shifted magnitude spectrum is converted to a logarithmic scale to compress its dynamic range.Source: B. Frequency-Domain Representation · p. 3
- The magnitude spectrum is min-max normalized to [0, 1] and replicated across three channels for EfficientNet-B0 input.Source: B. Frequency-Domain Representation · p. 3
C. Baseline Architecture (EfficientNet-B0)
EfficientNet-B0 is the lightweight baseline architecture for frequency-domain image detection, with pooled features passed through a fully connected classification head.
C. Baseline Architecture (EfficientNet-B0)
- EfficientNet-B0 serves as the baseline architecture for frequency-domain image detection.It uses pre-trained ImageNet weights and is described as lightweight with low computational cost.Source: C. Baseline Architecture… · p. 3
- Adaptive average pooling and flattening convert the final feature maps into inputs for a 256-unit fully connected layer.A SiLU activation and 0.5 dropout precede the final binary-output layer.Source: C. Baseline Architecture… · p. 3
- The model’s lightweight design is intended to suit resource-limited devices, including edge devices.Source: C. Baseline Architecture… · p. 3
D. Architectural Variants (ECA, U-Net, Attention U-Net)
The study tests channel attention and decoder-based refinement as alternatives to directly classifying EfficientNet-B0 frequency features. The variants apply channel weighting or recover and refine spatial features before classification.
D. Architectural Variants (ECA, U-Net, Attention U-Net)
- The variants test whether extracted frequency features can be improved before classification, rather than directly converting them into a compact representation.The Attention U-Net classifier architecture is illustrated in Fig. 3.Source: D. Architectural Variants (ECA, U-Net,… · p. 3, Attention U-Net · p. 3, Figure 3 · p. 4
- ECA applies channel attention after EfficientNet-B0 and before pooling, using channel summaries to calculate weights for the feature maps.A kernel-size-3 1D convolution and sigmoid produce the weights.Source: D. Architectural Variants (ECA, U-Net,… · p. 3
- U-Net’s decoder upsamples frequency features and combines them with matching encoder-stage features through skip connections before classification.The decoder outputs a 128-channel feature map for adaptive average pooling.Source: U-Net · p. 3
- Attention U-Net integrates SCSE attention into decoder stages to emphasize informative frequency features across spatial and channel dimensions.Its decoder produces a 128-channel feature map that is pooled before entering the classification head.Source: Attention U-Net · p. 3
E. Evaluation Metrics
Models are evaluated using five classification metrics after converting output scores to probabilities and applying a 0.5 decision threshold. Results are averaged across three random seeds.
E. Evaluation Metrics
- The output score is converted to a probability with sigmoid, then a 0.5 threshold assigns each test image to the real or AI-generated class.Source: E. Evaluation Metrics · p. 4
- Accuracy measures the proportion of test images assigned the correct class label.Source: E. Evaluation Metrics · p. 4
- Precision measures how many images predicted as AI-generated are actually AI-generated, while Recall measures the proportion of AI-generated images detected.Source: E. Evaluation Metrics · p. 4
- F1-Score combines Precision and Recall using their harmonic mean, while ROC-AUC measures separation across classification thresholds.Source: E. Evaluation Metrics · p. 4
- Reported results are averaged across random seeds 9, 99, and 999.Source: E. Evaluation Metrics · p. 4
F. Implementation
The implementation evaluates EfficientNet-B0 over three fixed-seed runs and reports an average accuracy of 84.64%, exceeding the dataset paper’s ResNet-50 accuracy by 4.50 percentage points.
F. Implementation
- The experiments used an 80/10/10 stratified train-validation-test split, with batch sizes of 32 for EfficientNet-B0 and ECA and 16 for U-Net variants.Training used PyTorch on Google Colab with a T4 GPU; all layers were unfrozen.Source: F. Implementation · p. 4
- Each architecture’s result was averaged across three fixed random seeds: 9, 99, and 999.PyTorch and NumPy were seeded, and deterministic CUDA settings were enabled.Source: F. Implementation · p. 4, §IV · p. 4
- Models used AdamW with 1 × 10^-4 weight decay and BCEWithLogitsLoss, with training capped at 20 epochs and early stopping after five unimproved validation-loss epochs.ReduceLROnPlateau halved the learning rate after two consecutive epochs without validation-loss improvement; the lowest-validation-loss model was tested.Source: F. Implementation · p. 4
A. Performance with EfficientNet-B0 (Baseline)
- 84.64% accuracy was achieved by EfficientNet-B0, 4.50 percentage points above the dataset paper’s ResNet-50 result of 80.14%.Results were averaged across three seeds; Table I is titled as the per-seed results for FFT + EfficientNet-B0.Source: A. Performance with EfficientNet-B0… · p. 4, Table I · p. 4
- EfficientNet-B0 is described as substantially lighter than ResNet-50, supporting its usability for lightweight applications.Source: A. Performance with EfficientNet-B0… · p. 4
B. Performance with ECA
The experiments compare ECA and U-Net decoder refinement on EfficientNet-B0 frequency features. U-Net slightly improves accuracy and ROC-AUC, whereas ECA does not improve overall performance.
B. Performance with ECA
- 84.54% average accuracy with ECA was slightly below the 84.64% baseline, and ECA also lagged in Recall, F1-score, and ROC-AUC.Precision increased from 84.57% to 85.98%, but ECA did not improve overall performance.Source: B. Performance with ECA · p. 5
C. Performance with U-Net Decoder
- 84.85% accuracy and 92.77% ROC-AUC were achieved by U-Net, versus 84.64% and 92.46% for the EfficientNet-B0 baseline.Precision rose to 87.57%, but Recall and F1-score were lower than baseline, so gains did not extend to every metric.Source: C. Performance with U-Net Decoder · p. 5
D. Performance with Attention U-Net Decoder
Attention U-Net led the tested architectures in overall comparison, while the per-seed results are reported separately. Its accuracy, ROC-AUC, Precision, and F1-score exceeded the EfficientNet-B0 baseline values reported for those metrics.
D. Performance with Attention U-Net Decoder
- 85.51% accuracy was 0.87 percentage points above EfficientNet-B0 and 5.37 points above the ResNet-50 baseline reported in the dataset paper.Attention U-Net's ROC-AUC was 92.99%, compared with 92.46% for EfficientNet-B0.Source: D. Performance with Attention U-Net… · p. 5, Table IV · p. 5
E. Overall Comparison
- 85.51% accuracy and 92.99% ROC-AUC were the highest among tested architectures in the overall comparison.Attention U-Net also had the highest Precision and F1-score.Source: Table V · p. 5, E. Overall Comparison · p. 5
V. CONCLUSION
The conclusion reports that decoder-based refinement, especially Attention U-Net, improves frequency-domain detection in the tested comparisons, while ECA does not improve the EfficientNet-B0 baseline. The authors note the Attention U-Net gain is small and call for broader evaluation and statistical testing.
V. CONCLUSION
- The study used EfficientNet-B0 as a lightweight frequency-domain baseline and tested ECA, U-Net, and Attention U-Net for feature refinement before classification.The lightweight architecture was selected for its potential deployment capability in resource-limited applications.Source: §V · p. 5
- 85.51% accuracy, 85.03% F1-score, and 92.99% ROC-AUC made Attention U-Net the best tested architecture; its accuracy gain was 0.87 points over EfficientNet-B0 and 5.37 over ResNet-50.U-Net raised accuracy from 84.64% to 84.85% and ROC-AUC from 92.46% to 92.77%, while ECA did not improve overall performance.Source: §V · p. 5
- The authors describe the Attention U-Net improvement over baseline as relatively small and recommend broader datasets and generator coverage plus statistical significance testing.They also propose investigating combinations of frequency- and spatial-domain information.Source: §V · p. 6