Abstract: Currently, image generation and synthesis have remarkably progressed with generative models. Despite photo-realistic results, intrinsic discrepancies are still observed in the frequency domain. The spectral discrepancy appeared not only in generative adversarial networks but in diffusion models. In this study, we propose a framework to effectively mitigate the disparity in frequency domain of the generated images to improve generative performance of both GAN and diffusion models. This is realized by spectrum translation for the refinement of image generation (STIG) based on contrastive learning. We adopt theoretical logic of frequency components in various generative networks. The key idea, here, is to refine the spectrum of the generated image via the concept of image-to-image translation and contrastive learning in terms of digital signal processing. We evaluate our framework across eight fake image datasets and various cutting-edge models to demonstrate the effectiveness of STIG. Our framework outperforms other cutting-edges showing significant decreases in FID and log frequency distance of spectrum. We further emphasize that STIG improves image quality by decreasing the spectral anomaly. Additionally, validation results present that the frequency-based deepfake detector confuses more in the case where fake spectrums are manipulated by STIG.
The Spectral Discrepancy Problem
While modern AI can generate stunningly realistic faces and landscapes, these images often contain hidden structural flaws in the frequency domain. These "spectral fingerprints" serve as a reliable way to distinguish synthetic images from real ones.
- Generative Adversarial Networks (GANs): These models typically use upsampling layers that create "aliasing" or checkerboard artifacts. In a Fourier transform, these appear as bright, grid-like dots.
- Diffusion Models (DMs): Despite their high spatial quality, DMs often suffer from an "inductive bias" where they fail to generate sufficient high-frequency components, leading to a lack of fine-grained texture.
Methodology: Spectrum Translation (STIG)
The proposed STIG framework treats the magnitude spectrum of a generated image as a 2D image that can be "retouched" using image-to-image translation techniques.
- Contrastive Learning: STIG employs a Patch-Wise Noise Contrastive Estimation (NCE) framework. This forces the model to identify and map "abnormal" spectral patches (aliased or blurry) to their "clean" counterparts without destroying the underlying image content.
- Chessboard Integration: A novel spectral discriminator uses "chessboard distance" (Chebyshev distance) to specifically target the grid-based aliasing patterns common in GAN architectures.
- Phase Preservation: By manipulating only the magnitude spectrum and retaining the original phase information, the model preserves the spatial arrangement (the "where") of the pixels while only refining the frequency energy (the "how much").
- Reconstruction: The final refined image is reconstructed via an Inverse Discrete Fourier Transform (IDFT) combining the repaired magnitude with the original phase.
Experimental Results
The researchers evaluated STIG across eight diverse datasets, including human faces (FFHQ, CelebA), animals (AFHQ), and architectural scenes (LSUN Church), generated by models such as CycleGAN, StarGAN2, DDPM, and DDIM.
Quantitative and Qualitative Improvements
STIG consistently outperformed existing state-of-the-art methods like SpectralGAN and FFL.
- GAN Refinement: On StarGAN, STIG reduced the Fréchet Inception Distance (FID) from 192.48 to 6.30.
- Diffusion Refinement: On DDPM-Face, STIG cut the FID nearly in half (from 43.54 to 21.91), successfully filling in missing high-frequency textures.
Evading Detection
Perhaps the most significant result is STIG's impact on forensic tools. Frequency-based deepfake detectors (both CNN and ViT-based) that previously achieved near 99% accuracy in identifying synthetic images saw their performance plummet to ~50-57%—essentially random guessing—after STIG was applied.
Conclusion
STIG demonstrates that treating frequency refinement as a translation problem is a highly effective post-processing strategy for improving generative models. By bridging the gap between digital signal processing and deep learning, STIG not only enhances visual realism but also highlights the ongoing "arms race" in deepfake generation and detection. Future work may explore refining the phase spectrum to further minimize synthetic discrepancies.
Summary updated