Abstract
The popular VQ-VAE models reconstruct images through learning a discrete codebook but suffer from a significant issue in the rapid quality degradation of image reconstruction as the compression rate rises. One major reason is that a higher compression rate induces more loss of visual signals on the higher frequency spectrum which reflect the details on pixel space. In this paper, a Frequency Complement Module (FCM) architecture is proposed to capture the missing frequency information for enhancing reconstruction quality. The FCM can be easily incorporated into the VQ-VAE structure, and we refer to the new model as Frequency Augmented VAE (FA-VAE). In addition, a Dynamic Spectrum Loss (DSL) is introduced to guide the FCMs to balance between various frequencies dynamically for optimal reconstruction. FA-VAE is further extended to the text-to-image synthesis task, and a Cross-attention Autoregressive Transformer (CAT) is proposed to obtain more precise semantic attributes in texts. Extensive reconstruction experiments with different compression rates are conducted on several benchmark datasets, and the results demonstrate that the proposed FA-VAE is able to restore more faithfully the details compared to SOTA methods. CAT also shows improved generation quality with better image-text semantic alignment.
Introduction
Vector Quantized-Variational Autoencoders (VQ-VAEs) serve as the backbone for many state-of-the-art generative models. Despite their success, they exhibit a notable flaw: reconstruction quality plummets as compression rates increase. This degradation is primarily characterized by the loss of fine-grained details such as hair textures, sharp edges, and subtle facial contours.
The authors identify two main culprits for this performance drop. First, Spectral Bias causes neural networks to naturally favor learning low-frequency information (broad shapes and colors) over high-frequency details. Second, Information Loss at the Bottleneck occurs during compression when the encoder discards high-frequency signals that the decoder subsequently struggles to recover. While existing solutions focus on pixel-wise or perceptual losses, they rarely address misalignment in the frequency domain directly.
Methodology
The proposed FA-VAE framework introduces three novel components to the standard VQ-VAE pipeline to bridge the gap between pixel-space reconstruction and frequency-domain fidelity.
Frequency Complement Module (FCM)
The Frequency Complement Modules are lightweight components embedded within the decoder. They tap into feature maps from the encoder—which still contain rich high-frequency data before the quantization bottleneck—and use them to "complement" the decoder's features at various resolutions. This allows the decoder to effectively "borrow" sharp details that would otherwise be lost.
Dynamic Spectrum Loss (DSL)
DSL is a learnable training objective designed to balance frequency reconstruction. Building on Focal Frequency Loss (FFL), DSL employs Gaussian kernels to weight different frequencies. Crucially, the variance ($\sigma$) of these kernels is learnable, allowing the model to adaptively determine which frequencies are most important at different stages of the decoding process. This adaptive weighting helps prevent "checkerboard artifacts" often associated with static frequency losses.
Cross-attention Autoregressive Transformer (CAT)
For text-to-image tasks, the authors propose CAT. Unlike standard models that may rely on a single global text embedding, CAT utilizes cross-attention to attend to all text tokens at every step of the image generation process, ensuring tighter semantic alignment between the text prompt and the generated pixels.
Experimental Results
The FA-VAE was evaluated on benchmark datasets including FFHQ, ImageNet, and Multi-Modal CelebA-HQ.
Reconstruction Fidelity
FA-VAE demonstrates significant quantitative leads over baselines like VQ-GAN and RQ-VAE. On ImageNet with a compression rate of 16, FA-VAE achieved an rFID of 4.60, compared to VQ-GAN’s 5.15. At a lower compression rate (f=4), it reached a near-perfect rFID of 0.40. Qualitative results show much sharper reconstructions of difficult textures, such as intricate hair strands or the fur on a dog's tongue, which appear blurry in baseline models. The image spectrum analysis confirms that FA-VAE more accurately restores high-frequency components.
Text-to-Image Synthesis
The CAT model achieved an FID of 10.23 on CelebA-HQ-MM, outperforming specialized models like TediGAN (106.37) and LAFITE (12.54). This indicates that persistent text guidance through cross-attention significantly improves the semantic accuracy of generated images.
Discussion and Limitations
While FA-VAE sets a new standard for high-fidelity reconstruction, some areas remain for further exploration. The model exhibits some sensitivity to the Gaussian kernel size in the DSL; while a size of 3 was found to be effective, the optimal size may vary by image type. Additionally, the computational overhead of Discrete Fourier Transforms (DFT) used in the DSL requires further quantification. Future work could also involve testing the FCM architecture on a wider variety of backbones, such as diffusion-based VAEs.
Summary updated