Quaternion Generative Adversarial Networks

Eleonora Grassucci, Edoardo Cicero, Danilo ComminielloarXiv 2021 · DOI

Abstract

Latest Generative Adversarial Networks (GANs) are gathering outstanding results through a large-scale training, thus employing models composed of millions of parameters requiring extensive computational capabilities. Building such huge models undermines their replicability and increases the training instability. Moreover, multi-channel data, such as images or audio, are usually processed by real-valued convolutional networks that flatten and concatenate the input, often losing intra-channel spatial relations. To address these issues related to complexity and information loss, we propose a family of quaternion-valued generative adversarial networks (QGANs). QGANs exploit the properties of quaternion algebra, e.g., the Hamilton product, that allows to process channels as a single entity and capture internal latent relations, while reducing by a factor of 4 the overall number of parameters. We show how to design QGANs and to extend the proposed approach even to advanced models. We compare the proposed QGANs with real-valued counterparts on several image generation benchmarks. Results show that QGANs are able to obtain better FID scores than real-valued GANs and to generate visually pleasing images. Furthermore, QGANs save up to 75% of the training parameters. We believe these results may pave the way to novel, more accessible, GANs capable of improving performance and saving computational resources.

Introduction

Modern Generative Adversarial Networks (GANs) have achieved remarkable success in high-fidelity image synthesis. However, this progress has come at the cost of extreme architectural complexity, often requiring millions of parameters and massive computational budgets. This scale not only limits accessibility and replicability but also exacerbates training instability.

A fundamental limitation of standard real-valued convolutional neural networks (CNNs) is how they handle multi-channel data, such as RGB images. Typically, these networks flatten and concatenate channels, treating them as independent tensors. This approach risks losing "intra-channel" spatial relations and the inherent correlations between colors—for instance, how the Red, Green, and Blue values of a specific texture move in tandem.

Methodology

To overcome these limitations, we propose moving GAN architectures into the quaternion domain. A quaternion is a hypercomplex number defined as $q = q_0 + q_1i + q_2j + q_3k$, consisting of one real part and three imaginary parts.

Quaternion Representation and the Hamilton Product

In our framework, color images are represented as "pure quaternions." The real part ($q_0$) is set to zero, while the $i, j, k$ components represent the Red, Green, and Blue channels, respectively. This allows the network to treat the RGB triplet as a single mathematical entity rather than three separate layers.

This figure illustrates how a standard CNN treats RGB channels as independent tensors (top), whereas a QCNN treats them as a single quaternion entity (bottom), preserving inter-channel correlations.

The core innovation lies in the use of the Hamilton product for convolutions. Unlike standard matrix multiplication, the Hamilton product allows weights to be shared across the quaternion components. This results in "double learning": the convolution captures spatial relations between pixels, while the Hamilton product simultaneously learns the latent relationships between the color channels themselves.

Stability and Normalization

To stabilize the training of QGANs, we introduced two key adaptations:

  • Quaternion Spectral Normalization (QSN): We adapted Spectral Normalization to the quaternion domain by normalizing the weight matrix as a whole, which proved more effective for stability than component-wise normalization.
  • Quaternion Batch Normalization (QBN): We developed a theoretically grounded normalization approach for quaternion signals. To maintain computational efficiency, we utilize the assumption of "Q-properness," where components are uncorrelated with their involutions.

Experimental Results

We evaluated our QSNGAN (Quaternion Spectral Normalized GAN) against state-of-the-art real-valued SNGANs across four benchmarks: CelebA-HQ, 102 Oxford Flowers, CIFAR10, and STL10.

Efficiency and Performance

QGANs demonstrate a significant reduction in model complexity without sacrificing quality. Because a quaternion weight interacts via the Hamilton product, a quaternion layer requires only 1/4 the parameters of a real-valued layer to produce the same output dimensionality.

  • Parameter Savings: On the CelebA-HQ task, the real-valued model utilized ~61.2 million parameters, whereas the QSNGAN required only ~16.9 million—a reduction of approximately 72%.
  • Image Quality: QSNGAN achieved a Fréchet Inception Distance (FID) score of 29.417 on CelebA-HQ, significantly outperforming the real-valued SNGAN's score of 34.483. Lower FID scores indicate higher diversity and quality in generated images.
  • Qualitative Superiority: Visually, QGANs produced images with more vivid colors and sharper fine details (e.g., skin textures and eyebrows) compared to real-valued models, which often blurred these features into the background.

Conclusion

Quaternion Generative Adversarial Networks offer a powerful alternative to traditional real-valued models, providing a 75% reduction in parameters while improving synthesis quality. By treating multi-channel data as a holistic entity, QGANs capture intricate inter-channel correlations that standard CNNs overlook. This efficiency paves the way for more accessible high-performance generative models across various domains, including 3D audio and multi-sensor data processing.

Summary updated

BibTeX
@misc{grassucci2021quaternion,
  author = {Eleonora Grassucci and Edoardo Cicero and Danilo Comminiello},
  title = {{Quaternion Generative Adversarial Networks}},
  year = {2021},
  eprint = {2104.09630},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.09630},
}
Figure